<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt">Michael,<br><br>Thanks for your help.&nbsp; I was able to get it work, however, I would like your opinion as how to do this correctly as I have a hunch I may have opened up some security risks or have gone against freeswitch best practices.&nbsp; If not, just let me know and I will leave it as is.<br><br>I modified the public.xml file under /conf/dialplan/<br><div><br>I uncommented the following:<br><br>&lt;!-- TQL<br>I removed this because of the auto attendant to hunt group to external number error.<br>I am sure there is some security or other issue in doing this.<br>But hey, at least my hunt groups work.<br><br>&nbsp;&nbsp;&nbsp; &lt;extension name="unloop"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;condition field="${unroll_loops}" expression="^true$"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 &lt;condition field="${sip_looped_call}" expression="^true$"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="deflect" data="${destination_number}"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/condition&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/extension&gt;<br>--&gt;<br><br>I added the following:<br><br>&lt;!-- TQL<br>I added this to pick up calls being sent to voicemail.<br>Note, put this after public_extensions<br>--&gt;<br><br>&nbsp;&nbsp;&nbsp; &lt;extension name="send_to_voicemail"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;condition field="destination_number" expression="^\*99(\d{3,6})$"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="answer"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="sleep" data="1000"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="set" data="dialed_extension=$1"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action
 application="export" data="dialed_extension=$1"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="voicemail" data="default ${domain_name} ${dialed_extension}"/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/condition&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/extension&gt;<br><br>&lt;!-- TQL<br>I added this to pick up the hunt groups. <br>Note, put this after the public/*.xml includes<br>--&gt;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;X-PRE-PROCESS cmd="include" data="default/*.xml"/&gt;<br><br><br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Michael Collins &lt;msc@freeswitch.org&gt;<br><b><span style="font-weight: bold;">To:</span></b> William Traenkle &lt;will.traenkle@yahoo.com&gt;<br><b><span
 style="font-weight: bold;">Sent:</span></b> Mon, March 15, 2010 5:11:57 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: IVR to hunt group to external destination fails // direct to hunt  group to external desitnation succeeds<br></font><br>
<br><br><div class="gmail_quote">On Mon, Mar 15, 2010 at 4:22 PM, William Traenkle <span dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:will.traenkle@yahoo.com" target="_blank" href="mailto:will.traenkle@yahoo.com">will.traenkle@yahoo.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><p class="MsoNormal">When a hunt group is accessed from the main IVR, the hunt group dials
an internal extension via correctly but when trying to dial an
external number such a cell phone via sip uri it is unable to connect
or ring the cell phone and it waits the correct timeout period before it
goes to voicemail.<br>
<br>However, if you dial the hunt group directly without going through the main IVR, the external number such as cell phone that uses sip uri to connect to it work perfect.&nbsp; <br></p><p class="MsoNormal"><br></p><p class="MsoNormal">
There is only an issue when the hunt group is accessed from the main IVR when dialing an external number using sip uri.<span><br>
<br>
1) fs_cli output for successful call scenario directly to x7000 hunt group: <a rel="nofollow" target="_blank" href="http://pastebin.com/Q1ayXkNR"><span>http://pastebin.com/Q1ayXkNR</span></a><br>
<br>
2) fs_cli output for failed call scenario x5002 IVR to x7000 hunt group: <a rel="nofollow" target="_blank" href="http://pastebin.com/FaxuGdJ3"><span>http://pastebin.com/FaxuGdJ3</span></a></span></p></div></div></blockquote>
<div>In #2 your call to 7000 is hitting the public context. Most likely this isn't what you were anticipating. Try handling 7000 in the public context. Find the public_extensions dp entry and update your regex there:<br>
&lt;condition field="destination_number" expression="^(10[01][0-9]|7000)$"&gt;<br><br>reloadxml and try again. If it works then consider creating a public context extension that specifically handles these calls, perhaps checking the IP address of the source of the call. <br>
-MC<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">
<p class="MsoNormal"><span><br>
<br><span>
3) autoattendant_5002.js script: <a target="_blank" href="http://pastebin.com/FaxuGdJ3">http://pastebin.com/FaxuGdJ3</a></span><br>
<br>
4) huntgroup_7000.js script: <a rel="nofollow" target="_blank" href="http://pastebin.com/wNX9K7Ab"><span>http://pastebin.com/wNX9K7Ab</span></a></span></p><p class="MsoNormal"><span><a rel="nofollow" target="_blank" href="http://pastebin.com/wNX9K7Ab"><span><br>
</span></a> </span></p> 



<p class="MsoNormal"><span> </span><span>5) Dialplan default.xml: </span>
</p><p class="MsoNormal"><span style="font-size: 12pt;"><a rel="nofollow" target="_blank" href="http://pastebin.com/iAbNSW9E"><span>http://pastebin.com/iAbNSW9E</span></a> </span></p><p class="MsoNormal"><span>&nbsp;</span></p>
 

<p class="MsoNormal" style="margin-bottom: 12pt;"><span>If you require additional information or have any other
questions, please let me know.<br>
<br>
Thanks,<br>
<br>
-Will</span></p><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Tahoma" size="2"><hr size="1">
<b><span style="font-weight: bold;">From:</span></b> Michael Collins &lt;<a rel="nofollow" ymailto="mailto:msc@freeswitch.org" target="_blank" href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>&gt;<br><b><span style="font-weight: bold;">To:</span></b> <a rel="nofollow" ymailto="mailto:freeswitch-users@lists.freeswitch.org" target="_blank" href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a><br>
<b><span style="font-weight: bold;">Sent:</span></b> Tue, March 9, 2010 11:00:53 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [Freeswitch-users] IVR to hunt group to external destination fails // direct to hunt group to external desitnation succeeds<br>
</font><br>
<br><br><div class="gmail_quote">On Tue, Mar 9, 2010 at 9:55 PM, William Traenkle <span dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:will.traenkle@yahoo.com" target="_blank" href="mailto:will.traenkle@yahoo.com">will.traenkle@yahoo.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div>When a hunt group is accessed from the main IVR, the hunt group dials an internal extension via transfer correctly but when trying to dial an external number such a cell phone via sip uri it is unable to connect or ring the phone but it waits the correct timeout period before it goes to voicemail.<br>

<br>However, if you access the hunt group directly without going through the main IVR, all works perfectly.&nbsp; <br><br>Any ideas where I should look and what line of code I might be missing?<br><br></div></div></div></blockquote>

<div><br>Start by capturing the fs_cli debug output for the IVR call. Look through the debug lines for clues as to what is happening with your call. The symptom "unable to connect" has many possible causes, so try to locate the debug lines leading up to the attempt to bridge the SIP URI. If you want community help then pastebin the full debug log plus the relevant XML: the dialplan extension and the IVR definition.<br>

-MC<br><br></div></div>
</div></div>
</div><br>

      </div></blockquote></div><br>
</div></div>
</div><br>



      </body></html>