<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
You guys awesome! its working now only i need to modify script and do some trimming <br><br>Thanks a lots again..<br><br>-S<br><br><hr id="stopSpelling">From: wcselby@selbytech.com<br>Date: Thu, 5 May 2011 13:20:59 -0500<br>To: asterisk-users@lists.digium.com<br>Subject: Re: [asterisk-users] missed call notification<br><br><div>And Sherwood beats me to the punch again :). <br><br>Thanks,<div>--Warren Selby, dCAP</div></div><div><br>On May 5, 2011, at 1:15 PM, Sherwood McGowan <<a href="mailto:sherwood.mcgowan@gmail.com">sherwood.mcgowan@gmail.com</a>> wrote:<br><br></div><div></div><blockquote><div>No, the variables are channel specific except for when they're inherited, which doesn't affect you here<br><br><div class="ecxgmail_quote">On Thu, May 5, 2011 at 1:02 PM, satish patel <span dir="ltr"><<a href="mailto:satish_lx@hotmail.com"></a><a href="mailto:satish_lx@hotmail.com">satish_lx@hotmail.com</a>></span> wrote:<br>
<blockquote class="ecxgmail_quote" style="border-left: 1px solid rgb(204, 204, 204); 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="ecxim"><br><hr>From: <a href="mailto:satish_lx@hotmail.com"></a><a href="mailto:satish_lx@hotmail.com">satish_lx@hotmail.com</a><br>To: <a href="mailto:asterisk-users@lists.digium.com"></a><a href="mailto:asterisk-users@lists.digium.com">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"></a><a href="mailto:sherwood.mcgowan@gmail.com">sherwood.mcgowan@gmail.com</a><br>
To: <a href="mailto:asterisk-users@lists.digium.com"></a><a href="mailto:asterisk-users@lists.digium.com">asterisk-users@lists.digium.com</a><br>Subject: Re: [asterisk-users] missed call notification<a title="Send (Ctrl+Enter)" target="_blank"><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"></a><a href="mailto:satish_lx@hotmail.com">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><br><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><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><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"></a><a href="mailto:satish_lx@hotmail.com">satish_lx@hotmail.com</a><div><br>To: <a href="mailto:asterisk-users@lists.digium.com"></a><a href="mailto:asterisk-users@lists.digium.com">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"></a><a href="mailto:wcselby@selbytech.com">wcselby@selbytech.com</a><br>
> Date: Thu, 5 May 2011 12:10:09 -0500<br>> To: <a href="mailto:asterisk-users@lists.digium.com"></a><a href="mailto:asterisk-users@lists.digium.com">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"></a><a href="mailto:satish_lx@hotmail.com">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"></a><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"></a><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"></a><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"></a><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"></a><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"></a><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"></a><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"></a><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"></a><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"></a><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"></a><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"></a><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"></a><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"></a><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"></a><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"></a><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"></a><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"></a><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"></a><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"></a><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"></a><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"></a><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>
</div></blockquote><blockquote><div><span>--</span><br><span>_____________________________________________________________________</span><br><span>-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --</span><br><span>New to Asterisk? Join us for a live introductory webinar every Thurs:</span><br><span> <a href="http://www.asterisk.org/hello" target="_blank"></a><a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a></span><br><span></span><br><span>asterisk-users mailing list</span><br><span>To UNSUBSCRIBE or update options visit:</span><br><span> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank"></a><a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a></span></div></blockquote><br>--
_____________________________________________________________________
-- 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                                            </body>
</html>