[Freeswitch-users] TLS and connection reuse

Tihomir Culjaga tculjaga at gmail.com
Sun Jul 22 23:31:14 MSD 2012


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 at 85.114.35.241>;tag=376877386
   To: <sip:1002 at 85.114.35.241>
   Call-ID: 665211288
   CSeq: 1 REGISTER
   Contact: <sip:1002 at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120722/8fb52390/attachment-0001.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list