[Freeswitch-users] freeswitch as SBC and kamailio - no route
Hristo Benev
foxb at abv.bg
Wed Aug 26 12:02:13 PDT 2009
I think that the problem is here:
-------------------------
2009-08-26 22:56:52.725878 [INFO] mod_dialplan_xml.c:315 Processing 1001->1000 in context ROUTING
Dialplan: sofia/internal/1001 at 209.71.254.33 parsing [ROUTING->PEER_01] continue=false
Dialplan: sofia/internal/1001 at 209.71.254.33 Regex (FAIL) [PEER_01] ${sip_h_X-ROUTE}(LOOKUP) =~ /PEER_01/ break=on-false
2009-08-26 22:56:52.728289 [INFO] switch_core_state_machine.c:136 No Route, Aborting
--------------------------
Actually Regex FAIL
I'm not familiar, but is this stating that ${sip_h_X-ROUTE} should be PEER_01 for success?
Here is my default.xml:
----------------
<?xml version="1.0" encoding="utf-8"?>
<!-- http://wiki.freeswitch.org/wiki/Dialplan_XML -->
<include>
<context name="default">
<extension name="LOOKUP_ROUTE">
<condition field="destination_number" expression="(\d+)$">
<action application="set" data="hangup_after_bridge=true"/>
<action application="set" data="continue_on_fail=true"/>
<action application="export" data="sip_h_X-ROUTE=LOOKUP"/>
<action application="bridge" data="sofia/internal/${destination_number}@127.0.0.1:5062"/>
<action application="set" data="ROUTE_GW=${sip_redirect_contact_user_0}"/>
<action application="set" data="AREA=${sip_redirect_contact_user_0}"/>
<action application="transfer" data="${destination_number} XML ROUTING"/>
</condition>
</extension>
</context>
<context name="ROUTING">
<extension name="PEER_01">
<condition field="${sip_h_X-ROUTE}" expression="PEER_01">
<action application="set" data="hangup_after_bridge=true"/>
<action application="set" data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,TIMEOUT,NO_ROUTE_DESTINATION"/>
<action application="set" data="PEER=1.1.1.1"/>
<action application="bridge" data="sofia/external/${destination_number}@1.1.1.1"/>
<action application="set" data="PEER=2.2.2.2"/>
<action application="bridge" data="sofia/external/${destination_number}@2.2.2.2"/>
<action application="set" data="PEER=3.3.3.3"/>
<action application="bridge" data="sofia/external/${destination_number}@3.3.3.3"/>
</condition>
</extension>
</context>
</include>
--------------------------
>-------- Оригинално писмо --------
>От: Brian West
>Относно: Re: [Freeswitch-users] freeswitch as SBC and kamailio - no route
>До: freeswitch-users at lists.freeswitch.org
>Изпратено на: Сряда, 2009, Август 26 19:47:37 EEST
>We do not blindly follow 302's as that is a dangerous thing to do.
You have to process all 302's in the dialplan.
Set this on your sofia profile
You can set these variables sip_redirect_profile,
sip_redirect_context,
sip_redirect_dialplan,
When a redirect happens you get these variables - sip_redirect_contact_%d,
sip_redirected_to,
sip_redirect_contact_user_%d,
sip_redirect_contact_host_%d,
sip_redirect_contact_params_%d,
sip_redirect_dialstring_%d,
sip_redirect_dialstring,
sip_redirected_byThen its up to you to process the redirect in your dialplan, If you don't set the
sip_redirect_context then it'll default to redirected context and XML as the dialplan./bOn Aug 26, 2009, at 11:37 AM, Hristo Benev wrote:HelloI followed the tutorialhttp://wiki.freeswitch.org/wiki/SBC_SetupI have following problem when I dial 1000 Kamalio reports 302, but freeswitch does not routeWhere to look for problems?
>
More information about the FreeSWITCH-users
mailing list