No, the variables are channel specific except for when they're inherited, which doesn't affect you here<br><br><div class="gmail_quote">On Thu, May 5, 2011 at 1:02 PM, satish patel <span dir="ltr"><<a href="mailto:satish_lx@hotmail.com">satish_lx@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>
After google i found something and i tried following. I set variable before Dial and its give me proper value in "h" extension but now question is if multiple user dial multiple extension then will it overwrite current variable value ? <br>
<br>exten => s,1,Set(_CALLED_EXT=${ARG2})<br>exten => s,n,Dial(${ARG2}&iax2/${ARG1},20,t) <br><div class="im"><br><hr>From: <a href="mailto:satish_lx@hotmail.com" target="_blank">satish_lx@hotmail.com</a><br>To: <a href="mailto:asterisk-users@lists.digium.com" target="_blank">asterisk-users@lists.digium.com</a><br>
</div>Date: Thu, 5 May 2011 17:52:54 +0000<div><div></div><div class="h5"><br>Subject: Re: [asterisk-users] missed call notification<br><br>
Could you please tell me how ( Syntax ) and where in macro ?<br><br>I am not expert in dialplan variables. I appreciate your help <br><br><hr>Date: Thu, 5 May 2011 12:44:19 -0500<br>From: <a href="mailto:sherwood.mcgowan@gmail.com" target="_blank">sherwood.mcgowan@gmail.com</a><br>
To: <a href="mailto:asterisk-users@lists.digium.com" target="_blank">asterisk-users@lists.digium.com</a><br>Subject: Re: [asterisk-users] missed call notification<a title="Send (Ctrl+Enter)"><span></span></a><br><br>if you saved ${_CALLED_EXT} to the value of ${EXTEN} from within the macro, you'd get 's'....do it while you still have the called number as the EXTEN<br>
<br><div>On Thu, May 5, 2011 at 12:42 PM, satish patel <span dir="ltr"><<a href="mailto:satish_lx@hotmail.com" target="_blank">satish_lx@hotmail.com</a>></span> wrote:<br>
<blockquote style="padding-left:1ex">
<div>
<br><pre>Also check for CANCEL, since this should be the status if the caller<br>hangs up before the call is picked up.<br><br>But CANCEL is return nothing <div><br><br>[macro-stdexten]<br>exten => s,1,Dial(${ARG2}&iax2/${ARG1},20,t) ; Ring the interface, 20 seconds maximum, call screening option (or use P for databased call screening)<br>
exten => s,n,Goto(s-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)<br>;exten => s,n,Hangup()<br><br></div>exten => s-CANCEL,1,Verbose(Hangup call)<br><br>
<br><br>CLI<br> == Spawn extension (macro-stdexten, s, 1) exited non-zero on 'SIP/7527-00000023' in macro 'stdexten'<br> == Spawn extension (from-sip, 7516, 1) exited non-zero on 'SIP/7527-00000023'<br>
<br><br>Look like its going back to original extension :( I hate macro <br></pre><br><br><hr>From: <a href="mailto:satish_lx@hotmail.com" target="_blank">satish_lx@hotmail.com</a><div><br>To: <a href="mailto:asterisk-users@lists.digium.com" target="_blank">asterisk-users@lists.digium.com</a><br>
</div>Date: Thu, 5 May 2011 17:15:53 +0000<div><div></div><div><br>Subject: Re: [asterisk-users] missed call notification<br><br>
You want me to do this in macro-stdexten ? I have following dialplan. I have used "h" extension in original context because you can't you "h" inside macro right ? <br><br>[macro-stdexten]<br>exten => s,1,Dial(${ARG2}&iax2/${ARG1},20,t) ; Ring the interface, 20 seconds maximum, call screening option (or use P for databased call screening)<br>
exten => s,n,Goto(s-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)<br>exten => s,n,Hangup()<br>exten => s-NOANSWER,1,Voicemail(${ARG1},u) ; If unavailable, send to voicemail w/ unavail announce<br>
exten => s-NOANSWER,n,Hangup()<br>exten => s-BUSY,1,Voicemail(${ARG1},b) ; If busy, send to voicemail w/ busy announce<br>exten => s-BUSY,n,Hangup()<br>exten => s-CONGESTION,1,Voicemail(${ARG1},u) ; Like above, write a macro for this case<br>
exten => s-CONGESTION,n,Hangup()<br>exten => _s-.,1,Goto(s-NOANSWER,1) ; Treat anything else as no answer<br>exten => a,1,VoicemailMain(${ARG1}) ; If they press *, send the user into VoicemailMain<br>
<br><br>[from-sip]<br>...blah...blah..<br><br>exten => h,1,System(/var/lib/asterisk/agi-bin/processcallemail.sh ""
"${CALLERID(num)}" "${CALLERID(name)}" "${DIALSTATUS}" "${VMSTATUS}")<br><br><br><br><br><br>> From: <a href="mailto:wcselby@selbytech.com" target="_blank">wcselby@selbytech.com</a><br>
> Date: Thu, 5 May 2011 12:10:09 -0500<br>> To: <a href="mailto:asterisk-users@lists.digium.com" target="_blank">asterisk-users@lists.digium.com</a><br>> Subject: Re: [asterisk-users] missed call notification<br>
> <br>> Set a variable ${_CALLED_EXT} to ${EXTEN} before you hang up the call, then reference that variable in your h exten. <br>> <br>> Thanks,<br>> --Warren Selby, dCAP<br>> <br>> On May 5, 2011, at 11:59 AM, satish patel <<a href="mailto:satish_lx@hotmail.com" target="_blank">satish_lx@hotmail.com</a>> wrote:<br>
> <br>> > Hi All,<br>> > <br>> > I am using <a href="http://www.theschmandts.org/blog/2007/05/05/email-notifications-for-missed-calls-in-asterisk/" target="_blank">http://www.theschmandts.org/blog/2007/05/05/email-notifications-for-missed-calls-in-asterisk/</a> to implement missed call feature. and i modify script to grab email address from voicemail.conf <br>
> > <br>> > 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 <br>> > <br>
> > exten => h,1,System(/var/lib/asterisk/agi-bin/processcallemail.sh "" "${CALLERID(num)}" "${CALLERID(name)}" "${DIALSTATUS}" "${VMSTATUS}")<br>> > <br>> > Calling from 7527<--to--->7101 but i can see only 7527 not dest 7101<br>
> > <br>> > <br>> > CLI outout<br>> > -- Executing [h@from-sip:1] System("SIP/7527-0000000d", "/var/lib/asterisk/agi-bin/processcallemail.sh "" "7527" "Guest" "CANCEL" """) in new stack<br>
> > shirley*CLI> exit<br>> > <br>> > --<br>> > _____________________________________________________________________<br>> > -- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
> > New to Asterisk? Join us for a live introductory webinar every Thurs:<br>> > <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>> > <br>> > asterisk-users mailing list<br>
> > To UNSUBSCRIBE or update options visit:<br>> > <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>> <br>> --<br>
> _____________________________________________________________________<br>> -- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>> New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
> <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>> <br>> asterisk-users mailing list<br>> To UNSUBSCRIBE or update options visit:<br>> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
                                          
<br></div></div>--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --
New to Asterisk? Join us for a live introductory webinar every Thurs:
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a>
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a>                                            </div>
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br><br clear="all"><br>-- <br>Sherwood McGowan<br>Telecommunications and VOIP Consultant<br>
<br>
<br>--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --
New to Asterisk? Join us for a live introductory webinar every Thurs:
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a>
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a>                                           
<br></div></div>--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --
New to Asterisk? Join us for a live introductory webinar every Thurs:
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a>
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a>                                            </div>
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br><br clear="all"><br>-- <br>Sherwood McGowan<br>Telecommunications and VOIP Consultant<br>
<br>