Greg Troxel
2019-Dec-27 17:59 UTC
[asterisk-users] SIP via TCP - new TCP session per call or use same session for multiple calls?
Dovid Bender <dovid at telecurve.com> writes:> So long as the tcp socket is open your SBC should send the call back over > the same socket. Now it can be that your SBC is seeing the socket as > timing out. If you are using Kamailio you can have it send tcp keep alives > every so often so that the socket stays up.SBC? I am curious if the "reuse registration TCP connection" is required by standards or if it is merely obviously good practice. I have had this problem too with asterisk 16.5.0 This is not the first recommendation I have seen to use kamailio as a proxy for asterisk, for these sorts of issues as well as clients that change addresses. Unfortunately the "jsr pc, set_up_kamailo" subroutine call is still executing so I can't say if things work right then...
Joshua C. Colp
2019-Dec-27 18:35 UTC
[asterisk-users] SIP via TCP - new TCP session per call or use same session for multiple calls?
On Fri, Dec 27, 2019 at 2:00 PM Greg Troxel <gdt at lexort.com> wrote:> Dovid Bender <dovid at telecurve.com> writes: > > > So long as the tcp socket is open your SBC should send the call back over > > the same socket. Now it can be that your SBC is seeing the socket as > > timing out. If you are using Kamailio you can have it send tcp keep > alives > > every so often so that the socket stays up. > > SBC? > > I am curious if the "reuse registration TCP connection" is required by > standards or if it is merely obviously good practice. > > I have had this problem too with asterisk 16.5.0 > > This is not the first recommendation I have seen to use kamailio as a > proxy for asterisk, for these sorts of issues as well as clients that > change addresses. Unfortunately the "jsr pc, set_up_kamailo" subroutine > call is still executing so I can't say if things work right then... >There is a specification for doing it, but it's not required by the main SIP RFC. In fact the main one states that you're supposed to establish an outgoing connection to the address in the Contact header. In practice, though, this is futile as generally NAT Is in use so you can't connect back and thus you reuse the connection. The chan_sip module should do this automatically, while chan_pjsip will do this if "rewrite_contact" is set to yes. -- Joshua C. Colp Asterisk Technical Lead Sangoma Technologies Check us out at www.sangoma.com and www.asterisk.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20191227/3f308366/attachment.html>
Greg Troxel
2019-Dec-28 01:49 UTC
[asterisk-users] SIP via TCP - new TCP session per call or use same session for multiple calls?
"Joshua C. Colp" <jcolp at sangoma.com> writes:>> I am curious if the "reuse registration TCP connection" is required by >> standards or if it is merely obviously good practice. >> >> I have had this problem too with asterisk 16.5.0 >> >> This is not the first recommendation I have seen to use kamailio as a >> proxy for asterisk, for these sorts of issues as well as clients that >> change addresses. Unfortunately the "jsr pc, set_up_kamailo" subroutine >> call is still executing so I can't say if things work right then... >> > > There is a specification for doing it, but it's not required by the main > SIP RFC. In fact the main one states that you're supposed to establish an > outgoing connection to the address in the Contact header. In practice, > though, this is futile as generally NAT Is in use so you can't connect back > and thus you reuse the connection. The chan_sip module should do this > automatically, while chan_pjsip will do this if "rewrite_contact" is set to > yes.Thanks. I read the docs for pjsip (and the book) and failed to grasp that. It seems that this should be the default behavior.
Seemingly Similar Threads
- SIP via TCP - new TCP session per call or use same session for multiple calls?
- SIP via TCP - new TCP session per call or use same session for multiple calls?
- SIP via TCP - new TCP session per call or use same session for multiple calls?
- Multiple IP addresses and using same IP for outbound calls as inbound
- PJSIP and Kamailio without registration