Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Receive SMS

...

The gateway is able to host a dedicated number on which to receive SMS. All SMS messages received on this number can be forwarded in one of the following ways. Initially this will need to be configured by Amethon. For each received message we know the following:

  • sender: the number of the person who sent the message
  • recipients: the number to which the message was sent (this is the hosted number)
  • text: the SMS message text

Email

an email is sent to a preconfigured email address. The email will appear to come from phoneNumber@amethon.net (eg 6142154353@amethon.net). It's subject will be "SMS Message Received" and the email body will contain the SMS text.

HTTP GET

A remote URL can be called passing as parameters the sender, recipient and SMS text details. Eg
http://www.company.com/receive.asp?sender=61450123123&recipient=61414414414&message=Hello+World

Web Service

A remote Web Service can be called passing as parameters the sender, recipient and SMS text details.

method

parameters

return

receive

(String sender, String recipient, String text)

Boolean (success | failure)

- Message Polling

Client can poll for incoming messages via the following call. Criteria is provided an array of Option (see below for a list of valid criteria specifications). An array of Message is returned upon each call. In the case of error, an array contains a single Message with Subject field set to the corresponding error code is returned.

Note

Only messages in response to SMS that have had a replyTo value set to "inbox:" will be retrieved. or messages that have been sent to a dedicated inbound number where the account has been set to send messages to the inbox.  Note that messages that cannot be send using the push method due the receiving service being unavailable are also sent to the "inbox"

This method is not HTTP Get compatable.

Method recieve


method

parameters

return

receive

Stringusername,Stringpassword, Option[] criteria

Message[]

Polling criteria include:

Criterion

Description

document-id

A valid documentId returned by MessageCore previously.

source

A particular source address.

destination

A particular destination address.

period-from

(YYYY/MM/DD HH:MM:SS) The arrival time lower limit.  this exact format must be used eg 2008/10/12 00:00:00

period-to

(YYYY/MM/DD HH:MM:SS) The arrival time upper limit. this exact format must be used eg 2008/10/13 00:00:00

tag

User defined tag.

max-messages

Max. number of messages return. Default is 1000.

poll-status

Either POLLED or UNPOLLED


 

Method receiveUnpolled

Client can poll for incoming messages that have not been previously polled for by using the receiveUnpolled method.  This method is the same as the receive method with the option value defaulted to unpolled. This method can be called using HTTP Get

Only messages in response to SMS that have had a replyTo value set to "inbox:" will be retrieved.

method

parameters

return

receiveUnpolled

String username, String password,

Message[]

Method receiveInboundMessage

method

parameters

return

receiveInboundMessage

Stringusername,Stringpassword, Option[] criteria ); Message[]

InboundMessage[]

Polling criteria include:

Criterion

Description

document-id

A valid documentId returned by MessageCore previously.

source

A particular source address.

destination

A particular destination address.

period-from

(YYYY/MM/DD HH:MM:SS) The arrival time lower limit.  this exact format must be used eg 2008/10/12 00:00:00

period-to

(YYYY/MM/DD HH:MM:SS) The arrival time upper limit. this exact format must be used eg 2008/10/13 00:00:00

tag

User defined tag.

max-messages

Max. number of messages return. Default is 1000.

poll-status

Either POLLED or UNPOLLED

Return Parameters in Message[] array

parameter

type

notes

arrivalTimestamp

nillable="true" type="soapenc:string"

time and date of MO received from smsc

replyLink

nillable="true" type="tns1:Address"

as defined by replyto address of MT message - if set to inbox: will contain "inbox:dId=... where dId is the MT Document ID that is matched to the MO message

payload

nillable="true" type="tns1:Payload"

format of text string eg ASCII or HEX or UTF-8

responseText

nillable="true" type="soapenc:string"

text of MO message

responseTimestamp

nillable="true" type="soapenc:string"

time of collection of message

sourceAddress|nillable="true" type="tns1:Address"|MSISDN of MO message sender|