aa.net.uk Broadband - Broadband you can work with

Skip to Navigation / Skip to Content

Knowledge base Handling text messages

This page contains technical details and as such may be quite long and hard to follow. If you cannot find the details you require please feel free to contact support who can explain things for you. You will also find many other customers on irc or usenet who can help with queries. Feel free to send us feedback if you think there are any errors in this page.

We offer a number of SMS services.

Inbound

Some of the numbers we operate can be used to receive text messages. Where this works, the texts can be sent from most networks to your VoIP number and are then sent on to you. You can set either an email address or a URL (http:// or https://) for handling the inbound text. The simplest for most people is to set an email address. The text is emailed when it arrives. We can also pass on the text to a mobile voice SIM if you are using one (for which there is a charge).

HTTP posted inbound texts. If you set the text to be sent to a URL then we will issue an HTTP POST to the URL including sender, destination and message. We handle multipart messages automatically making one POST when all parts have arrived.

Unfortunately this is not available on all numbers. The issue is somewhat complicated and we are working on eventually getting all 01 and 02 numbers textable as well as 03 and 07 numbers someday. In most cases, for 01 and 02 numbers, where we cannot handle texts you will instead get a call reading the text to you instead.

For SIP2SIM you can put the ICCID (i.e. starting 8944...) in the inbound SMS instead of an email address or URL for inbound texts to go direct to the SIM.

Inbound keyword

We operate a keyword text service on the easy to remember number 01444666444. You can ask sales for a keyword and we will set it up if it is available. The message is then sent by HTTP POST (as above) with the addition on keyword which is removed from the start of message.

Outbound messages

We operate an outbound text service that is available to all of our customers that have a VoIP number. To use this service you must have an outgoing password configured in the control pages for the VoIP number.

To send texts you need to issue an HTTP GET or POST to our outbound text gateway http://sms.aa.net.uk/sms.cgi with the following fields as if sent from a form. As the password is sent in plain text you may prefer to use https, but remember we use a CACert certificate which may give a warning if you have not loaded the root cert.

Outbound text messages
usernameThis is the phone number as shown on the control pages for your VoIP number. No spaces. If your number has X's in it (block of 10, 100, etc), then this is what you use.
passwordThe corresponding outgoing password for the username as set in the control pages for your VoIP number.
destinationThis is the number to which the message is to be sent.
messageThis is the message to send. This can be more than the normal 160 characters which means the message is sent as a multipart message (subject to limit). See below regarding character set.
limitSet this to limit the number of parts that the message may be sent in. e.g. max_concat to ensure never sent as multiple parts.
sendtimeSet this to make a message go at a later time. Format is YYYY-MM-DD HH:MM:SS.
replaceSet this to 1 for replacable message. Replaces previous replacable message from the same originator to the same destination.
flashSet this to 1 to cause the message to display on receipt and not be automatically stored.
reportSet this to have a delivery report sent to a URL, see below.
costcentreOptional, up to 10 characters, code that is included in the bill XML data.
privateMarks the message as private, see below
originatorSets the sending number (see below). Normally not needed as your username is used.
udhHex UDH header, see below.
iccidThe SIM ICCID for direct to SIM texting (see below).

We support UTF-8 coding of the full GSM 7 bit character set (including £$¥èéùìòÇØøÅåΔ_ΦΓΛΩΠΨΣΘΞÆæÉÄÖÑܧäöñüà€¡¿). Whilst one message is normally up to 160 characters some characters are coded using two character spaces (€,[,\,],^,{,|,},~).

Delivery reports are sent as a HTTP GET to a URL you specify in report. Within this you can use %code and %dest to fill in the delivery code and destination number. The code is 1: delivery to handset, 2: Rejected from handset, 4: buffered in transit, 8: accepted by SMSC, 16: rejected by SMSC. We cannot guarantee delivery reports are sent or that the network does not send them before actual delivery (as some do). You can, instead, use an email address in report which cases a delivery report to be emailed to you.

The reply starts either ERR: and an error message or OK:

Example, using curl on linux: curl --silent --get --form-string username=01234567890 --form-string password=123456 --form-string destination=01234567890 --form-string message="Hello world" http://sms.aa.net.uk/sms.cgi

Messages are charged at 8.00p per message part.

Send a message now

SIP2SIM (direct text to SIM)

Customers with our mobile service can set up direct to SIM texting. This is controlled by a password configured for MT (mobile terminated) SMS in the SIM control page. To send direct to SIM you specify the iccid which is the SIM ICCID (the long number on the SIM starting 8944) and the password to authenticate the sending. You also specify the originator and message. Any originator is allowed in such messages. The charges for these messages are much lower than a normal text message.

Example, using curl on linux: curl --silent --get --form-string iccid=8944200006122020007 --form-string password=123456 --form-string originator=01234567890 --form-string message="Hello world" http://sms.aa.net.uk/sms.cgi

For inbound texts you can put the ICCID (i.e. starting 8944...) in the inbound SMS instead of an email address or URL for inbound texts to go direct to the SIM.

Multipart texts

Multipart incoming texts are handled automatically emailing or posting your complete message to you.

Multipart outbound texts are automatically converted in to several parts and sent. This is charged as multiple texts. There is an option to restrict the number of parts to avoid accidental sending of very large texts.

Multipart outbound delivery reports are processed, sending a delivery report only if all parts arrived.

Itemised billing

Your bill will show the number of texts sent and received per number. The optional XML version of your bill contains detailed information for each text sent or received, including the text content of the message (unless the private setting was used).

Multipart texts are itemised and billed as a single text but billed for the number of parts sent. The XML identifies the number of parts.

Message privacy

When you send a message it will be visible, and possibly logged, by the networks through which it travels as well as on the recipients phones. We also log the message you have sent and put the message on the bill (in the XML part). However, you can mark a message as private (see above). This will mean we do not log the message content on the bill or on the control pages. If you mark the message as private and give a value to the private tag then we will also encode the message in our logs using that value as a key. This means that we will only be able to see the message if you give us the key (useful if you want us to tell you what messages you sent at a later date). The exception is where we allow someone to send a message from an alpha tag instead of their normal number - in this case private just stops the content appearing on bills. This is because we need the message so as to be able to trace any abuse that is reported.

If you use this, then we recommend that you use https and also use an HTTP POST rather than GET as that will mean the key you have used does not appear in our web server logs either.

Originator

The originator field is used to set where the message is from. Normally this is only your phone number. Exceptions are:-

  • If your account is for a block of numbers, and so ends in X or XX, then you need to specify an originator that is one of your numbers in the block.
  • If you have a presentation number set up for your VoIP, this will be used unless you specify an originator. The originator can you your username (or one of your numbers if you have a block of numbers).
  • If you ask us, we can allow sending of text based originators on a per account basis. You will need to be an established customer. This can be withdrawn at any time.

User data header

You can specify udh which is the hex user data header. This stops many of the other features of message sending working (such as delivery reports, etc.). Basically, if you specify a UDH you can specify a message or data field. The data field is just the message in hex rather than text and can only be used with this UDH mode. Only one text can be sent so you need to construct UDH for multi part messages yourself (for now at least).