[Devel] RE: [Users] strict to loose - Route Header not removed

Walter Schober walter.schober at neotel.at
Thu May 11 18:05:55 CEST 2006


Hello Bogdan!

Maybe we should switch to the developers list by now :-)

I made some more checks. The loose_route() works now as first hop in a chain
of proxies.
But there is a scenario, where it's not clean:
The decision for after_strict() or after_loose() is done only based on the
fact, that the own IP is in the R-URI.
This might not be enough. Consider, one has targeted the last proxy by IP
address, e.g. the proxy is responsible for 111.222.333.129.
Then e.g. some ACK might be sent to ACK sip:user at 111.222.333.129 + Route
Header pointing to itself.
This is not handled by after_strict(). 

In that case, the after_strict() replaces a loose route into the R-URI! See
attached loose_route.txt.

I made a patch to the latest devel (the same you used for your patch). Pls.
Have a look at it and use that one. 
At least it works for me.

Br
Walter

 

-----Original Message-----
From: Bogdan-Andrei Iancu [mailto:bogdan at voice-system.ro] 
Sent: Thursday, May 11, 2006 11:07 AM
To: Walter Schober
Cc: users at openser.org
Subject: Re: [Users] strict to loose - Route Header not removed

perfect - once the cvs is back online, I will commit the fix.

Thanks and regards,
bogdan

Walter Schober wrote:

>Hi Bogdan!
>
>I can verify, that the patch is working correctly now! 
>Now the correct headers are removed and the routing is right.
>
>Thanks!
>Br Walter 
>
>P.S.: Logs are the same than below, so I don't add it here.
>
>-----Original Message-----
>From: Bogdan-Andrei Iancu [mailto:bogdan at voice-system.ro] 
>Sent: Wednesday, May 10, 2006 9:38 PM
>To: Walter Schober
>Cc: users at openser.org
>Subject: Re: [Users] strict to loose - Route Header not removed
>
>Hi Walter,
>
>I will try to take a look on the issue from 2).
>Also find attached the patch against the latest devel version - please 
>give it a try a let me know if it fixes your problem.
>
>regards,
>bogdan
>
>Walter Schober wrote:
>
>  
>
>>Hi Bogdan!
>>
>>1) OpenSER forwards the INVITE correctly including the ;lr parameter. It's
>>the PSTN GW sending a "strict" ACK. They will fix it. Currently I just
take
>>this GW to reproduce the issue. Yes, 111.222.333.132 is the OS proxy.
>>
>>2) I do also believe that it recognizes itself, although grep_sock_info()
>>returns false. This runs on a test system with that single call only and
>>yes, this is all the log.
>>Another issue I see here:
>>If openser is started with the -l parameter, there is no listener
>>    
>>
>configured
>  
>
>>on the IP (address - just the aliases via /etc/hosts). It seems to look
>>    
>>
>into
>  
>
>>the hosts file, resolves reverse via hosts file and uses the first
hostname
>>in the hostfile in the grep_sock_info(). So it always compares the
incoming
>>IP with the first hostname in /etc/hosts correlated to that IP.
>>This doesn't happen, if I specify the listen=udp:111.222.333.132:5060 in
>>    
>>
>the
>  
>
>>script and omit the -l option.
>>Nevertheless I guess, that's not the problem for the strict routing.
>>
>>3) It would be great, if you could provide me with that patch to either
the
>>latest CVS snapshot or the 1.0.0 official source.
>>It's just to verify if it solves my problem, otherwise I will look into
it.
>>
>>Br
>>Walter
>>
>>-----Original Message-----
>>From: Bogdan-Andrei Iancu [mailto:bogdan at voice-system.ro] 
>>Sent: Wednesday, May 10, 2006 12:37 PM
>>To: Walter Schober
>>Cc: users at openser.org
>>Subject: Re: [Users] strict to loose - Route Header not removed
>>
>>HI Walter,
>>
>>I see here three problems:
>>
>>1) as I guess your proxy IP is 111.222.333.132, I find rather strange 
>>why the ACK RURI does not contain the "lr" parameter - OpenSER does only 
>>loose routing and inserts the RR hdr with "lr" and "ftag" params all the 
>>time. Can you check this in the INVITE and 200 OK? It might be a bug in 
>>the phone also.
>>
>>2) even if the proxy does recognize the 111.222.333.132 IP as its own 
>>(as it follows the "after_strict" processing), not sure why you get this 
>>"check_self: host != me". Is the output log continuous?
>>
>>3) indeed there was a bug in RR "after_strict" processing. I fixed it, 
>>but I cannot commit it since thanks no SF none of the repository is 
>>online (CVS or SVN) :(.
>>
>>If yo need it fast, I can generate a patch for you to be able to test.
>>
>>Thanks and regards,
>>Bogdan
>>
>>
>>
>>
>>Walter Schober wrote:
>>
>> 
>>
>>    
>>
>>>0(30621) parse_headers: flags=200
>>>0(30621) is_preloaded: No
>>>0(30621) grep_sock_info - checking if host==us: 13==3 &&
>>>   
>>>
>>>      
>>>
>>[111.222.333.132]
>> 
>>
>>    
>>
>>>== [os0]
>>>0(30621) grep_sock_info - checking if port 5060 matches port 5060
>>>0(30621) grep_sock_info - checking if host==us: 13==3 &&
>>>   
>>>
>>>      
>>>
>>[111.222.333.130]
>> 
>>
>>    
>>
>>>== [os0]
>>>0(30621) grep_sock_info - checking if port 5060 matches port 5084
>>>0(30621) grep_sock_info - checking if host==us: 13==3 &&
>>>   
>>>
>>>      
>>>
>>[111.222.333.130]
>> 
>>
>>    
>>
>>>== [os0]
>>>0(30621) grep_sock_info - checking if port 5060 matches port 5084
>>>
>>>Is this the problem? 
>>>0(30621) check_self: host != me
>>>0(30621) after_strict: Next hop: 'sip:111.222.333.130:5084;lr' is loose
>>>router
>>>0(30621) parse_headers: flags=ffffffffffffffff
>>>0(30621) rewrite_uri: Rewriting Request-URI with
>>>'sip:0720123456 at 111.222.333.129:5060;x-orig=111.222.444.61:5064;x-orig-na
t
>>>      
>>>
>=
>  
>
>>>   
>>>
>>>      
>>>
>>1
>> 
>>
>>    
>>
>>>92.168.40.4:5064'
>>>0(30621) after_strict: The last route URI:
>>>'sip:0720123456 at 111.222.333.129:5060;x-orig=111.222.444.61:5064;x-orig-na
t
>>>      
>>>
>=
>  
>
>>>   
>>>
>>>      
>>>
>>1
>> 
>>
>>    
>>
>>>92.168.40.4:5064'
>>>0(30621) xl_printf: final buffer length 18
>>>
>>>Openser 1.0.0.
>>>
>>>Br
>>>Walter
>>>
>>>-----Original Message-----
>>>From: users-bounces at openser.org [mailto:users-bounces at openser.org] On
>>>   
>>>
>>>      
>>>
>>Behalf
>> 
>>
>>    
>>
>>>Of Walter Schober
>>>Sent: Wednesday, May 10, 2006 8:25 AM
>>>To: users at openser.org
>>>Subject: [Users] strict to loose - Route Header not removed
>>>
>>>Hello!
>>>
>>>Acc to 3261, 16.4:
>>>the proxy MUST replace the Request-URI in the request with the last
>>>value from the Route header field, and remove that value from the
>>>Route header field.  The proxy MUST then proceed as if it received
>>>this modified request. 
>>>
>>>The loose_route() function does only the half on my
>>>if (looose_route()) {
>>>..
>>>t_relay()
>>>..
>>>}
>>>script. It replaces the RURI with the value of the last Route header,
>>>but then doesn't remove it, causing problems on the last hop.
>>>
>>>The strict.txt contains a ACK with comes in strict and leaves loose - 
>>>with the Route header.
>>>
>>>Aliases are configured with ip.ip.ip.ip and ip.ip.ip.ip:5060.
>>>
>>>Why is the Route header not stripped?
>>>
>>>Walter
>>>
>>>
>>>
>>>_______________________________________________
>>>Users mailing list
>>>Users at openser.org
>>>http://openser.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>>
>>>   
>>>
>>>      
>>>
>>
>> 
>>
>>    
>>
>
>
>
>  
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: rr2.patch
Type: application/octet-stream
Size: 7968 bytes
Desc: not available
Url : http://openser.org/pipermail/devel/attachments/20060511/3c97ab5c/rr2.obj
-------------- next part --------------
No.     Time        Source                Destination           Protocol Info
   1333 0.006406    111.222.333.130         111.222.333.129         SIP      Request: ACK sip:0720123456 at 111.222.333.129:5060;x-orig=1.2.3.65:8864;x-orig-nat=1.2.3.65:8864;rinstance=cc217c21eb3fadca

Frame 1333 (883 bytes on wire, 883 bytes captured)
Linux cooked capture
Internet Protocol, Src: 111.222.333.130 (111.222.333.130), Dst: 111.222.333.129 (111.222.333.129)
User Datagram Protocol, Src Port: 5084 (5084), Dst Port: 5060 (5060)
Session Initiation Protocol
    Request-Line: ACK sip:0720123456 at 111.222.333.129:5060;x-orig=1.2.3.65:8864;x-orig-nat=1.2.3.65:8864;rinstance=cc217c21eb3fadca SIP/2.0
    Message Header
        Via: SIP/2.0/UDP 111.222.333.130:5084;branch=z9hG4bKb.F52~j*j1b~EQ`;rport
        Via: SIP/2.0/UDP 111.222.333.132;branch=0
        Via: SIP/2.0/UDP 111.222.333.100:5060;branch=z9hG4bKfcc6608a-1dd1-11b2-8b5b-ef9bdeb582f5
        From: "01234567"<sip:01234567 at gw.domain.at:5060;user=phone>;tag=ds-7e36-41383642066f6
        To: <sip:+43720123456 at 111.222.333.132:5060;user=phone>;tag=0f51a80d
        Call-ID: fcc56752-1dd1-11b2-9fde-b20ff3c79acc at ot1-1
        CSeq: 11931 ACK
        Max-Forwards: 68
        Contact: <sip:CallAgent at gw.domain.at;transport=udp>
        Content-Length: 0
        Record-Route: <sip:111.222.333.130:5084;lr>
        Record-Route: <sip:111.222.333.132;lr;ftag=ds-7e36-41383642066f6>
        Route: <sip:111.222.333.129;lr;ftag=ds-7e36-41383642066f6>
        P-hint: rr-enforced

No.     Time        Source                Destination           Protocol Info
   1334 0.001403    111.222.333.129         111.222.333.129         SIP      Request: ACK sip:111.222.333.129;lr;ftag=ds-7e36-41383642066f6

Frame 1334 (888 bytes on wire, 888 bytes captured)
Linux cooked capture
Internet Protocol, Src: 111.222.333.129 (111.222.333.129), Dst: 111.222.333.129 (111.222.333.129)
User Datagram Protocol, Src Port: 5060 (5060), Dst Port: 5060 (5060)
Session Initiation Protocol
    Request-Line: ACK sip:111.222.333.129;lr;ftag=ds-7e36-41383642066f6 SIP/2.0
    Message Header
        Record-Route: <sip:111.222.333.129;lr;ftag=ds-7e36-41383642066f6>
        Via: SIP/2.0/UDP 111.222.333.129;branch=0
        Via: SIP/2.0/UDP 111.222.333.130:5084;branch=z9hG4bKb.F52~j*j1b~EQ`;rport=5084
        Via: SIP/2.0/UDP 111.222.333.132;branch=0
        Via: SIP/2.0/UDP 111.222.333.100:5060;branch=z9hG4bKfcc6608a-1dd1-11b2-8b5b-ef9bdeb582f5
        From: "01234567"<sip:01234567 at gw.domain.at:5060;user=phone>;tag=ds-7e36-41383642066f6
        To: <sip:+43720123456 at 111.222.333.132:5060;user=phone>;tag=0f51a80d
        Call-ID: fcc56752-1dd1-11b2-9fde-b20ff3c79acc at ot1-1
        CSeq: 11931 ACK
        Max-Forwards: 67
        Contact: <sip:CallAgent at gw.domain.at;transport=udp>
        Content-Length: 0
        Record-Route: <sip:111.222.333.130:5084;lr>
        Record-Route: <sip:111.222.333.132;lr;ftag=ds-7e36-41383642066f6>
        P-hint: rr-enforced
        P-hint: rr-enforced


More information about the Devel mailing list