Basic about SMS or Message

I found many data and videos about Asterisk call-related topics, but I did not find basic information on how to send or receive SMS or messages from one SIP phone to another and how to connect them with a GSM gateway.

Unfortunately the recent relocation of the documentation means that Google can no longer find key Asterisk documents. However, for SIP out of dialogue messages, you define a message handling context, n the channel driver configuration, and have it issue SendMessage.

For GSM gateways you will need to read their documentation.

1 Like

two application in the dial plan that can send message but i can’t understand how to use this

SMS is for analogue lines, and it is unlikely to be relevant to most users.

1 Like

For SIP, the SendMessage documentation should be read in conjunction with RFC 3428 and the documentation for your phone and/or from your provider. Support is by no means universal.

There are legal consideration when using a SIP provider to originate SMS in the USA.

1 Like

do you have any other source to learn about asterisk message

You can use API provided by sms provider with curl or system.

1 Like

You can use this for example, but you need instal the package CURL and next you need change the source from SMS

exten => sms,1,Noop(Incoming SMS from ${CALLERID(num)} ${BASE64_DECODE(${SMS_BASE64})}) 
exten => sms,n,System(echo '${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)} ${CALLERID(num)} ${BASE64_DECODE(${SMS_BASE64})}' >> /etc/asterisk/script/sms.txt)
exten => sms,n,Set(result=${CURL(http://www.YOU-LINK.php?bnumber=${CALLERID(num)}&smstext=${URIENCODE(${BASE64_DECODE(${SMS_BASE64})})}&nowdata=${STRFTIME(${EPOCH},,%Y-%m-%d)}&nowhour=${STRFTIME(${EPOCH},,%H:%M:%S)})})
1 Like

I think sms is used by the, unsupported, chan_dongle, not by the SIP message handling.

Unfortunately, Google hasn’t recovered from the severe link rot created by the documentation move, and the search facility on the new documentation site returns far too many false positives, so I cannot find the document on out of dialogue messaging that I’d normally refer people to.

The curl method only works for particular providers. It won’t work for anyone that does use SIP out of dialogue messages.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.