[asterisk-bugs] [Asterisk 0019164]: Hangup function not sending correct SIP cause code

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Apr 25 21:13:18 CDT 2011


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=19164 
====================================================================== 
Reported By:                vhatz
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   19164
Category:                   Channels/chan_sip/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           1.4.40 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2011-04-21 10:12 CDT
Last Modified:              2011-04-25 21:13 CDT
====================================================================== 
Summary:                    Hangup function not sending correct SIP cause code
Description: 

Test scenario is this:

SIP Client --INVITE-> Asterisk --INVITE-> SIP Peer01

Dialplan is:


[test1]
exten => _X.,1,Dial(SIP/12345 at sippeer01,,,)
 
exten => i,1,Hangup()
exten => t,1,Hangup()
exten => h,1,Hangup()

or


[test2]
exten => _X.,1,Dial(SIP/12345 at sippeer01,,,)
 
exten => i,1,Hangup()
exten => t,1,Hangup()
exten => h,1,Hangup(17) (or any cause number as an argument to the hangup
function).

or

[test3]
exten => _X.,1,Dial(SIP/12345 at sippeer01,,,)
 
exten => i,1,Hangup(${HANGUPCAUSE})
exten => t,1,Hangup(${HANGUPCAUSE})
exten => h,1,Hangup(${HANGUPCAUSE})


If the call is not accepted by sippeer01 for any reason (for example, SIP
cause 404, or 486, etc), this message is returned to Asterisk, which in
turn changes the SIP cause to 503 for all cases, even when we try to
override the cause by setting an argument manually in Hangup() in [test2]
and [test3].

SIP Client <-503-- Asterisk <-404-- SIP Peer01

It seems that the Hangup() function does not work as expected and has no
impact on the SIP cause code that is sent to the calling SIP Client,
although the packet which contains the 503 reply, also contains the
headers:

X-Asterisk-HangupCause: Unallocated (unassigned) number
X-Asterisk-HangupCauseCode: 1

which show the correct response from the remote end (404).

I believe this is a bug, as Hangup() would function as expected in
previous Asterisk versions.
====================================================================== 

---------------------------------------------------------------------- 
 (0134097) pabelanger (administrator) - 2011-04-25 21:13
 https://issues.asterisk.org/view.php?id=19164#c134097 
---------------------------------------------------------------------- 
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:

https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-04-25 21:13 pabelanger     Note Added: 0134097                          
======================================================================




More information about the asterisk-bugs mailing list