[asterisk-bugs] [JIRA] (ASTERISK-19968) TCP Session-Timers not dropping call

Alexander Traud (JIRA) noreply at issues.asterisk.org
Fri Jun 20 14:13:56 CDT 2014


     [ https://issues.asterisk.org/jira/browse/ASTERISK-19968?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Traud updated ASTERISK-19968:
---------------------------------------

    Attachment: session-timersNonUDP_Asterisk11.patch
                session-timersNonUDP_Asterisk12.patch

Same here with my Asterisk 11 and Asterisk 12 on Ubuntu 14.04 LTS. SIP-over-TCP and SIP-over-TLS are affected.

*Workaround A*

I attached a patch which is more like a hack. Here, the patch works for three months already. However, the original submitter faced very low packet timeouts with this patch applied. Perhaps someone – involved in the merger of the TCP branch in January 2008 – is able to review it. Although everyone is welcome to comment on the proposed patch.

This issue unfolds into three issues:
# the Session-Timers re-INVITE was not placed into the scheduler, therefore the re-INVITE did not timeout, therefore Asterisk did not hang-up. That is why I had to remove that first if-clause.
# now, the re-INVITE would have been re-transmitted which does not make
sense for reliable transports. Not the SIP layer but the TCP layer of the
operating system handles this for TCP/TLS traffic already. That is why I
stopped the re-transmission = _just one_ TCP packet is send by Asterisk. Now your operating system does the re-transmitting.
# the 200 OK response of the UAC had to visit __sip_ack(), otherwise the
response would not be noticed by the Session-Timers code. Therefore, I had
to remove that UDP-only condition (effectively rolling-back ASTERISK-14830).

I do not understand which side effects are created by change 1. Here, I do see only benefits because TCP ports stopped to leak. Therefore, solving this issue could solve other issues as well. Would be more than happy to hear your results!

General observations while debugging this:
* my VoIP phones (Symbian/S60; Nokia Belle) ignore Asterisk keepalive and
close the TCP stream after 3*TimerB=192 seconds. Therefore, I went for a
rather low (sip.conf) {{session-expires=360}} (seconds).
* because the round-trip time (RTT) of mobile TCP (UMTS) is rather high, I
had to go for (sip.conf) {{timert1=2800}} (milliseconds):
timert1 < ( min( maxexpiry, session-expires) / 2) / TimerB


*Workaround B*

{{session-timers=accept}}
{{session-refresher=uac}}

*Workaround C*

{{session-timers=refuse}}

> TCP Session-Timers not dropping call
> ------------------------------------
>
>                 Key: ASTERISK-19968
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-19968
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_sip/TCP-TLS
>    Affects Versions: 1.8.7.2, 1.8.12.2
>         Environment: CentOS VM
>            Reporter: Aaron Hamstra
>         Attachments: debug.log-tcp, session-timersNonUDP_Asterisk11.patch, session-timersNonUDP_Asterisk12.patch
>
>
> If a call is setup with session-timers utilizing tcp for sip transport the server never disconnects the call.  We see the session-timers reinvite in the CLI, but with a network trace we never see it.  The issue is the call stays up.  With the sip transport set on UDP everything works as it should, it only occurs when switching to TCP.
> Can be reproduced at any time for testing purposes.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list