<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
How this guys using "h" extension in macro http://www.theschmandts.org/blog/?p=28<br><br>why its not working for me only. I am the caller and if i hangup then it should parse "h" extension right ? <br><br><hr id="stopSpelling">From: satish_lx@hotmail.com<br>To: asterisk-users@lists.digium.com<br>Date: Thu, 21 Apr 2011 18:16:00 +0000<br>Subject: Re: [asterisk-users] missed call notification<br><br>
<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
<style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}
</style>
I am always googleing before putting anything here.. I was confused that's why i came across to you guys! Still i am confused :( <br><br>-S <br><br><hr id="ecxstopSpelling">Date: Thu, 21 Apr 2011 13:01:52 -0500<br>From: sherwood.mcgowan@gmail.com<br>To: asterisk-users@lists.digium.com<br>Subject: Re: [asterisk-users] missed call notification<br><br><div class="ecxgmail_quote">On Thu, Apr 21, 2011 at 12:26 PM, satish patel <span dir="ltr"><<a href="mailto:satish_lx@hotmail.com">satish_lx@hotmail.com</a>></span> wrote:<br><blockquote class="ecxgmail_quote" style="padding-left: 1ex;">
<div>
Hi,<br><br>I am looking at <a href="http://www.theschmandts.org/blog/?p=28" target="_blank">http://www.theschmandts.org/blog/?p=28</a> to setup missed call notification but i am having issue. following is my dialplan <br>
<br>[macro-stdexten]<br>exten => s,1,Dial(${ARG2})<br>exten => s,2,Goto(s-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)<br>exten => s-NOANSWER,1,Voicemail(${ARG1},u) ; If unavailable, send to voicemail w/ unavail announce<br>
exten => s-NOANSWER,2,Goto(default,s,1) ; If they press #, return to start<br>exten => s-BUSY,1,Voicemail(${ARG1},b) ; If busy, send to voicemail w/ busy announce<br>exten => s-BUSY,2,Goto(default,s,1) ; If they press #, return to start<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>
exten => h,1,System(/var/lib/asterisk/agi-bin/processcallemail.sh "${ARG3}" "${CALLERID(num)}" "${CALLERID(name)}" "${DIALSTATUS}" "${VMSTATUS}" "${EXTEN}")<br>
<br><br>[from-sip]<br>exten => _7[0123]XX,1,macro(stdexten,${EXTEN},sip/${EXTEN})<br><br><br><br>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 ?<br>
<br> -- Executing [7207@from-sip:1] Macro("SIP/7101-0000000a", "stdexten,7207,sip/7207") in new stack<br> -- Executing [s@macro-stdexten:1] Dial("SIP/7101-0000000a", "sip/7207") in new stack<br>
== Using SIP RTP CoS mark 5<br> -- Called 7207<br> -- SIP/7207-0000000b is ringing<br> == Spawn extension (macro-stdexten, s, 1) exited non-zero on 'SIP/7101-0000000a' in macro 'stdexten'<br> == Spawn extension (from-sip, 7207, 1) exited non-zero on 'SIP/7101-0000000a'<br>
-- Executing [h@from-sip:1] Hangup("SIP/7101-0000000a", "") in new stack<br> == Spawn extension (from-sip, h, 1) exited non-zero on 'SIP/7101-0000000a' <br></div></blockquote><div><br>... google....<br>
<a href="http://www.voip-info.org/wiki/view/Asterisk+cmd+Macro" target="_blank">http://www.voip-info.org/wiki/view/Asterisk+cmd+Macro</a><br>The Useful info was only a few lines from the beginning:<br><strong>"'h' extension:</strong> <i>If a macro executes a Dial() and the
called party hangs up, then the control passes to the 'h' extension of
the calling context.
<br>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() - <strong>in this case the 'h' extension of the Macro context is used</strong>, not the 'h' extension of the calling context.)
<br><em>Tilghman, May 2010:</em> 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."</i><br></div></div><br>-- <br>Sherwood McGowan<br>Telecommunications and VOIP Consultant<br><br>
<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                                           
<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>