<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><style>
<!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Times New Roman","serif";
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Times New Roman","serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="Section1">
<p class="MsoNormal"><span style="color:#1F497D">Nevermind, helps when you reload the diaplan at BOTH ends
</span><span style="font-family:Wingdings;color:#1F497D">J</span><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com]
<b>On Behalf Of </b>Jeremy Mann<br>
<b>Sent:</b> Thursday, April 24, 2008 9:48 AM<br>
<b>To:</b> 'Asterisk Users Mailing List - Non-Commercial Discussion'<br>
<b>Subject:</b> [asterisk-users] Macro/Goto Help<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have a macro that checks to see if a dundi route exists, if it does it attempts to dial it. The remote end can set the chan as unavailable, or busy. If it does the call immediately hangs up instead of returning to the macro for more
processing. Is there a way to force it to return?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Logic from extensions.conf is below, first is from the system making the call, the second is from the system receiving the call:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">(CALLING SYSTEM)<o:p></o:p></p>
<p class="MsoNormal">The DUNDi system makes calls via IAX using a peer named priv<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">[local-dundi]<o:p></o:p></p>
<p class="MsoNormal">exten => _817NXXXXXX,1,Macro(dundi-lookup,${EXTEN})<o:p></o:p></p>
<p class="MsoNormal">exten => _817NXXXXXX,n,Macro(trunkdial,Zap/G0/w${EXTEN})<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">exten => _NXXNXXXXXX,1,Macro(trunkdial,Zap/G0/w${EXTEN})<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">[macro-dundi-lookup]<o:p></o:p></p>
<p class="MsoNormal">exten => s,1,Goto(${ARG1},1)<o:p></o:p></p>
<p class="MsoNormal">exten => s,n,MacroExit<o:p></o:p></p>
<p class="MsoNormal">include => dundi-priv-local<o:p></o:p></p>
<p class="MsoNormal">include => dundi-priv-lookup<o:p></o:p></p>
<p class="MsoNormal">include => dundi-e164-lookup<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">[dundi-priv-local]<o:p></o:p></p>
<p class="MsoNormal">exten => _4XX,1,Noop<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">[dundi-priv-lookup]<o:p></o:p></p>
<p class="MsoNormal">switch => DUNDi/priv<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">[dundi-e164-lookup]<o:p></o:p></p>
<p class="MsoNormal">switch => DUNDi/e164<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">(CALLED SYSTEM)<o:p></o:p></p>
<p class="MsoNormal">The IAX peer priv is dropped into the following context in the dialplan<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">[dundi-e164]<o:p></o:p></p>
<p class="MsoNormal">exten => _817.,1,Set(DID=${EXTEN:6})<o:p></o:p></p>
<p class="MsoNormal">exten => _817.,n,Noop(${DID})<o:p></o:p></p>
<p class="MsoNormal">exten => _817.,n,Set(GROUP(IAX)=incoming)<o:p></o:p></p>
<p class="MsoNormal">exten => _817.,n,GotoIf($[${MATH(${GROUP_COUNT(incoming@IAX)}+${GROUP_COUNT(outgoing@IAX)},i)}>10]?fail)<o:p></o:p></p>
<p class="MsoNormal">exten => _817.,n,Goto(from-pri,${DID},1)<o:p></o:p></p>
<p class="MsoNormal">exten => _817.,n(fail),Set(DIALSTATUS=CHANUNAVAIL)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">If the total for all IAX calls is above 10, I want the call to fail so it’ll fall back and use ZAP instead of IAX. Instead the call just hangs up at the CALLING system.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The from-pri logic has been excluded since it has no bearing on the question at hand.<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<div class="MsoNormal" align="center" style="text-align:center"><span style="font-size:12.0pt">
<hr size="2" width="100%" align="center">
</span></div>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Arial","sans-serif";
color:gray">This e-mail, facsimile, or letter and any files or attachments transmitted with it contains information that is confidential and privileged. This information is
intended only for the use of the individual(s) and entity(ies) to whom it is addressed. If you are the intended recipient, further disclosures are prohibited without proper authorization. If you are not the intended recipient, any disclosure, copying, printing,
or use of this information is strictly prohibited and possibly a violation of federal or state law and regulations. If you have received this information in error, please notify Texas Health Management Group immediately at 1-817-310-4999. Texas Health Management
Group, its subsidiaries, and affiliates hereby claim all applicable privileges related to this information.</span><span style="font-size:12.0pt"><o:p></o:p></span></p>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="1">This e-mail, facsimile, or letter and any files or attachments transmitted with it contains information that is confidential and privileged. This information is intended only for the use of the individual(s) and entity(ies)
to whom it is addressed. If you are the intended recipient, further disclosures are prohibited without proper authorization. If you are not the intended recipient, any disclosure, copying, printing, or use of this information is strictly prohibited and possibly
a violation of federal or state law and regulations. If you have received this information in error, please notify Texas Health Management Group immediately at 1-817-310-4999. Texas Health Management Group, its subsidiaries, and affiliates hereby claim all
applicable privileges related to this information.<br>
</font>
</body>
</html>