<div dir="ltr">Hello,<div><br></div><div>I've gone through the dialplan documentation several times and am having trouble getting inbound calls from the PSTN to land on my extension 1000. I've followed the example here as best I can, but what I'm seeing are 482 Request Merged and Bandwidth continuing to hammer the server with INVITE after INVITE.</div>
<div><br></div><div>I've verified the firewall is open and can make outbound calls and calls between two Chrome browsers, but seem to have trouble setting up the dialplan for PSTN to Chrome.</div><div><br></div><div>
sip_profiles/external/bandwidth.com.xml:<br>
</div><div><br></div><div><div><include></div><div> <gateway name="<a href="http://bandwidth.com">bandwidth.com</a>"></div><div> <param name="username" value="your user name"/></div>
<div> <param name="password" value="your password"/></div><div> <param name="from-user" value="fromuser"/></div><div> <param name="from-domain" value="67.X.X.X"/></div>
<div> <param name="proxy" value="67.X.X.X"/></div><div> <param name="expire-seconds" value="600"/></div><div> <param name="register" value="false"/></div>
<div> <param name="retry_seconds" value="30"/></div><div> <param name="extension" value=""/></div><div> <param name="context" value="public"/></div>
<div> <param name="avp" value="true"/></div><div> </gateway></div><div></include></div></div><div><br></div><div><br></div><div>/dialplan/public/bandwidth.com.xml:</div><div><br>
</div><div>The way I understand this is that I match the number **being called in the public context** and then that is transferred to the default context. The number I'm calling is 503389xxxx and in my INVITE it shows as +1503389xxxx. I've tried matching the destination number as XXXxxxxxxx, 503389xxxx, and \+1(5033896xxx) but I get the same result every time. Can someone please explain how to tell which extension context my calls are going through? Putting the console in DEBUG mode doesn't show me how these patterns are being matched...</div>
<div><br></div><div><div><include></div><div> <extension name="<a href="http://bandwidth.com">bandwidth.com</a> inbound"></div><div> <condition field="context" data="public"/></div>
<div> <!-- The following line detects the e164 format on incoming calls --></div><div> <!-- Note: The leading '+' needs to be escaped by adding a '\' before it --></div><div> <condition field="destination_number" expression="^(XXXxxxxxxx)$"></div>
<div> <action application="set" data="domain_name=$${domain}"/></div><div> <action application="transfer" data="$1 XML default"/></div><div> </condition></div>
<div> </extension></div><div><br></div><div></include></div></div><div><br></div><div><br></div><div>/dialplan/default/bandwidth.com.xml:</div><div><br></div><div>In the default context, you first see my outbound config, which works like a charm. But the second block, taken from Example 9 in the documentation, is something I don't quite understand. I'm pattern matching a 10 digit number, which is what I'm calling... I've tried matching this to XXXxxxxxxx, 503389xxxx and \+1503389xxxx with no change....</div>
<div><br></div><div><div><include></div><div><extension name="<a href="http://bandwidth.com">bandwidth.com</a> Outbound 9.10d"></div><div> <!-- The following line detects outbound calls with a 9 as a dropped prefix --></div>
<div> <!-- The line after changes the 10 digit number into 11 digit with a leading '+' --></div><div> <condition field="destination_number" expression="^9(\d{10})$"></div><div>
<action application="bridge" data="sofia/gateway/<a href="http://bandwidth.com/+1$1">bandwidth.com/+1$1</a>"/></div>
<div> </condition></div><div></extension></div><div><br></div><div> <!-- <a href="http://wiki.freeswitch.org/wiki/Dialplan_XML#Example_9:_Routing_DID_to_an_extension">http://wiki.freeswitch.org/wiki/Dialplan_XML#Example_9:_Routing_DID_to_an_extension</a> --></div>
<div> <extension name="Local_Extensioi2"></div><div> <condition field="destination_number" expression="^(XXXxxxxxxx)$"></div><div> <action application="set" data="dialed_ext=$1"/></div>
<div> </condition></div><div> <condition field="destination_number" expression="^${caller_id_number}$"></div><div> <action application="set" data="voicemail_authorized=${sip_authorized}"/></div>
<div> <action application="answer"/></div><div> <action application="sleep" data="1000"/></div><div> <action application="voicemail" data="check default $${domain} ${dialed_ext}"/></div>
<div> <anti-action application="ring_ready"/></div><div> <anti-action application="set" data="call_timeout=10"/></div><div> <anti-action application="set" data="hangup_after_bridge=true"/></div>
<div> <anti-action application="set" data="continue_on_fail=true"/></div><div> <anti-action application="bridge" data="USER/1000@$${domain}"/></div><div> <anti-action application="answer"/></div>
<div> <anti-action application="sleep" data="1000"/></div><div> <anti-action application="voicemail" data="default $${domain} ${dialed_ext}"/></div><div> </condition></div>
<div> </extension></div><div></include></div><div> </div></div><div><br></div><div>In the logs, I just see looping over and over and over again. Why is it using "internal" instead of "external"? Why is it showing my 971 callerid and not the number I dialed? Where is the part of the logs that show all of the Rexex patterns being parsed to determine what context to use? </div>
<div><br></div><div>
<p class="">freeswitch@ip-10-166-245-111> 2013-09-16 19:40:59.695046 [NOTICE] switch_channel.c:1030 New Channel sofia/internal/+<a href="mailto:1971238yyyy@67.231.1.115">1971238yyyy@67.231.1.115</a> [1902fee8-f2d9-4678-b841-bf59948c4937]</p>
<p class="">2013-09-16 19:40:59.695046 [DEBUG] switch_core_session.c:1006 Send signal sofia/internal/+<a href="mailto:1971238yyyy@67.231.1.115">1971238yyyy@67.231.1.115</a> [BREAK]</p>
<p class="">2013-09-16 19:40:59.695046 [DEBUG] switch_core_session.c:1006 Send signal sofia/internal/+<a href="mailto:1971238yyyy@67.231.1.115">1971238yyyy@67.231.1.115</a> [BREAK]</p>
<p class="">2013-09-16 19:40:59.695046 [DEBUG] switch_core_state_machine.c:418 (sofia/internal/+<a href="mailto:1971238yyyy@67.231.1.115">1971238yyyy@67.231.1.115</a>) Running State Change CS_NEW</p>
<p class="">2013-09-16 19:40:59.695046 [DEBUG] switch_core_state_machine.c:436 (sofia/internal/+<a href="mailto:1971238yyyy@67.231.1.115">1971238yyyy@67.231.1.115</a>) State NEW</p>
<p class="">2013-09-16 19:40:59.715055 [DEBUG] sofia.c:8003 IP 67.231.4.195 Rejected by acl "domains". Falling back to Digest auth.</p>
<p class="">2013-09-16 19:40:59.715055 [DEBUG] switch_core_session.c:1006 Send signal sofia/internal/+<a href="mailto:1971238yyyy@67.231.1.115">1971238yyyy@67.231.1.115</a> [BREAK]</p>
<p class="">2013-09-16 19:40:59.715055 [DEBUG] sofia.c:1787 detaching session 1902fee8-f2d9-4678-b841-bf59948c4937</p>
<p class="">2013-09-16 19:41:00.055048 [NOTICE] switch_channel.c:1030 New Channel sofia/internal/+<a href="mailto:1971238yyyy@67.231.9.59">1971238yyyy@67.231.9.59</a> [3295c812-2f36-4d31-8cd4-ef9bbd5cdbdb]</p>
<p class="">2013-09-16 19:41:00.055048 [DEBUG] switch_core_session.c:1006 Send signal sofia/internal/+<a href="mailto:1971238yyyy@67.231.9.59">1971238yyyy@67.231.9.59</a> [BREAK]</p>
<p class="">2013-09-16 19:41:00.055048 [DEBUG] switch_core_session.c:1006 Send signal sofia/internal/+<a href="mailto:1971238yyyy@67.231.9.59">1971238yyyy@67.231.9.59</a> [BREAK]</p>
<p class="">2013-09-16 19:41:00.055048 [DEBUG] switch_core_state_machine.c:418 (sofia/internal/+<a href="mailto:1971238yyyy@67.231.9.59">1971238yyyy@67.231.9.59</a>) Running State Change CS_NEW</p>
<p class="">2013-09-16 19:41:00.055048 [DEBUG] switch_core_state_machine.c:436 (sofia/internal/+<a href="mailto:1971238yyyy@67.231.9.59">1971238yyyy@67.231.9.59</a>) State NEW</p>
<p class="">2013-09-16 19:41:00.075081 [DEBUG] sofia.c:8003 IP 67.231.4.195 Rejected by acl "domains". Falling back to Digest auth.</p>
<p class="">2013-09-16 19:41:00.075081 [DEBUG] switch_core_session.c:1006 Send signal sofia/internal/+<a href="mailto:1971238yyyy@67.231.9.59">1971238yyyy@67.231.9.59</a> [BREAK]</p>
<p class="">2013-09-16 19:41:00.075081 [DEBUG] sofia.c:1787 detaching session 3295c812-2f36-4d31-8cd4-ef9bbd5cdbdb</p></div><div><br></div><div>I've poured through the dialplan docs and examples, but I really believe I could benefit from some explanation based on the problems I'm facing, which I'm sure is just me missing some key piece of insight.</div>
<div><br></div><div>Oh I also just commented out the acl lines in both internal and external.xml, which removed the acl warnings, but things still loop.</div><div><br></div><div>Thank you!<br clear="all"><div><div dir="ltr">
<div><br></div><div>James Mortensen<br></div><div><br><div><br></div></div></div></div>
</div></div>