It is possible to send and receive MMS and SMS messages by using the HTTP protocol.
Sending messages is done by sending the required parameters to the relevant script on Vianett's server as HTTP GET or HTTP POST requests. The scripts will then attempt to send the messages, and return an XML response to the requests in order to give feedback as to whether operations have been successfully completed.
Receiving messages is done by writing scripts receiving the required parameters as HTTP GET or HTTP POST requests. The scripts can then process these values according to the customer's wishes. The scripts have to be implemented so that they return a response in XML format.
The following paragraphs contain examples of how the scripts are used with HTTP GET requests when sending and receiving SMS and MMS messages, with examples of how their XML responses look like. In addition, there are descriptions of the fields which make up the various parameters to the scripts. For additional information, see the page field descriptions.
SMS Incoming SMS:
This is for SMS messages that you will receive on your server. Replace
http://yourserver/yourscript with the correct address to your script.
aaaa
Example:
http://yourServer/yourScript?password=&username=&requesttype=mo&operator=2&retrycount=0&refno=1234
&message=1234&prefix=1234&destinationaddr=1963&sourceaddr=1234&now=05%2E10%2E2005+09%3A36%3A07&"
Reply:
<?xml version=""1.0"" encoding=""iso-8859-1"" ?>
<ack errorcode=""0"" refno=""1234"" />"
Outgoing SMS:
This is for SMS messages sent out by your server. These messages will go to our server, and from here we will redirect them to the mobile number specified in your SMS message.
Example:
http://yourServer/yourScript?username=1234&password=1234&refno=1234&sourceaddr=1234&destinationaddr=1234&message=1234
Reply:
<?xml version='1.0'?>
<ack refno=1234 errorcode='0'>OK</ack>
MMS
An MMS consists of a ZIP-file containing one or more files of multimedia content (such as images, audio and/or video). It may also contain a file named mms.smil, written in a subset of the Synchronized Multimedia Integration Language (SMIL), which ties together the various files much like an HTML page would.
An example is available for download here.
MMS messages are transferred either by converting the ZIP-file into a URL-encoded Base64-encoded string (this string is then specified in the parameter mmsdata in the URL), or by providing a URL to an MMS ZIP-file.
Incoming MMS messages are stored on our server, and a link to the file representing the MMS message is also provided in the parameter mmsurl in the URL.
Incoming MMS:
This is for MMS messages that you will receive on your server. Replace
http://yourserver/yourscript with the correct address to your script.
Example:
http://yourServer/yourScript?password=&username=&requesttype=mo&mmschecksum=1796011280
&mmsdata=UEsDBBQACAAIAAyzSjMAAAAAAAAAAA[....clip....]
AAAAEAAQA4wAAAAMSAQAAAA%3D%3D
&mmsurl=http%3A%2F%2Fsmsc%2Evianett%2Eno%2Factiveserver%2Fmo%2Fgetmms%2F%3F
mmsid%3D1234%26checksum%3D1234&operator=1&retrycount=0&refno=1234&message=1234%3A
&prefix=1234&destinationaddr=1963&sourceaddr=1234&now=10%2E10%2E2005+22%3A24%3A28&"
Reply:
<?xml version=""1.0""?>
<ack refno=""1234"" errorcode=""0"" /> "
Outgoing MMS:
This is for MMS messages sent out by your server. These messages will go to our server, and from here we will redirect them to the mobile number specified in your MMS message.
Example (with Base64):
http://ams.smsc.vianett.no/v3/cpa/oldactiveserver/bridgemt.ashx?username=demo&password=demo&message=1234&refno=1234&sourceaddr=1963
&destinationaddr=4748044407&mmsdata=base64encodedmmsfile
Reply:
<?xml version=""1.0""?>
<ack refno=""1234"" errorcode=""0"">OK</ack>
Example (with URL to ZIP-file):
http://ams.smsc.vianett.no/v3/cpa/oldactiveserver/bridgemt.ashx?username=demo&password=demo&message=1234&refno=1234&sourceaddr=1963
&destinationaddr=4748044407&mmsurl=http://sms.vianett.com/files/mms.zip
Reply:
<?xml version=""1.0""?>
<ack refno=""1234"" errorcode=""0"">OK</ack>