[Freeswitch-users] can't pass full sip url to dialplan
Henry Huang
red.rain.seven at gmail.com
Sat Aug 22 07:09:26 PDT 2009
Jason:
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:" .
Here is the excert from pastebin:
3. INVITE sip:1009 at 4.2.2.2 SIP/2.0
(line 3 , the freeswitch has successfuly received my dialying to sip:
1009 at 4.2.2.2)73. 2009-08-20 16:37:28.982772 [INFO]
mod_dialplan_xml.c:315Processing
1001->1009 in context Global
74. Dialplan: sofia/trunkgroup_1/1001 at 192.168.1.67 parsing [
Global->number_1] continue=false
75. Dialplan: sofia/trunkgroup_1/1001 at 192.168.1.67 Regex (FAIL)
[number_1]destination_number
(1009) =~ /^sip(.*)$/ break=on-false
(line 73~75, you can see that on line 73, sofia has trunkated the "sip: " &
"@4.2.2.2" and only leave "1009" as the destination to pass to dialplan for
regex match.)
On Sat, Aug 22, 2009 at 6:30 PM, Jason White <jason at jasonjgw.net> wrote:
> Henry Huang <red.rain.seven at gmail.com> wrote:
> > 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:
>
> It is entirely possible to reach this extension, but notice that the "sip:"
> prefix is removed before the rest of the URI is used in calling the bridge
> application.
>
> If you don't understand why this dial-plan entry works, go back and read
> about
> regular expressions and the format of destinations used with the bridge
> application. There are examples and explanations on the wiki.
>
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
--
Henry Huang
UniC Solution - Communication Unified
VoIP & Open Source software Consultant
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090822/221d8cf2/attachment-0002.html
More information about the FreeSWITCH-users
mailing list