Summary:ASTERISK-07377: Channel dosen't terminates after 487-Response from Grandstream GXP-2000
Reporter:boesl (boesl)Labels:
Date Opened:2006-07-21 06:42:49Date Closed:2006-08-30 14:08:19
Versions:Frequency of
Environment:Attachments:( 0) log.txt
Description:Hi, im running an asterisk-1.2.10 on a machine with 2.6.16-gentoo-r9.

The problem is:
If I configure a dial command with an infinite timeout in the dialplan and then place a call to an extension with a Grandstream GXP-2000 phone connected, the phone begins to ring. But after a while the phone decides that the call is timed out and sends a "487 - Request cancelled" response. This resonse is received from asterisk-chan_sip and processed correctly for that phone but the other side, the caller, is not informed. So the call is still there and it is ringing.
I thing chan_sip should terminate the call at all, an the DIALSTATUS must be NOANSWER or BUSY.



I think the case command in chan_sip.c:10055 must be the point to change this behavior.
Comments:By: Serge Vecher (serge-v) 2006-07-21 09:02:18

As per bug guidelines, you need to attach a SIP debug trace illustrating the problem. Please do the following:
1) Prepare test environment (reduce the ammount of unrelated traffic on the server);
2) Make sure your logger.conf has the following line:
  console => notice,warning,error,debug
3) restart Asterik.
4) Enable SIP transaction logging with the following CLI commands:
set debug 4
set verbose 4
sip debug
5) Save complete console log to file and _attach_ said file to the bug.

By: boesl (boesl) 2006-07-21 09:55:22

I have attached the file with the log.

By: Olle Johansson (oej) 2006-08-30 13:48:07

The 487 is not a good answer to an INVITE, is it? 487 is used when the caller sends a CANCEL. I think the gs implementation is wrong in this case.

Having said that, we should propably handle this correctly.

By: Olle Johansson (oej) 2006-08-30 13:57:11

Ok, added a hangup when this happens. This is clearly an error in Grandstream, but handling it properly won't hurt.

From the RFC 3261:

21.4.25 487 Request Terminated
The request was terminated by a BYE or CANCEL request. This response is never returned for a CANCEL
request itself.

By: Olle Johansson (oej) 2006-08-30 14:04:07

Fix committed to svn 1.2, rev 41423

By: Olle Johansson (oej) 2006-08-30 14:08:18

Changed svn trunk, rev 41433

Thank you for reporting this. I've notified Grandstream too to discuss the issue with them and see if we can agree on this.