<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
You want me to do this in macro-stdexten ? I have following dialplan.&nbsp; I have used "h" extension in original context because you can't you "h" inside macro right ? <br><br>[macro-stdexten]<br>exten =&gt; s,1,Dial(${ARG2}&amp;iax2/${ARG1},20,t)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Ring the interface, 20 seconds maximum, call screening option (or use P for databased call screening)<br>exten =&gt; s,n,Goto(s-${DIALSTATUS},1)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)<br>exten =&gt; s,n,Hangup()<br>exten =&gt; s-NOANSWER,1,Voicemail(${ARG1},u)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; If unavailable, send to voicemail w/ unavail announce<br>exten =&gt; s-NOANSWER,n,Hangup()<br>exten =&gt; s-BUSY,1,Voicemail(${ARG1},b)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; If busy, send to voicemail w/ busy announce<br>exten =&gt; s-BUSY,n,Hangup()<br>exten =&gt; s-CONGESTION,1,Voicemail(${ARG1},u)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Like above, write a macro for this case<br>exten =&gt; s-CONGESTION,n,Hangup()<br>exten =&gt; _s-.,1,Goto(s-NOANSWER,1)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Treat anything else as no answer<br>exten =&gt; a,1,VoicemailMain(${ARG1})&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; If they press *, send the user into VoicemailMain<br><br><br>[from-sip]<br>...blah...blah..<br><br>exten =&gt; h,1,System(/var/lib/asterisk/agi-bin/processcallemail.sh "" 
"${CALLERID(num)}" "${CALLERID(name)}" "${DIALSTATUS}" "${VMSTATUS}")<br><br><br><br><br><br>&gt; From: wcselby@selbytech.com<br>&gt; Date: Thu, 5 May 2011 12:10:09 -0500<br>&gt; To: asterisk-users@lists.digium.com<br>&gt; Subject: Re: [asterisk-users] missed call notification<br>&gt; <br>&gt; Set a variable ${_CALLED_EXT} to ${EXTEN} before you hang up the call, then reference that variable in your h exten. <br>&gt; <br>&gt; Thanks,<br>&gt; --Warren Selby, dCAP<br>&gt; <br>&gt; On May 5, 2011, at 11:59 AM, satish patel &lt;satish_lx@hotmail.com&gt; wrote:<br>&gt; <br>&gt; &gt; Hi All,<br>&gt; &gt; <br>&gt; &gt; 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 <br>&gt; &gt; <br>&gt; &gt; 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>&gt; &gt; <br>&gt; &gt; exten =&gt; h,1,System(/var/lib/asterisk/agi-bin/processcallemail.sh "" "${CALLERID(num)}" "${CALLERID(name)}" "${DIALSTATUS}" "${VMSTATUS}")<br>&gt; &gt; <br>&gt; &gt; Calling from 7527&lt;--to---&gt;7101  but i can see only 7527 not dest 7101<br>&gt; &gt; <br>&gt; &gt; <br>&gt; &gt; CLI outout<br>&gt; &gt;     -- Executing [h@from-sip:1] System("SIP/7527-0000000d", "/var/lib/asterisk/agi-bin/processcallemail.sh "" "7527" "Guest" "CANCEL" """) in new stack<br>&gt; &gt; shirley*CLI&gt; exit<br>&gt; &gt; <br>&gt; &gt; --<br>&gt; &gt; _____________________________________________________________________<br>&gt; &gt; -- Bandwidth and Colocation Provided by http://www.api-digital.com --<br>&gt; &gt; New to Asterisk? Join us for a live introductory webinar every Thurs:<br>&gt; &gt;               http://www.asterisk.org/hello<br>&gt; &gt; <br>&gt; &gt; asterisk-users mailing list<br>&gt; &gt; To UNSUBSCRIBE or update options visit:<br>&gt; &gt;   http://lists.digium.com/mailman/listinfo/asterisk-users<br>&gt; <br>&gt; --<br>&gt; _____________________________________________________________________<br>&gt; -- Bandwidth and Colocation Provided by http://www.api-digital.com --<br>&gt; New to Asterisk? Join us for a live introductory webinar every Thurs:<br>&gt;                http://www.asterisk.org/hello<br>&gt; <br>&gt; asterisk-users mailing list<br>&gt; To UNSUBSCRIBE or update options visit:<br>&gt;    http://lists.digium.com/mailman/listinfo/asterisk-users<br>                                               </body>
</html>