5

I have received sms on my asterisk server via sip on my asterisk version 1.4.11 but not able to route it from agi or send it to some url bellow lines i can see on console.

[Feb 24 23:50:29] WARNING[23972]: chan_sip.c:9496 receive_message: Received message to <sip:13214375437576@16.151.18.14> from <sip:131231233214@164.36.74.30>;tag=sansay1824778355rdb15870, dropped it...
Content-Type:text/plain
Message: Test SMS
Huzoor Bux
  • 1,026
  • 4
  • 20
  • 46

1 Answers1

2

There is no any way deal with sms on 1.4.*

You need asterisk version 10 or 11

Configuration following:

sip.conf

textsupport=yes                                                                                                                                                                               
accept_outofcall_message = yes                                                                                                                                  
outofcall_message_context = messages

extensions.conf

[messages]                                                                                                                                                                                    
exten => _X.,1,Set(ACTUALTO=${CUT(MESSAGE(to),@,1)})                                                                                                                                          
exten => _X.,n,MessageSend(${ACTUALTO},${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()                                                                                                                                                                       
;                                                                                                                                                                                             
; Handle failed messaging                                                                                                                                                                     
exten => _X.,n(sendfailedmsg),Set(MESSAGE(body)="[${STRFTIME(${EPOCH},,%d%m%Y-%H:%M:%S)}] 
Your message to ${EXTEN} has failed. Retry later.")                                                 
exten => _X.,n,Set(ME_1=${CUT(MESSAGE(from),<,2)})                                                                                                                                            
exten => _X.,n,Set(ACTUALFROM=${CUT(ME_1,@,1)})                                                                                                                                               
exten => _X.,n,MessageSend(${ACTUALFROM},ServiceCenter)                                                                                                                                       
exten => _X.,n,Hangup()                                                                                                                                                                       
arheops
  • 15,544
  • 1
  • 21
  • 27
  • What is 10 and 11 as for i know there is no any asterisk version the last one is 1.8.* – Huzoor Bux Feb 25 '13 at 10:56
  • 1
    Please go http://www.asterisk.org/downloads and check it. latest version is 11.2.1 (on older classifcation it have to be 1.11.2.1). – arheops Mar 01 '13 at 15:15
  • I checked on 1.8 as well [Mar 5 11:24:33] WARNING[9094]: chan_sip.c:15727 receive_message: Received message to from ;tag=sansay1867839809rdb8539, dropped it... Content-Type:text/plain Message: test – Huzoor Bux Mar 05 '13 at 17:26
  • 1.8 have no full sms support. so if you want use it - you have add support yourself. – arheops Mar 05 '13 at 23:59
  • @arheops: We are using asterisk 11, and followed extension.conf as you shown. But we are still getting error in receiving message like:`"Your message to 1001 has failed. Sending when available"` and below this `NoOp("Message/ast_msg_queue", "Queueing messaging for offline") in new stack` – SD. Nov 05 '14 at 05:27
  • So your gate refusing sending message. Ask gate's support – arheops Nov 05 '14 at 17:23