[asterisk-users] Notify me when the call is answered
Jeremy Kister
asterisk-01 at jeremykister.com
Thu Mar 17 09:30:09 CDT 2011
On 3/17/2011 8:52 AM, Eric Smith wrote:
> How would I achieve a notification this way or another way?
I would use the same premise- below is not tested,
exten => _0031.,n,Dial(SIP/foobar2/${EXTEN},60,wM(notifymobile))
[macro-notifymobile]
exten => s,1,Set(STRIPPED=${CHANNEL:4})
exten => s,n,Set(XTN=${CUT(STRIPPED,-,1)})
exten => s,n,Set(TEXT=Extension $XTN answer call from ${CALLERID(num)})
exten => s,n,System(/opt/swift/bin/swift -o /tmp/$XTN.wav "$TEXT")
exten => s,n,Page(SIP/foobar,iqA(/tmp/$XTN.wav))
alternatively, what I actually do:
[macro-AnswerLog]
exten => s,1,Set(STRIPPED=${CHANNEL:4})
exten => s,n,Set(XTN=${CUT(STRIPPED,-,1)})
exten => s,n,Macro(Jabber,x${XTN} answered ${CALLERID(num)})
[macro-Jabber]
; ${ARG1} - message
exten => s,1,Jabbersend(me at example.com,me1 at example.org,${ARG1})
exten => s,n,Jabbersend(me at example.com,me2 at example.net,${ARG1})
--
Jeremy Kister
http://jeremy.kister.net./
More information about the asterisk-users
mailing list