[SR-Users] Problem with Route header
Daniel-Constantin Mierla
miconda at gmail.com
Wed May 2 08:42:08 CEST 2012
Hello,
the Route header in initial invite is usually set by phones that have an
outbound proxy setting. Kamailio doesn't add any Route header itself,
unless append_hf()/insert_hf() is used -- record_route() adds
Record-Route headers.
To deal with this case you should do loose_route() only for requests
within dialog (those that have To header tag). For the rest just remove
the Route header. If you look at default config file in v3.2.x, you will
see this kind of processing (just to analyze it, not need to upgrade to
3.2.x).
Cheers,
Daniel
On 5/2/12 12:26 AM, Geoffrey Mina wrote:
> Greetings,
> I am confused at some functionality I am seeing with Kamailio 1.5.4.
> I know this is an old version, but I don't have the time to go through
> a lengthy upgrade process right now. The issue I am seeing is that
> the server is inserting a Route header with it's own IP address for an
> unknown reason. Here is the initial invite (removed SDP for simplicity):
>
> INVITE sip:13 at 67.207.130.146:5060 <http://sip:13@67.207.130.146:5060>
> SIP/2.0
> Via: SIP/2.0/UDP 68.64.220.108:5060;branch=z9hG4bK78dd33c6;rport
> From: "WIRELESS CALLER" <sip:9546496707 at dev-asterisk.mydomain.com
> <mailto:sip%3A9546496707 at dev-asterisk.mydomain.com>>;tag=as1cad6370
> To: <sip:13 at 67.207.130.146:5060 <http://sip:13@67.207.130.146:5060>>
> Contact: <sip:9546496707 at 68.64.220.108
> <mailto:sip%3A9546496707 at 68.64.220.108>>
> Call-ID: 43134ece101abfca6ecab20212295909 at dev-asterisk.mydomain.com
> <mailto:43134ece101abfca6ecab20212295909 at dev-asterisk.mydomain.com>
> CSeq: 102 INVITE
> User-Agent: G-Tel v1.0
> Max-Forwards: 70
> Remote-Party-ID: "WIRELESS CALLER"
> <sip:9546496707 at dev-asterisk.mydomain.com
> <mailto:sip%3A9546496707 at dev-asterisk.mydomain.com>>;privacy=off;screen=no
> Date: Tue, 01 May 2012 18:17:50 GMT
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
> Supported: replaces
> Route: <sip:13 at boulder-voip.mydomain.com
> <mailto:sip%3A13 at boulder-voip.mydomain.com>>
> P-Account-ID: 99990023
> P-Proxy-Route: Yes
> Content-Type: application/sdp
> Content-Length: 240
>
> The basics of what happen next are:
>
> t_check_trans();
> record_route();
> remove_hf("P-Proxy-Route");
> if(loose_route()){
> route(3);
> }
>
>
> route[3]{
> t_on_reply("1");
> if(!t_relay()){
> sl_reply_error();
> }
> }
>
> The INVITE that goes out has the funky Route: header with the Kamailio
> IP in there. This is causing problems for some of the upstream proxy
> servers (obviously).
>
> INVITE sip:13 at boulder-voip.mydomain.com
> <mailto:sip%3A13 at boulder-voip.mydomain.com> SIP/2.0
> Record-Route: <sip:67.207.130.146;lr;ftag=as1cad6370>
> Via: SIP/2.0/UDP 67.207.130.146;branch=z9hG4bKf183.456d51e1.0
> Via: SIP/2.0/UDP
> 68.64.220.108:5060;received=68.64.220.108;branch=z9hG4bK78dd33c6;rport=5060
> From: "WIRELESS CALLER" <sip:9546496707 at dev-asterisk.mydomain.com
> <mailto:sip%3A9546496707 at dev-asterisk.mydomain.com>>;tag=as1cad6370
> To: <sip:13 at 67.207.130.146:5060 <http://sip:13@67.207.130.146:5060>>
> Contact: <sip:9546496707 at 68.64.220.108
> <mailto:sip%3A9546496707 at 68.64.220.108>>
> Call-ID: 43134ece101abfca6ecab20212295909 at dev-asterisk.mydomain.com
> <mailto:43134ece101abfca6ecab20212295909 at dev-asterisk.mydomain.com>
> CSeq: 102 INVITE
> User-Agent: G-Tel v1.0
> Max-Forwards: 69
> Remote-Party-ID: "WIRELESS CALLER"
> <sip:9546496707 at dev-asterisk.mydomain.com
> <mailto:sip%3A9546496707 at dev-asterisk.mydomain.com>>;privacy=off;screen=no
> Date: Tue, 01 May 2012 18:17:50 GMT
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
> Supported: replaces
> P-Account-ID: 99990023
> Content-Type: application/sdp
> Content-Length: 240
> Route: <sip:13 at 67.207.130.146:5060 <http://sip:13@67.207.130.146:5060>>
>
>
> Any idea what may be causing this to happen and how I could prevent
> it? I have tried removing the Route header using the
> remove_hf("Route") before doing the t_relay, but that doesn't seem to
> help.
>
> Thanks,
> Geoff
>
>
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20120502/88f2b0f8/attachment-0001.htm>
More information about the sr-users
mailing list