[macro-dialout-one-predial-hook]
exten => s,1,Noop(Entering user defined context in extensions_custom.conf to add sms calls hangup handler)
exten => s,n,Set(CHANNEL(hangup_handler_push)=sms-after-call,s,1)
exten => s,n,MacroExit()
[sms-after-call]
exten => s,1,NoOp(Sending SMS Thank you from mobile)
exten => s,n,DongleSendSMS(dongle0,${CALLERID(number)},THANK FOR CALLING,,false)
exten => s,n,Hangup()
BUT incoming caller number is getting to many messages. FreePBX is using a Queues and each time caller skips Agent1 to Agent2 he gets message (context is working on HANG UP).
EXAMPLE:
incoming call is waiting for Agent1 10-20sec when Agent1 is not picking up - Queues goes to another Agent2 - AND THIS IS THE MOMENT (hang up) when caller is getting sms.
Each time Queues skip agent then caller gets another and another message.
QUESTION:
its possible to send ONLY 1 sms to caller - after call (hangup) ??
2. New Extension (custom one - with Dial field sms-after-call,s,1 ) 3. Put this extension to Queues (as queue agent with time 0)
It works, Incoming Caller get SMS (but on the begging of call…)
Thanks for help.
BTW: Send sms can be done by a) System(asterisk -rx ‘dongle sms dongle1 ${CALLERID(num)} www.SuperSite.com’) or b) DongleSendSMS(dongle1,${CALLERID(num)},“www.SuperSite.com”,0,no)
b) option gives more arguments (,0 means time ,no means report)