It that case, the example of dialing sip_uri in the dialplan/default.xml should be removed to prevent confusion. Because according to what you said, one can never be able to hit this extension: <br><br><span style="color: rgb(51, 51, 255);"><!-- dial via SIP uri --></span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">Â Â Â <extension name="sip_uri"></span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">Â Â Â Â Â <condition field="destination_number" expression="^sip:(.*)$"></span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">Â Â Â Â Â Â Â <action application="bridge" data="sofia/${use_profile}/$1"/></span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">Â Â Â Â Â </condition></span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">Â Â Â </extension></span><br><br>And thanks for the tip, I will use variable instead. <br>
<br><br><div class="gmail_quote">On Sat, Aug 22, 2009 at 4:35 PM, Michael Jerris <span dir="ltr"><<a href="mailto:mike@jerris.com">mike@jerris.com</a>></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 style="">No, you don't get the full sip uri in the dialplan like that. Â You do have a whole bunch of variables of the parsed sip header you can use. Â Use the "info" application to see all the vars so you can see what you have to route the call on.<div>
<br></div><div>Mike</div><div><div></div><div class="h5"><div><br><div><div>On Aug 22, 2009, at 2:40 AM, Henry Huang wrote:</div><br><blockquote type="cite">Hi:<br><br>I try to dial sip url from my softphone but seems like the sip address is being processed by sofia before it pass to the dialplan. The example here is :<br>
<br><b><span style="color: rgb(102, 0, 0);">X-lite(softphone) dials -> <a href="mailto:1009@4.2.2.2" target="_blank">1009@4.2.2.2</a> (it's fake sip address, the purpose was just to test what's being passed to dialplan)</span><br style="color: rgb(102, 0, 0);">
<span style="color: rgb(102, 0, 0);">sofia receives the invite and return with trying </span><br style="color: rgb(102, 0, 0);"><span style="color: rgb(102, 0, 0);">sofia pass the destination number to dailplan with "1009" (without the "sip:" in front and without the "@<a href="http://4.2.2.2/" target="_blank">4.2.2.2</a>" after it)</span><br style="color: rgb(102, 0, 0);">
</b><br>Please see pastebin for full log. <a href="http://pastebin.freeswitch.org/10089" target="_blank">http://pastebin.freeswitch.org/10089</a><br>ignore anything after line 80, because it's not my point, and the destination is a fake address. <br>
<br>I would like to know how do you actually pass a full sip url to the dialplan to do the regex match. Because from the default.xml dialplan, it comes with an example sip url dialing extension that match's <b>^<a>sip:(.*)$</a> </b>. So I assume there must be a way of passing full sip url to the dialplan. Here is the example dialplan expecting sofia to pass it a full sip url:<br>
<br><span style="color: rgb(51, 51, 255);">Â <!-- dial via SIP uri --></span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">Â Â Â <extension name="sip_uri"></span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">Â Â Â Â Â <condition field="destination_number" expression="^<a>sip:(.*)$</a>"></span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">Â Â Â Â Â Â Â <action application="bridge" data="sofia/${use_profile}/$1"/></span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">Â Â Â Â Â </condition></span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">Â Â Â </extension></span><br><br clear="all"></blockquote></div><br></div>
</div></div></div><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>
<br></blockquote></div><br><br clear="all"><br>-- <br>Henry Huang<br>UniC Solution - Communication Unified<br>VoIP & Open Source software Consultant<br>