[Home]

Summary:ASTERISK-26616: chan_sip: T38 calls not being hung up correctly
Reporter:Morten Tryfoss (mtryfoss)Labels:
Date Opened:2016-11-22 02:49:29.000-0600Date Closed:
Priority:MajorRegression?
Status:Open/NewComponents:Channels/chan_sip/General
Versions:13.8.0 Frequency of
Occurrence
Constant
Related
Issues:
is related toASTERISK-26609 chan_sip: Wrong handling of 488 Not Acceptable Here during reINVITE
Environment:Attachments:( 0) calls.pcap
( 1) debuglog.txt
( 2) full_debug_log.txt
Description:We've got this scenario:

There's a bridged call which negotiates T38.
After fax is sent the caller sends BYE.
Then Asterisk tries a reINVITE to the callee (back to normal audio).
This is rejected by a 488 not accepted here.
No BYE is sent to the callee.
The call stays up for several hours until dropped by the callee.

I found this in the debug log at BYE:
[Nov 21 16:35:14] DEBUG[15411][C-001906b6] chan_sip.c: Hangup call SIP/sipic2-00320075 (This is the callee-channel), SIP callid 754576b53f450b526e26caf705dbbf57@158.58.152.21:5060
[Nov 21 16:35:14] DEBUG[18031][C-001906b6] chan_sip.c: (Provisional) Stopping retransmission (but retaining packet) on '754576b53f450b526e26caf705dbbf57@158.58.152.21:5060' Request 104: Found

It seems like Asterisk is trying to CANCEL the call instead of BYE? Invitestate is incorrect  or channelstate is not up after the failed reINVITE, which in turn sets needcancel to TRUE?

It seems to be easy to reproduce, but it takes some time for me to identify the long running calls since they're not visible in Asterisk anymore.

The issue could also be related to ASTERISK-26609.
Comments:By: Asterisk Team (asteriskteam) 2016-11-22 02:49:31.113-0600

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Morten Tryfoss (mtryfoss) 2016-11-22 03:52:38.263-0600

After some more debugging, I think this might solve the issue (at least for me in this case):

In function chan_sip.c/interpret_t38_parameters:
transmit_reinvite_with_sdp(p, FALSE, FALSE);
was removed for AST_T38_TERMINATED and AST_T38_REQUEST_TERMINATE.

Then the BYE seems to be sent through the whole chain of channels.
But there might be cases where T38 should be terminated and go on with audio?

By: Rusty Newton (rnewton) 2016-11-22 15:58:11.873-0600

Thanks for the report.

Please attach a debug log that includes the output of "sip set debug on" along with a pcap of the same call. That'll help us see what is going on.