I want to send SMS via asterisk
Sign Up to our social questions and Answers Engine to ask questions, answer people's questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people's questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Johny
Since Asterisk allow sending SMS from one endpoint to another endpoint in your PBX. You may come across a case where you need to sent an SMS from one PBX to another PBX . This is generally achieved through what is called trunking. Assuming you have a basic idea of Asterisk and know how to send an SMS from one endpoint to another endpoint.
Assuming PBXA and PBXB are two PBX which needs to send SMS to each other.Let’s see how this is achieved in Asterisk.
pjsip.conf (PBXA)
[PBXA]
type=endpoint
transport=tls
context=contextA
disallow=all
allow=ulaw
dtmf_mode=rfc4733
media_encryption=sdes
rtp_symmetric=yes
rewrite_contact=yes
force_rport=yes
direct_media=yes
aors=PBXA
[PBXA]
type=identify
endpoint=PBXA
match= IP Address/Hostname of PBXB
extensions.conf(PBXA)
exten => _X.,1,NoOp(SMS receiving dialplan invoked)
exten => _X.,n,NoOp(To ${MESSAGE(to)})
exten => _X.,n,NoOp(From ${MESSAGE(from)})
exten => _X.,n,NoOp(Body ${MESSAGE(body)})
exten => _X.,n,Set(ACTUALTO=${CUT(MESSAGE(to),@,1)})
exten => _X.,n,Set(uri=”pjsip:PBXA/sip:${EXTEN:1}@{{ IP Address/hostname of PBXB }}”)
exten => _X.,n,MessageSend(${uri},${MESSAGE(from)})
exten => _X.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})
exten => _X.,n,GotoIf($[“${MESSAGE_SEND_STATUS}” != “SUCCESS”]?sendfailedmsg)
exten => _X.,n,Hangup()
Same set of Configurations needs to be applied on PBXB just replace PBXA with PBXB wherever and hostname of PBXB to hostname of PBXA from the above configurations.
I hope you will find it useful.