Chan_dongle sms triggers call


(Cosmo) #1

I’ve configured the dongle to receive and send sms thru SIMPLE Message. I am receiving sms and send sms, the only problem I have is when I am sending an sms, I am receiving a call back from that number.

here is my extensions_custom.conf:
[from-trunk-dongle]
exten => sms,1,Verbose(Incoming SMS from ${CALLERID(num)} ${BASE64_DECODE(${SMS_BASE64})})
exten => sms,n,Set(MESSAGE(body)=${BASE64_DECODE(${SMS_BASE64})})
exten => sms,n,MessageSend(pjsip:1006,${CALLERID(num)})
exten => sms,n,Hangup()
exten => _.,1,Set(CALLERID(name)=${CALLERID(num)})
exten => _.,n,Goto(from-trunk,${EXTEN},1)
[astsms]
exten => _.,1,NoOp(SMS receiving dialplan invoked)
exten => _.,n,Set(NOTSMS=${CUT(MESSAGE(to),@,1)})
exten => _.,n,Set(NOTSMS2=${CUT(NOTSMS,:,2)})
exten => _.,n,NoOp(To ${MESSAGE(to)})
exten => _.,n,NoOp(From ${MESSAGE(from)})
exten => _.,n,NoOp(Body ${MESSAGE(body)})
exten => _.,n,Set(ACTUALTO=${CUT(MESSAGE(to),@,1)})
exten => _.,n,System(/usr/sbin/asterisk -rx “dongle sms dongle0 ${NOTSMS2} ${MESSAGE(body)}”)
exten => _.,n,Hangup()