[asterisk-bugs] [JIRA] (ASTERISK-27609) sip_tcptls_read: SIP TCP/TLS server has shut down after 120s

Chris Jones (JIRA) noreply at issues.asterisk.org
Thu Feb 8 10:09:13 CST 2018


    [ https://issues.asterisk.org/jira/browse/ASTERISK-27609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=242081#comment-242081 ] 

Chris Jones commented on ASTERISK-27609:
----------------------------------------

After many call examples, this is what Twilio came back with, with my comments in [ ]:

The TLS (TCP) connection is probably getting torn down while the call is up. [TRUE] It's not something Asterisk related. It is likely their side is behind a NAT, and the NAT is not staying open for the entire call which is causing the connection to be lost. Can they adjust their NAT to allow connections to stay open longer? [No, AWS does not allow for NAT configuration]  This usually involves sending CR-LF periodically. [???] Or maybe they can implement SIP session timers, so that SIP keepalives (re-INVITEs) are sent to keep the connection up. [Enabled by default, but nothing pointing to 120 seconds. See below]

  Session Timers:         Accept
  Session Refresher:      uas
  Session Expires:        1800 secs
  Session Min-SE:         90 secs

canreinvite is set to 'no'; however, we tried setting it to 'yes', but observed the same call behavior.

Any other advice?



> sip_tcptls_read: SIP TCP/TLS server has shut down after 120s
> ------------------------------------------------------------
>
>                 Key: ASTERISK-27609
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27609
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_sip/TCP-TLS
>    Affects Versions: 15.1.3
>         Environment: AWS EC2 running Centos 7
>            Reporter: Chris Jones
>            Assignee: Chris Jones
>         Attachments: asterisk-27609.core.tar.gz, asterisk-27609.pcap.tar.gz, asterisk-27609.tcpdump, ASTERISK-27609.txt, asterisk-cli-output.txt
>
>
> I have a SIP provider (Twilio) that has provided working guidelines for configuring Asterisk to have a Secure SIP tunnel between it and Twilio. I have implemented the TLS and SRTP, and configured Twilio to be Secure-only.
> I can make and receive calls just fine - TLS and SRTP is working. 
> If I hang up the call within 2 minutes: the call disconnects perfectly fine on both ends.
> If the call is longer than two minutes,
>  - at exactly the 120s mark, I get the following sip debug:
> DEBUG[30015]: iostream.c:157 iostream_read: TLS clean shutdown alert reading data
> DEBUG[30015]: chan_sip.c:2905 sip_tcptls_read: SIP TCP/TLS server has shut down
>   - if I hang up the call on the Asterisk side, my mobile phone that dialed into Twilio, does not hang up. 
>   - after 300seconds beyond the initial 120+ seconds, my mobile phone hangs up. I feel this a Twilio timeout. Interesting enough, Twilio sends a BYE but Asterisk responds that the call leg does not exist anymore.
> Because call setup and SRTP both work, the hangup issue is an aggravation because it could increase toll charges (extra 5 minutes every call if the other doesnt hang up). And we need to resolved before we can deploy our app.
>  



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



More information about the asterisk-bugs mailing list