Hi, I am looking at http://www.theschmandts.org/blog/?p=28 to setup missed call notification but i am having issue. following is my dialplan [macro-stdexten] exten => s,1,Dial(${ARG2}) exten => s,2,Goto(s-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER) exten => s-NOANSWER,1,Voicemail(${ARG1},u) ; If unavailable, send to voicemail w/ unavail announce exten => s-NOANSWER,2,Goto(default,s,1) ; If they press #, return to start exten => s-BUSY,1,Voicemail(${ARG1},b) ; If busy, send to voicemail w/ busy announce exten => s-BUSY,2,Goto(default,s,1) ; If they press #, return to start exten => _s-.,1,Goto(s-NOANSWER,1) ; Treat anything else as no answer exten => a,1,VoicemailMain(${ARG1}) ; If they press *, send the user into VoicemailMain exten => h,1,System(/var/lib/asterisk/agi-bin/processcallemail.sh "${ARG3}" "${CALLERID(num)}" "${CALLERID(name)}" "${DIALSTATUS}" "${VMSTATUS}" "${EXTEN}") [from-sip] exten => _7[0123]XX,1,macro(stdexten,${EXTEN},sip/${EXTEN}) Following CLI output look like its not executing h extension in macro-stdexten. But if i add h extension in [from-sip] it works! do you know why ? -- Executing [7207 at from-sip:1] Macro("SIP/7101-0000000a", "stdexten,7207,sip/7207") in new stack -- Executing [s at macro-stdexten:1] Dial("SIP/7101-0000000a", "sip/7207") in new stack == Using SIP RTP CoS mark 5 -- Called 7207 -- SIP/7207-0000000b is ringing == Spawn extension (macro-stdexten, s, 1) exited non-zero on 'SIP/7101-0000000a' in macro 'stdexten' == Spawn extension (from-sip, 7207, 1) exited non-zero on 'SIP/7101-0000000a' -- Executing [h at from-sip:1] Hangup("SIP/7101-0000000a", "") in new stack == Spawn extension (from-sip, h, 1) exited non-zero on 'SIP/7101-0000000a' -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110421/c0835050/attachment.htm>
On Thu, Apr 21, 2011 at 12:26 PM, satish patel <satish_lx at hotmail.com>wrote:> Hi, > > I am looking at http://www.theschmandts.org/blog/?p=28 to setup missed > call notification but i am having issue. following is my dialplan > > [macro-stdexten] > exten => s,1,Dial(${ARG2}) > exten => s,2,Goto(s-${DIALSTATUS},1) ; Jump > based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER) > exten => s-NOANSWER,1,Voicemail(${ARG1},u) ; If unavailable, > send to voicemail w/ unavail announce > exten => s-NOANSWER,2,Goto(default,s,1) ; If they press #, > return to start > exten => s-BUSY,1,Voicemail(${ARG1},b) ; If busy, send to > voicemail w/ busy announce > exten => s-BUSY,2,Goto(default,s,1) ; If they > press #, return to start > exten => _s-.,1,Goto(s-NOANSWER,1) ; Treat > anything else as no answer > exten => a,1,VoicemailMain(${ARG1}) ; If they > press *, send the user into VoicemailMain > exten => h,1,System(/var/lib/asterisk/agi-bin/processcallemail.sh "${ARG3}" > "${CALLERID(num)}" "${CALLERID(name)}" "${DIALSTATUS}" "${VMSTATUS}" > "${EXTEN}") > > > [from-sip] > exten => _7[0123]XX,1,macro(stdexten,${EXTEN},sip/${EXTEN}) > > > > Following CLI output look like its not executing h extension in > macro-stdexten. But if i add h extension in [from-sip] it works! do you know > why ? > > -- Executing [7207 at from-sip:1] Macro("SIP/7101-0000000a", > "stdexten,7207,sip/7207") in new stack > -- Executing [s at macro-stdexten:1] Dial("SIP/7101-0000000a", > "sip/7207") in new stack > == Using SIP RTP CoS mark 5 > -- Called 7207 > -- SIP/7207-0000000b is ringing > == Spawn extension (macro-stdexten, s, 1) exited non-zero on > 'SIP/7101-0000000a' in macro 'stdexten' > == Spawn extension (from-sip, 7207, 1) exited non-zero on > 'SIP/7101-0000000a' > -- Executing [h at from-sip:1] Hangup("SIP/7101-0000000a", "") in new > stack > == Spawn extension (from-sip, h, 1) exited non-zero on > 'SIP/7101-0000000a' >... google.... http://www.voip-info.org/wiki/view/Asterisk+cmd+Macro The Useful info was only a few lines from the beginning: *"'h' extension:* *If a macro executes a Dial() and the called party hangs up, then the control passes to the 'h' extension of the calling context. However, the 'h' extension is still needed inside the Macro context in case of a command, application, or extension exiting non-zero - i.e. the user hangs up in the middle of a Record() - in this case the 'h' extension of the Macro context is used, not the 'h' extension of the calling context.) Tilghman, May 2010: So Macro returns upon hangup to execute the "h" extension in the original calling context, though even that is conditional, based upon it having been broken for a long time."* -- Sherwood McGowan Telecommunications and VOIP Consultant -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110421/cc7c2582/attachment.htm>
Hi All, I am using http://www.theschmandts.org/blog/2007/05/05/email-notifications-for-missed-calls-in-asterisk/ to implement missed call feature. and i modify script to grab email address from voicemail.conf But i am not able to see DEST extension in this script ? what would be the variable to get destination extension so base on that i can grab email address of user from voicemail.conf exten => h,1,System(/var/lib/asterisk/agi-bin/processcallemail.sh "" "${CALLERID(num)}" "${CALLERID(name)}" "${DIALSTATUS}" "${VMSTATUS}") Calling from 7527<--to--->7101 but i can see only 7527 not dest 7101 CLI outout -- Executing [h at from-sip:1] System("SIP/7527-0000000d", "/var/lib/asterisk/agi-bin/processcallemail.sh "" "7527" "Guest" "CANCEL" """) in new stack shirley*CLI> exit -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110505/3eff740f/attachment.htm>
Set a variable ${_CALLED_EXT} to ${EXTEN} before you hang up the call, then reference that variable in your h exten. Thanks, --Warren Selby, dCAP On May 5, 2011, at 11:59 AM, satish patel <satish_lx at hotmail.com> wrote:> Hi All, > > I am using http://www.theschmandts.org/blog/2007/05/05/email-notifications-for-missed-calls-in-asterisk/ to implement missed call feature. and i modify script to grab email address from voicemail.conf > > But i am not able to see DEST extension in this script ? what would be the variable to get destination extension so base on that i can grab email address of user from voicemail.conf > > exten => h,1,System(/var/lib/asterisk/agi-bin/processcallemail.sh "" "${CALLERID(num)}" "${CALLERID(name)}" "${DIALSTATUS}" "${VMSTATUS}") > > Calling from 7527<--to--->7101 but i can see only 7527 not dest 7101 > > > CLI outout > -- Executing [h at from-sip:1] System("SIP/7527-0000000d", "/var/lib/asterisk/agi-bin/processcallemail.sh "" "7527" "Guest" "CANCEL" """) in new stack > shirley*CLI> exit > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users