[asterisk-bugs] [Asterisk 0013140]: [patch] Setting up a HANGUPCAUSETEXT variable for SIP channel

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Aug 4 14:28:17 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=13140 
====================================================================== 
Reported By:                cpina
Assigned To:                tilghman
====================================================================== 
Project:                    Asterisk
Issue ID:                   13140
Category:                   Channels/chan_sip/NewFeature
Reproducibility:            always
Severity:                   feature
Priority:                   normal
Status:                     ready for testing
Target Version:             1.6.x Version Tracker
Asterisk Version:           SVN 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 133097 
Request Review:              
====================================================================== 
Date Submitted:             2008-07-23 13:31 CDT
Last Modified:              2009-08-04 14:28 CDT
====================================================================== 
Summary:                    [patch] Setting up a HANGUPCAUSETEXT variable for
SIP channel
Description: 
I found that sometimes it's needed to have the exactly "SIP disconnect
code" from the other end. HANGUPCAUSE could not be enough as it's mapping
different SIP codes to the same number.

After talking about it in -dev mailing list:
http://lists.digium.com/pipermail/asterisk-dev/2008-July/034004.html

Some people was interested and attached there is a initial patch to
implement it.

Note: there is a problem with a Dial to multiple channels: same problem
than HANGUPCAUSE. A good solution, as talked here:

http://lists.digium.com/pipermail/asterisk-dev/2008-July/034020.html

is to have a hash/function handling all disconnect reasons. In this status
the classic HANGUPCAUSE and also HANGUPCAUSETEXT don't handle it.

PATCH:
Mail:
http://lists.digium.com/pipermail/asterisk-dev/2008-July/034049.html
Attachment:
http://lists.digium.com/pipermail/asterisk-dev/attachments/20080723/6da29aa3/attachment.patch

In my tests the patch has been working fine. If you see any problem or
patch should be done in a different way, I'm open to work on it.
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0014810 [patch] channel-specific hangupcauses
====================================================================== 

---------------------------------------------------------------------- 
 (0108613) lmadsen (administrator) - 2009-08-04 14:28
 https://issues.asterisk.org/view.php?id=13140#c108613 
---------------------------------------------------------------------- 
exten => 109,1,Dial(Local/jimmy at testing,12,M(get_orig_channel))

[testing]
exten => jimmy,1,Answer()
exten => jimmy,n,NoOp(${MASTER_CHANNEL(CHANNEL)})
exten => jimmy,n,Dial(SIP/00085D193AB5,6,M(get_orig_channel))
exten => jimmy,n,Hangup()



Output:

-- Executing [109 at start:1] Dial("SIP/00085D182ACF-01771a90",
"Local/jimmy at testing,12,M(get_orig_channel)") in new stack



    -- Executing [s at macro-get_orig_channel:2]
NoOp("Local/jimmy at testing-d88e;1", "Originating channel was
SIP/00085D182ACF-01771a90") in new stack



    -- Executing [s at macro-get_orig_channel:2]
NoOp("SIP/00085D193AB5-017c8b30", "Originating channel was
Local/jimmy at testing-d88e;2") in new stack 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-08-04 14:28 lmadsen        Note Added: 0108613                          
======================================================================




More information about the asterisk-bugs mailing list