[Home]

Summary:ASTERISK-16463: Wrong DIALSTATUS/HANGUPCAUSE set on receiving 416 reply to INVITE
Reporter:edo (edo)Labels:
Date Opened:2010-07-29 11:56:23Date Closed:2012-03-23 13:02:01
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Misconfigured provider's server send 416 reply to INVITE:
<--- SIP read from TCP:193.201.229.35:5060 --->
SIP/2.0 416 Unsupported URI Scheme
Via: SIP/2.0/TCP 91.144.xxx.xxx:5060;received=91.144.xxx.xxx;branch=z9hG4bK13c51815;rport=35656
From: "7927xxxxxxx" <sip:7927xxxxxxx@multifon.ru>;tag=as3ae65d97
To: <sip:7927yyyyyyy@sbc.multifon.ru:5060>;tag=96FF324631353641E9DD3100
Call-ID: 2d653d043cdcf4b8153def7942de9d22@multifon.ru
CSeq: 103 INVITE

After call hangup Asterisk set DIALSTATUS to NOANSWER, HANGUPCAUSE to 16, that is incorrect.
Comments:By: Leif Madsen (lmadsen) 2010-07-29 13:44:11

What are the correct values?

By: edo (edo) 2010-07-29 14:05:43

Accoring to rfc4497 HANGUPCAUSE must be set to AST_CAUSE_INTERWORKING.

btw. hangup_sip2cause function must follow this rfc:
http://www.asterisk.org/doxygen/trunk/chan__sip_8c-source.html#l05530

about DIALSTATUS - I think CONGESTION is reasonable value.

By: Paul Belanger (pabelanger) 2010-09-04 14:17:37

We require a complete debug log to help triage the issue.

This document will provide instructions on how to collect debugging logs from an Asterisk machine for the purpose of helping bug marshals troubleshoot an issue:

http://svn.digium.com/svn/asterisk/trunk/doc/HOWTO_collect_debug_information.txt

By: Matt Jordan (mjordan) 2012-02-02 09:04:36.087-0600

We just need to add response code 416 to hangup_sip2cause.  Per RFC 4497, it should be returning AST_CAUSE_INTERWORKING, but because its not handled the default value is returned.

By: Rob Gagnon (rgagnon) 2012-03-07 16:55:26.752-0600

From what I see in hangup_sip2cause() as of Asterisk 10.1.2, this would be the result... maybe this issue can be closed?

The default option shows:
{noformat}
if (cause < 500 && cause >= 400) {
  /* 4xx class error that is unknown - someting wrong with our request */
  return AST_CAUSE_INTERWORKING;
} else if (cause < 600 && cause >= 500) {
  /* 5xx class error - problem in the remote end */
  return AST_CAUSE_CONGESTION;
} else if (cause < 700 && cause >= 600) {
  /* 6xx - global errors in the 4xx class */
  return AST_CAUSE_INTERWORKING;
}
return AST_CAUSE_NORMAL;
{noformat}

From that, you should get AST_CAUSE_INTERWORKING when cause 416 comes by

By: Matt Jordan (mjordan) 2012-03-23 13:01:51.951-0500

Per the Asterisk maintenance timeline page at http://www.asterisk.org/asterisk-versions maintenance (bug) support for the 1.4 and 1.6.x branches has ended. For continued maintenance support please move to the 1.8 branch which is a long term support (LTS) branch. For more information about branch support, please see https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions.  After testing with Asterisk 1.8, if you find this problem has not been resolved, please open a new issue against Asterisk 1.8.