Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The SMS application

SMS() is an application to handles calls to/from text message capable phones and message centres using ETSI ES 201 912 protocol 1 FSK messaging over analog calls.

...

  1. Connection to a message centre to send text messages - probably initiated via the manager interface or "outgoing" directory
  2. Connection to an POTS line with an SMS capable phone to send messages - probably initiated via the manager interface or "outgoing" directory
  3. Acceptance of calls from the message centre (based on CLI) and storage of received messages
  4. Acceptance of calls from a POTS line with an SMS capable phone and storage of received messages
Arguments to sms():
  • First argument is queue name
  • Second is options:
    • a: SMS() is to act as the answering side, and so send the initial FSK frame
    • s: SMS() is to act as a service centre side rather than as terminal equipment

...

When receiving a message as a service centre, only the destination address is sent, so the originating address is set to the callerid.

EXAMPLES

The following are examples of use within the UK using BT Text SMS/landline service.

This is a context to use with a manager script.

Code Block

[smsdial]
; create and send a text message, expects number+message and
; connect to 17094009
exten => _X.,1,SMS(${CALLERIDNUM},,${EXTEN},${CALLERIDNAME})
exten => _X.,n,SMS(${CALLERIDNUM})
exten => _X.,n,Hangup

The script sends

No Format

	action: originate
	callerid: message <from>
	exten: to
	channel: Local/17094009
	context: smsdial
	priority: 1

...

For incoming calls you can use a context like this :-

Code Block

[incoming]
exten => _XXXXXX/_8005875290,1,SMS(${EXTEN:3},a)
exten => _XXXXXX/_8005875290,n,System(/usr/lib/asterisk/smsin ${EXTEN:3})
exten => _XXXXXX/_80058752[0-8]0,1,SMS(${EXTEN:3}${CALLERIDNUM:8:1},a)
exten => _XXXXXX/_80058752[0-8]0,n,System(/usr/lib/asterisk/smsin ${EXTEN>:3}${CALLERIDNUM:8:1})
exten => _XXXXXX/_80058752[0-8]0,n,Hangup

...