[SR-Users] record_route() from websocket UA to tls UA

Daniel-Constantin Mierla miconda at gmail.com
Thu Aug 19 17:56:56 CEST 2021


Probably the code that needs to be changed is in the core, where the
message is built (msg_translator.c). rr module adds second conditional
lump for record route, but at that stage is not aware what is going to
be the final target address.

One more workaround would be using separate sockets, one tls and one
websocket, I ended up doing so because the latest versions of web
browsers do not allow traffic to standard sip ports anyhow because of
the the slipstream attack.

I will try to look over the code soon, if nothing happens in 1-2 days,
you can open an issue not to be forgotten.

Cheers,
Daniel

On 19.08.21 17:40, Juha Heinanen wrote:
> Should I create a bug issue to GitHub about this?  I looked at
> rr/record.c, but could not figure out, what needs to be changed.
>
> -- Juha
>
> -------------------------------------------------------------------------
>
>> I noticed that when jsSIP UA that has registered over wss calls another
>> SIP UA that has registered over tls, record_route() adds only one Route
>> URI to outgoing INVITE (example below).  This causes BYE to fail.
>>
>> This issue may be caused by the fact that both UAs register over the
>> same Kamailio tls listening socket.  Still two Route URIs should be
>> added in the same way as is done when one UA registers over tcp and the
>> other over udp.
>>
>> -- Juha
>>
>> ---------------------------------------------------------------------
>>
>> 09:25:43.639833 wss:87.95.73.155:19458 wss:192.27.134.1:5061
>>
>> INVITE sip:foo at test.tutpro.com SIP/2.0
>> Via: SIP/2.0/WSS jovobf9n4svm.invalid;branch=z9hG4bK2639638
>> Max-Forwards: 69
>> To: <sip:foo at test.tutpro.com>
>> From: " Test" <sip:test at test.tutpro.com>;tag=f7lpsuo7cb
>> Call-ID: ovhd9fu1fl1a66nec011
>> CSeq: 1387 INVITE
>> Contact: <sip:test at test.tutpro.com;gr=urn:uuid:e7f92a54-2295-4772-abc8-504be07e94c5>
>> ...
>>
>> 09:25:43.649462 tls:192.27.134.1:5061 tls:87.95.73.155:19461
>>
>> INVITE sip:foo-0x793ee87a90 at 10.158.141.103:38378;transport=tls SIP/2.0
>> Record-Route: <sip:192.27.134.1:5061;transport=ws;sn=ext_tls;lr;n2;dtlsf=avp;pm=0;ice>
>> Via: SIP/2.0/TLS 192.27.134.1:5061;branch=z9hG4bK637c.7e15ef5b84ea054cfc8ea3d4e860521f.0
>> Via: SIP/2.0/WSS jovobf9n4svm.invalid;rport=19458;received=87.95.73.155;branch=z9hG4bK2639638
>> Max-Forwards: 68
>> To: <sip:foo at test.tutpro.com>
>> From: " Test" <sip:test at test.tutpro.com>;tag=f7lpsuo7cb
>> Call-ID: ovhd9fu1fl1a66nec011
>> CSeq: 1387 INVITE
>> Contact: <sip:test at test.tutpro.com;gr=urn:uuid:e7f92a54-2295-4772-abc8-504be07e94c5>
>>
>> __________________________________________________________
>> Kamailio - Users Mailing List - Non Commercial Discussions
>>   * sr-users at lists.kamailio.org
>> Important: keep the mailing list in the recipients, do not reply only to the sender!
>> Edit mailing list options or unsubscribe:
>>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users at lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to the sender!
> Edit mailing list options or unsubscribe:
>   * 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




More information about the sr-users mailing list