[Freeswitch-users] freeswitch as SBC and kamailio - no route
rod
kawarod at laposte.net
Thu Aug 27 23:54:00 PDT 2009
Hello,
the trace seems good.
If you check the answer from Kamailio, you'll see that Kamailio answers
with "302 PEER_01".
As Michael Collins stated before, you can get the variable containing
"PEER_01", then this variable is stored in a custom variable.
In your dialplan, may you please add:
<action application="info"/>, just before the transfer line, eg:
<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="info"/>
<action application="transfer" data="${destination_number} XML ROUTING"/>
</condition>
Using application Info, you'll see on the console (or CDR) the list of
variables used for this call. You should see the content of
"${sip_redirect_contact_user_0}" that should contain the value
"PEER_01". Please check this and let me know.
For the new configuration file, no problem for sharing. But as I wrote
on the wiki page, I worked on this setup cause LCR module was not
available when I start working on FS, nor I'm a good programmer to write
a server side HTTP script (used by xml_curl) that could scale to my needs.
I enhanced a bit this configuration with support for fallback routing,
almost realtime graph (every minutes using www.cacti.net and some
functions in FS like limit_hash) of number of concurrent calls per AREA,
PEER...
Thanks for "the good tutorial", but don't forget the dev team who did
this great product ;-)
rod.
Hristo Benev a écrit :
> I assume you asked for port 5062 since I do not have any traffic on 5060 (I have one IP and my internal sip port is 5090 and external 5080).
>
> If you need additional info I'll provide it.
>
> Here is trace:
>
> ngrep -d any -nn -i '1000' port 5062 -W byline
> interface: any
> filter: (ip or ip6) and ( port 5062 )
> match: 1000
> #
> U 10.10.10.10:5090 -> 127.0.0.1:5062
> INVITE sip:1000 at 127.0.0.1:5062 SIP/2.0.
> Via: SIP/2.0/UDP 10.10.10.10:5090;rport;branch=z9hG4bKtrDyU1US5X5tj.
> Max-Forwards: 69.
> From: "Extension 1001" <sip:1001 at 10.10.10.10>;tag=978g69jZaFpBD.
> To: <sip:1000 at 127.0.0.1:5062>.
> Call-ID: 7f0eff2d-0dbf-122d-bfb0-612c8433bc7c.
> CSeq: 119574771 INVITE.
> Contact: <sip:mod_sofia at 10.10.10.10:5090>.
> User-Agent: FreeSWITCH-mod_sofia/1.0.4-exported.
> Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE, REGISTER, INFO, PUBLISH.
> Supported: timer, precondition, path, replaces.
> Allow-Events: talk, presence, dialog, call-info, sla, include-session-description, presence.winfo, message-summary, refer.
> Content-Type: application/sdp.
> Content-Disposition: session.
> Content-Length: 429.
> X-ROUTE: LOOKUP.
> Remote-Party-ID: "Extension 1001" <sip:1001 at 10.10.10.10>;party=calling;screen=yes;privacy=off.
> .
> v=0.
> o=FreeSWITCH 1251355692 1251355693 IN IP4 10.10.10.10.
> s=FreeSWITCH.
> c=IN IP4 10.10.10.10.
> t=0 0.
> m=audio 30522 RTP/AVP 0 115 107 9 8 3 101 13.
> a=rtpmap:0 PCMU/8000.
> a=rtpmap:115 G7221/32000.
> a=fmtp:115 bitrate=48000.
> a=rtpmap:107 G7221/16000.
> a=fmtp:107 bitrate=32000.
> a=rtpmap:9 G722/8000.
> a=rtpmap:8 PCMA/8000.
> a=rtpmap:3 GSM/8000.
> a=rtpmap:101 telephone-event/8000.
> a=fmtp:101 0-16.
> a=rtpmap:13 CN/8000.
> a=ptime:20.
>
> #
> U 127.0.0.1:5062 -> 10.10.10.10:5090
> SIP/2.0 302 PEER_01.
> Via: SIP/2.0/UDP 10.10.10.10:5090;rport=5090;branch=z9hG4bKtrDyU1US5X5tj.
> From: "Extension 1001" <sip:1001 at 10.10.10.10>;tag=978g69jZaFpBD.
> To: <sip:1000 at 127.0.0.1:5062>;tag=458fb4012080e656b6742c09466dabcd.31c8.
> Call-ID: 7f0eff2d-0dbf-122d-bfb0-612c8433bc7c.
> CSeq: 119574771 INVITE.
> Contact: sip:France at PEER_01.
> Server: Kamailio (1.5.2-notls (i386/linux)).
> Content-Length: 0.
> .
>
> #
> U 10.10.10.10:5090 -> 127.0.0.1:5062
> ACK sip:1000 at 127.0.0.1:5062 SIP/2.0.
> Via: SIP/2.0/UDP 10.10.10.10:5090;rport;branch=z9hG4bKtrDyU1US5X5tj.
> Max-Forwards: 69.
> From: "Extension 1001" <sip:1001 at 10.10.10.10>;tag=978g69jZaFpBD.
> To: <sip:1000 at 127.0.0.1:5062>;tag=458fb4012080e656b6742c09466dabcd.31c8.
> Call-ID: 7f0eff2d-0dbf-122d-bfb0-612c8433bc7c.
> CSeq: 119574771 ACK.
> Content-Length: 0.
> .
>
>
>
>
>
> >-------- Оригинално писмо --------
> >От: Hristo Benev
> >Относно: Re: [Freeswitch-users] freeswitch as SBC and kamailio - no route
> >До: freeswitch-users at lists.freeswitch.org
> >Изпратено на: Четвъртък, 2009, Август 27 14:58:53 EEST
>
> >
> >Bojnour,
> >
> >I'll send a trace ASAP.
> >
> >What I see is that SIP header does not get updated -> regex is not true then it does not go to the peer. (I assume that is coming from kamailio config)
> >
> >I'm really interested to see the updates of the project.
> >
> >Thank you for the good tutorial.
> >
> >Hristo
> >
> >
> > >-------- Оригинално писмо --------
> > >От: rod
> > >Относно: Re: [Freeswitch-users] freeswitch as SBC and kamailio - no route
> > >До: freeswitch-users at lists.freeswitch.org
> > >Изпратено на: Четвъртък, 2009, Август 27 09:41:05 EEST
> >
> > >Hi Hristo,
> > >
> > >I'm the author of this setup and wiki page. I did a lot of modifications
> > >on this setup (alternative routing if failure essentially) but don't
> > >have too much time to update the wiki.
> > >
> > >May you please send me an ngrep trace when you call 1000:
> > >
> > >ngrep -d any -nn -i '1000' port 5060 -W byline
> > >
> > >I will check what's happening.
> > >Do you have an entry for 1000 in your mysql database ?
> > >
> > >regards,
> > >rod
> > >
> > >Hristo Benev a écrit :
> > >>
> > >> It seems that the problem is on kamailio configuration.
> > >> Will ask on their list.
> > >>
> > >> But to test i try to connect to my asterisk server and i receive 407 proxy authentication required.
> > >>
> > >> I have it setup as friend in asterisk, but still ???
> > >>
> > >> Any ideas?
> > >>
> > >> Thanks,
> > >>
> > >>
> > >> >-------- Оригинално писмо --------
> > >> >От: Hristo Benev
> > >> >Относно: Re: [Freeswitch-users] freeswitch as SBC and kamailio - no route
> > >> >До: freeswitch-users at lists.freeswitch.org
> > >> >Изпратено на: Сряда, 2009, Август 26 22:02:13 EEST
> > >>
> > >> > 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:
> > >> >----------------
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >
> > >> >--------------------------
> > >> >
> > >> >
> > >> >
> > >> > >-------- Оригинално писмо --------
> > >> > >От: 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?
> > >> > >
> > >> >
> > >> >_______________________________________________
> > >> >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
> > >> >
> > >>
> > >> _______________________________________________
> > >> 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
> > >>
> > >
> > >_______________________________________________
> > >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
> > >
> >
> >_______________________________________________
> >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
> >
>
> _______________________________________________
> 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
>
More information about the FreeSWITCH-users
mailing list