<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">a call coming from sofia would never hit that in the dialplan. &nbsp;That extension is useful for dialing a sip url from mod_portaudio.<div><br></div><div>Mike</div><div><br><div><div>On Aug 22, 2009, at 10:09 AM, Henry Huang wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Jason:<br><br>I fully understand how the regex works in the dialplan. If you look closely in my original email and check out the pastebin. You will see that sofia does not pass the "sip:" to dialplan. I can do any combination of letters that dials from my softphone, and it will pass them to the dialplan. but if I put "sip:" in the front of my dial string. The "sip:" gets trunkated by sofia module so does the "@xx.xx.xx.xx" gets trunkated before it reaches dialplan to for regex matching. Therefore I say you can never reach the example sip uri extension because sofia will trunkate "sip:" . <br> <br>Here is the excert from pastebin: <br><span style="color: rgb(51, 51, 255);">3.&nbsp; &nbsp; INVITE sip:</span><span style="color: rgb(51, 51, 255);" class="nu0">1009</span><span style="color: rgb(51, 51, 255);">@</span><span style="color: rgb(51, 51, 255);" class="nu0">4.2.2.2</span><span style="color: rgb(51, 51, 255);"> SIP/</span><span style="color: rgb(51, 51, 255);" class="nu0">2.0</span><br> <span style="color: rgb(204, 0, 0);">(line 3 , the freeswitch has successfuly received my dialying to sip: <a href="mailto:1009@4.2.2.2">1009@4.2.2.2</a>)</span><div style="color: rgb(51, 51, 255);" class="de1"><span class="re1"><div class="de2"> <span class="nu0">73.&nbsp; 2009</span><span class="nu0">-08</span><span class="nu0">-20</span> <span class="nu0">16</span>:<span class="nu0">37</span>:<span class="nu0">28.982772</span> <span class="br0">[</span>INFO<span class="br0">]</span> mod_dialplan_xml.c:<span class="nu0">315</span> Processing <span class="nu0">1001</span>-&gt;<span class="nu0">1009</span> in context Global<br> 74.&nbsp; Dialplan: sofia/trunkgroup_1/<span class="nu0">1001</span>@<span class="nu0">192.168</span><span class="nu0">.1</span><span class="nu0">.67</span> parsing <span class="br0">[</span>Global-&gt;number_1<span class="br0">]</span> continue=false</div> </span></div><div style="color: rgb(51, 51, 255);" class="de1">75.&nbsp; Dialplan: sofia/trunkgroup_1/<span class="nu0">1001</span>@<span class="nu0">192.168</span><span class="nu0">.1</span><span class="nu0">.67</span> Regex <span class="br0">(</span>FAIL<span class="br0">)</span> <span class="br0">[</span>number_1<span class="br0">]</span> destination_number<span class="br0">(</span><span class="nu0">1009</span><span class="br0">)</span> =~ /^sip<span class="br0">(</span>.*<span class="br0">)</span>$/ break=on-false</div> <span style="color: rgb(204, 0, 0);">(line 73~75, you can see that on line 73, sofia has trunkated the "sip: " &amp; "@<a href="http://4.2.2.2">4.2.2.2</a>" and only leave "1009" as the destination to pass to dialplan for regex match.)</span><br style="color: rgb(204, 0, 0);"> <br><br><br><div class="gmail_quote">On Sat, Aug 22, 2009 at 6:30 PM, Jason White <span dir="ltr">&lt;<a href="mailto:jason@jasonjgw.net">jason@jasonjgw.net</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 class="im">Henry Huang &lt;<a href="mailto:red.rain.seven@gmail.com">red.rain.seven@gmail.com</a>&gt; wrote:<br> &gt; It that case, the example of dialing sip_uri in the dialplan/default.xml<br> &gt; should be removed to prevent confusion. Because according to what you said,<br> &gt; one can never be able to hit this extension:<br> <br> </div>It is entirely possible to reach this extension, but notice that the "sip:"<br> prefix is removed before the rest of the URI is used in calling the bridge<br> application.<br> <br> If you don't understand why this dial-plan entry works, go back and read about<br> regular expressions and the format of destinations used with the bridge<br> application. There are examples and explanations on the wiki.<br> <div><div></div><div class="h5"><br> <br> _______________________________________________<br> FreeSWITCH-users mailing list<br> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br> </div></div></blockquote></div><br><br clear="all"><br>-- <br>Henry Huang<br>UniC Solution - Communication Unified<br>VoIP &amp; Open Source software Consultant<br> _______________________________________________<br>FreeSWITCH-users mailing list<br><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br>http://www.freeswitch.org<br></blockquote></div><br></div></body></html>