[SR-Users] rr module not detecting nat=ws route param

Daniel-Constantin Mierla miconda at gmail.com
Tue Oct 2 22:15:48 CEST 2018


Even with client on the same host as the server, the port should be
different. R-URI of ACK has port 5060, like on of the Route headers, so
I assume only kamailio is using that port.

R-URI for ACK has to be the contact URI from 200ok and if it is kamailio
ip:port, then that is what loose_route() is considering to be the Route
hop based on strict routing rules. The R-URI must be different than
kamailio ip:port (and transport) to actually consume from Route headers
via loose processing.

Try to figure out why ACK has the address of Kamailio in R-URI and not
the address of the callee.

Daniel


On 02.10.18 22:03, Jon Bonilla (Manwe) wrote:
> El Tue, 2 Oct 2018 21:34:12 +0200
> Daniel-Constantin Mierla <miconda at gmail.com> escribió:
>
>> Hello,
>>
>> I see MYIP in R-URI and then just MY in the Route headers. Are they
>> different or the same value? 
> Sorry, it's the same value. 
>
>> If the same value, is the sip server
>> address? if yes, then R-URI is matching local address (myself) and that
>> means it is a strict routing and the R-URI is the route processed at
>> that step. Likely the contact address from 200ok gets replaced with
>> server address somewhere in the path of signaling.
>
> The subscriber is in the same IP as the proxy. It's a lab version of a webrtc
> client. client using port 42088, nginx using port 3002 and kamailio using port
> 5060 internally
>
>
> asterisk (OUT) --> 5060 kamailio nginx 2443 --> ua 42088
>
>
>
> Anyway, after loose route I don't know why nat=ws isn't detected. $route_uri
> printed in xlogs shows this:
>
>  $route_uri=sip:MYIP;r2=on;lr=on;did=1d1.7702;nat=ws
>
> According to the doc:
>
> "The function checks if the URI parameters of the local Route header
> (corresponding to the local server) matches the given regular expression. It
> must be call after loose_route()"
>
>  Example 1.15. check_route_param usage
> if (check_route_param("nat=yes"))
>
>
>
>
>
>> Cheers,
>> Daniel
>>
>> On 02.10.18 17:27, Jon Bonilla (Manwe) wrote:
>>> El Mon, 1 Oct 2018 12:16:28 +0300
>>> Igor Olhovskiy <igorolhovskiy at gmail.com> escribió:
>>>  
>>>> Hi!
>>>>
>>>> What is your original packet, before calling loose_route?
>>>>  
>>> 2018/10/02 17:12:41.007053 OUT:5060 -> MYIP:5060
>>>
>>> ACK sip:86to7j7i at MYIP:5060;alias=MY~42088~6;transport=ws;ob SIP/2.0 
>>>
>>> Via: SIP/2.0/UDP OUT;branch=z9hG4bK9658.2fd077002f564d6398951beb959c7708.0 
>>>
>>> Via:SIP/2.0/UDP OUT:5060;rport=5060;branch=z9hG4bK72288d3e 
>>>
>>> Route:
>>> <sip:MY;r2=on;lr=on;did=896.90e;nat=ws>,<sip:MY:2443;transport=ws;r2=on;lr=on;did=896.90e;nat=ws>
>>>
>>> Max-Forwards: 69 
>>>
>>> From: <sip:20 at domain>;tag=as7bbb1aa3 
>>>
>>> To: <sip:10000105 at domain>;tag=d04lulkvk7
>>>
>>> Contact: <sip:20 at OUT:5060> 
>>>
>>> Call-ID: ocuh443d3c0l3mccpujr
>>>
>>> CSeq: 102 ACK
>>>
>>> Content-Length: 0
>>>
>>>  
>>>> Regards, Igor
>>>> On Sep 28, 2018, 1:54 PM +0300, Jon Bonilla (Manwe) <manwe at aholab.ehu.es>,
>>>> wrote:  
>>>>> Hi all. I'm having problems with an indialog ACK request which is not
>>>>> being routed correctly.
>>>>>
>>>>> I call loose_route and print:
>>>>>
>>>>> $du=sip:MYIP:2443;transport=ws;r2=on;lr=on;did=1d1.7702;nat=ws
>>>>> $route_uri=sip:MYIP;r2=on;lr=on;did=1d1.7702;nat=ws
>>>>>
>>>>> But when I call
>>>>>
>>>>> check_route_param("nat=ws") I get false result.
>>>>>
>>>>> version: kamailio 5.1.4
>>>>>
>>>>> any hints?
>>>>>
>>>>>
>>>>>
>>>>> cheers,
>>>>>
>>>>> Jon
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> https://pekepbx.com
>>>>> https://www.issabel.com/multitenant
>>>>>
>>>>> _______________________________________________
>>>>> Kamailio (SER) - Users Mailing List
>>>>> sr-users at lists.kamailio.org
>>>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users    
>>>  
>

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference -- www.kamailioworld.com
Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- www.asipto.com




More information about the sr-users mailing list