Jump to content

This is the support site for Andrews & Arnold Ltd, a UK Internet provider. Information on these pages is generally for our customers but may be useful to others, enjoy!

SMS API: Difference between revisions

1,858 bytes added ,  13 May 2015
m
no edit summary
mNo edit summary
mNo edit summary
 
{| class="wikitable"
|+Inbound SMS API Fields
|-
! username
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.
 
{|class="wikitable"
{|
|+OUtbound SMS API Fields
|-
! username
| This is the phone number as shown on the control pages for your VoIP number in full international format with no spaces.
|-
| ''udh''
| Hex UDH header, see [[UDH_messages_to_SIMUDH messages]].
|-
| ''srr''
| Email address or URL for delivery report, see below
|}
Note that we have, again, tried to use GSM 03.40 field names, but alternative field names are supported for now: destination, originator, message.
 
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 characters using an ESC prefix in the 7 bit alphabet (€,[,\,],^,{,|,},~). The message will be coded as 7, 8 or 16 bit depending on what you include in the text, and this will impact the number of message parts that may be sent. If you include the invalid UTF-8 sequence 0xC0 0x80, then that includes a null in the message. If you include any unicode characters beyond U+0xFFFF then UTF-16 coding is used and sending of text in is UCS2 format. Not all interconnects or devices understand UTF-16 format.
 
The response text 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 da=01234567890 --form-string ud="Hello world" https://sms.aa.net.uk/sms.cgi
 
Messages are charged per message part, see our main website for prices.
 
===Delivery reports====
In some cases we can provide a delivery report and indicate progress of a message. However this is not always possible and should not be relied on.
 
To use this, specify the srr either as an email address or a URL. The URL can include (typically after the ?) a string %code which will be replaced with a number that indicates progress. 1=Delivered, 2=Rejected, 4=Buffered, 8=Accepted by SMSC, and 16=Rejected by SMSC. Other % strings can be used such as %da or %dest as the original destination number, %oa for originator, %ud for the message.
 
 
 
[[Category:SMS]]
autoreview, Bureaucrats, editor, Interface administrators, reviewer, Administrators
12,270

edits