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

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Apr 26 11:50:52 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:                     feedback
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-26 11:50 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.
====================================================================== 

---------------------------------------------------------------------- 
 (0134134) vhatz (reporter) - 2011-04-26 11:50
 https://issues.asterisk.org/view.php?id=19164#c134134 
---------------------------------------------------------------------- 
I haven't tried what you suggest, I will test it shortly. 

However, if what you propose works, the issue of why the function does not
work in the h extension still remains, when in previous Asterisk versions
it used to work fine. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-04-26 11:50 vhatz          Note Added: 0134134                          
======================================================================




More information about the asterisk-bugs mailing list