<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)">
<style>
<!--
 /* Font Definitions */
 @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;}
 /* 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-compose;
        font-family:"Times New Roman","serif";
        color:windowtext;}
.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">I have a macro that checks to see if a dundi route exists, if it does it attempts to dial it.&nbsp; The remote end can set the chan as unavailable, or busy.&nbsp; If it does the call immediately hangs up instead of returning to the macro for more
 processing.&nbsp; Is there a way to force it to return?<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</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>&nbsp;</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>&nbsp;</o:p></p>
<p class="MsoNormal">[local-dundi]<o:p></o:p></p>
<p class="MsoNormal">exten =&gt; _817NXXXXXX,1,Macro(dundi-lookup,${EXTEN})<o:p></o:p></p>
<p class="MsoNormal">exten =&gt; _817NXXXXXX,n,Macro(trunkdial,Zap/G0/w${EXTEN})<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">exten =&gt; _NXXNXXXXXX,1,Macro(trunkdial,Zap/G0/w${EXTEN})<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">[macro-dundi-lookup]<o:p></o:p></p>
<p class="MsoNormal">exten =&gt; s,1,Goto(${ARG1},1)<o:p></o:p></p>
<p class="MsoNormal">exten =&gt; s,n,MacroExit<o:p></o:p></p>
<p class="MsoNormal">include =&gt; dundi-priv-local<o:p></o:p></p>
<p class="MsoNormal">include =&gt; dundi-priv-lookup<o:p></o:p></p>
<p class="MsoNormal">include =&gt; dundi-e164-lookup<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">[dundi-priv-local]<o:p></o:p></p>
<p class="MsoNormal">exten =&gt; _4XX,1,Noop<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">[dundi-priv-lookup]<o:p></o:p></p>
<p class="MsoNormal">switch =&gt; DUNDi/priv<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">[dundi-e164-lookup]<o:p></o:p></p>
<p class="MsoNormal">switch =&gt; DUNDi/e164<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</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>&nbsp;</o:p></p>
<p class="MsoNormal">[dundi-e164]<o:p></o:p></p>
<p class="MsoNormal">exten =&gt; _817.,1,Set(DID=${EXTEN:6})<o:p></o:p></p>
<p class="MsoNormal">exten =&gt; _817.,n,Noop(${DID})<o:p></o:p></p>
<p class="MsoNormal">exten =&gt; _817.,n,Set(GROUP(IAX)=incoming)<o:p></o:p></p>
<p class="MsoNormal">exten =&gt; _817.,n,GotoIf($[${MATH(${GROUP_COUNT(incoming@IAX)}&#43;${GROUP_COUNT(outgoing@IAX)},i)}&gt;10]?fail)<o:p></o:p></p>
<p class="MsoNormal">exten =&gt; _817.,n,Goto(from-pri,${DID},1)<o:p></o:p></p>
<p class="MsoNormal">exten =&gt; _817.,n(fail),Set(DIALSTATUS=CHANUNAVAIL)<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">If the total for all IAX calls is above 10, I want the call to fail so it&#8217;ll fall back and use ZAP instead of IAX.&nbsp; Instead the call just hangs up at the CALLING system.<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</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>
</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>