Sending SMS using chan_dongle

I was able to receive sms by following guides and adding this to [from-trunk] in dialplan:

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:102,${CALLERID(num)})
exten => sms,n,Hangup()

but i can’t find anywhere a guide for sending sms (Sip => GSM)

Anyone can help me please?

chan_dongle is effectively unsupported, and a mobile gateway is generally better.

However:

Thanks David, unfortunately DongleSendSMS didn’t work giving error

app.c:111 app_send_sms_exec: NULL payload for message -- SMS will not be sent

what worked for me is:

exten => _.,1,Set(OPERATOR_1=${CUT(MESSAGE(to),@,1)})
exten => _.,2,Set(OPERATOR_2=${CUT(OPERATOR_1,\:,2)})
exten => _.,3,System(asterisk -rx 'dongle sms dongle0 ${OPERATOR_2} ${MESSAGE(body)}')
exten => _.,4,Hangup()

Now the issue is if i send for example “testmessage” the actual text that is sent is:

DELAYED DELIVERY [2022.12.12 11:20:05]:
testmessage
NOW:
testmessage

Anyone has experience with sms can help with this please?

UPDATE:
Made it to work with:

exten => _.,1,Set(OPERATOR_1=${CUT(MESSAGE(to),@,1)})
exten => _.,2,Set(OPERATOR_2=${CUT(OPERATOR_1,:,2)})
exten => _.,3,Set(OPERATOR_3=${CUT(MESSAGE(body),\NOW:,2)})
exten => _.,4,Set(OPERATOR_4=${CUT(OPERATOR_3,:,2)})
exten => _.,5,System(asterisk -rx 'dongle sms dongle0 ${OPERATOR_2} ${OPERATOR_4}')
exten => _.,6,Hangup()

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