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()