TLS and connection reuse
hello, im just wondering if it is possible to make FS re-use the existing TLS connection established on UA registratioin for incoming calls to UA? as an example... i have extensions 1002 (uses TLS) and 1009 (uses SIP/UDP). Both extensions are registered to the same FS. I can place calls from 1002 everywhere but 1002 cannot get any calls. http://pastebin.freeswitch.org/19575 recv 394 bytes from tls/[109.227.38.121]:60591 at 18:16:03.019253: ------------------------------------------------------------------------ REGISTER sip:85.114.35.241 SIP/2.0 Via: SIP/2.0/TLS 109.227.38.121:5061;rport;branch=z9hG4bK419550279 From: <sip:1002@85.114.35.241>;tag=376877386 To: <sip:1002@85.114.35.241> Call-ID: 665211288 CSeq: 1 REGISTER Contact: <sip:1002@109.227.38.121:5061 ;transport=tls;line=d85e74961f65cc6> Max-Forwards: 70 User-Agent: Linphone/3.4.0 (eXosip2/unknown) Expires: 2000 Content-Length: 0 ------------------------------------------------------------------------ I know this register message is broken... good for TCP/UDP but bad for TLS :=) anyhow, extension 1002 establishes a TLS flow 109.227.38.121:60591 <> 85.114.35.241:5061 of course you know what happens when 1009 calls 1002, since 1002 advertized address:port in contact header different than the source port of the existing flow, FS tries to establish a new transport towards the UA and it fails. :=) So is there any way we can force FS to re-use the existing flow and send subsequent request messages via existing connection rather than trying to establish a new one that is going to fail miserably? The more i write this e-mail, the more i realize its a UA problem... don't advertize something you cannot get a call on... but anyhow... needed to ask that question :=) so, how do we fix this ? is the implementation of RFC5626 on client side the answer for that... does FS support this rfc at all ? the other solution should be to tie contact port to transport port but that's a hack.. any good advice in how to fix the UA behavior so it can send and receive calls via TLS connections? regards, Tihomir.
It should already be doing this. I suspect your contact port != real network port the request came from. Sofia can't find and reuse the connection if I recall correctly. On Jul 22, 2012, at 2:31 PM, Tihomir Culjaga wrote:
hello,
im just wondering if it is possible to make FS re-use the existing TLS connection established on UA registratioin for incoming calls to UA?
as an example... i have extensions 1002 (uses TLS) and 1009 (uses SIP/UDP). Both extensions are registered to the same FS. I can place calls from 1002 everywhere but 1002 cannot get any calls.
-- Brian West brian@freeswitch.org FreeSWITCH Solutions, LLC PO BOX PO BOX 2531 Brookfield, WI 53008-2531 Twitter: @FreeSWITCH_Wire T: +1.213.286.0410 | F: +1.213.286.0401 | M: +1.918.424.WEST iNUM: +883 5100 1286 0410
participants (2)
-
Brian West
-
Tihomir Culjaga