Connection Software


         Connection Software Ltd

Uploading ringtones using HTTP

With the It's Arrived service you can use a web URI to upload a RTTTL or RTX ringtone string to our library.

Servers

We have multiple servers, two of which are available for public use, so that in the event of an Internet failure you should still be able to connect to us. The two servers are www.csoft.co.uk and www2.csoft.co.uk.

Wherever you see www.csoft.co.uk you can use www2.csoft.co.uk. At least one of these servers should always be available and for maximum reliability you may wish to write your application to use www2.csoft.co.uk should www.csoft.co.uk be unavailable for any reason.

Security

You can use an HTTP, or HTTPS, POST to send your messages - but clearly the latter provides better security. You may use a GET rather than a POST, but GET has greater security issues, since you can very easily see the entire message including your Username and PIN on the URI line and suffers from truncation limitations.

http://www.csoft.co.uk/uploadringtone

https://www.csoft.co.uk/uploadringtone

POST header fields

When using the POST command you must specify the correct HTTP headers. In particular, the following must be set;

Host: www.csoft.co.uk
Content-Length: <the length of the query string>
Content-Type: application/x-www-form-urlencoded; charset="utf-8"

Encoding

See Encoding Characters for information about how to encode messages that contain certain special characters.


To upload a RTTTL or RTX string

Parameter Maximum size Description
Username   Username - the Username required to access your It's Arrived account
PIN   PIN - the PIN required to access your It's Arrived account
Artist 20 The artist most commonly associated with the song
SongName 50 The full song name in plain English
Genre 3 The number associated with the song's genre. See Genre Values
Royalty 1 Royalty declaration for this song. See Royalty Values
Ringtone 1024 Ringtone RTTTL or RTX string. Special characters, such as <comma>, must be encoded according to the HTTP specification. For <comma> use %2C, for <colon> use %3A, for <equals> use %3D. See Encoding Characters.

Example - Using an RTX or RTTTL string (note that the body line has been broken for formatting, but that this is not an actual line break)

POST /uploadringtone HTTP/1.1
Host: www.csoft.co.uk:80
Content-Type: application/x-www-form-urlencoded; charset="utf-8"
Content-Length: 279

?Username=ANOther.12345&PIN=123456
&Ringtone=Uncle%3Ad%3D8%2Co%3D5%2Cb%3D130%3Aa%2Ca%2Ca%2Cg%2Cf%2Cf%2Cd%2Cf%2C4g%2C4g
%2Cc%2Cd%2C4f%2Ca%2Ca%2C4g%2Cf%2Cf%2Cd%2Cf%2C4g%2C4g%2Cg%2C4f%2C4a%2C4a%2Cg%2C4f%2C4g%2C4f%2C2f
&Artist=Elvis%20Presley&SongName=Amazing%20Grace&Genre=65&Royalty=3


Response

The Server will only respond back with either a library number, if successful,

LibraryNumber=71234

or an error description, if unsuccessful. As there can be more then one error in the description, a semi-colon is used as a separator.

Error=song name in rtttl string is missing;Royalty value required

Dealing with Errors

  • If you are unable to establish a TCP/IP connection with www.csoft.co.uk then it is vital that you automatically failover to www2.csoft.co.uk.
  • If you receive a response code indicating an error condition DO NOT automatrically retry your request. For example if you are Out of Credit you will still be Out Credit. If you do enter a retry loop we may block your IP address as repeated retries may appear to us to be a Denial of Service attack.

Appendix

SMS This page was last modified at 10:52 UTC on Tuesday June 09, 2009