From b5a6de76fc71e3f604761885dd844975a11893ee Mon Sep 17 00:00:00 2001 From: Kinsey Moore Date: Mon, 14 May 2012 19:44:27 +0000 Subject: Commit framework for HANGUPCAUSE (replacement for SIP_CAUSE) This is the starting point for the Asterisk 11: Who Hung Up work and provides a framework which will allow channel drivers to report the types of hangup cause information available in SIP_CAUSE without incurring the overhead of the MASTER_CHANNEL dialplan function. The initial implementation only includes cause generation for chan_sip and does not include cause code translation utilities. This change deprecates SIP_CAUSE and replaces its method of reporting cause codes with the new framework. This change also deprecates the 'storesipcause' option in sip.conf. Review: https://reviewboard.asterisk.org/r/1822/ (Closes issue SWP-4221) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366408 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- include/asterisk/frame.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/asterisk/frame.h b/include/asterisk/frame.h index 4e013534d..2c1d43cdf 100644 --- a/include/asterisk/frame.h +++ b/include/asterisk/frame.h @@ -266,6 +266,7 @@ enum ast_control_frame_type { AST_CONTROL_INCOMPLETE = 30, /*!< Indication that the extension dialed is incomplete */ AST_CONTROL_MCID = 31, /*!< Indicate that the caller is being malicious. */ AST_CONTROL_UPDATE_RTP_PEER = 32, /*!< Interrupt the bridge and have it update the peer */ + AST_CONTROL_PVT_CAUSE_CODE = 33, /*!< Contains an update to the protocol-specific cause-code stored for branching dials */ }; enum ast_frame_read_action { @@ -324,6 +325,12 @@ enum ast_control_transfer { AST_TRANSFER_FAILED, /*!< Transfer request on the channel failed */ }; +struct ast_control_pvt_cause_code { + char chan_name[AST_CHANNEL_NAME]; /*!< Name of the channel that originated the cause information */ + unsigned int emulate_sip_cause:1; /*!< Indicates whether this should be used to emulate SIP_CAUSE support */ + char code[1]; /*!< Tech-specific cause code information, beginning with the name of the tech */ +}; + #define AST_SMOOTHER_FLAG_G729 (1 << 0) #define AST_SMOOTHER_FLAG_BE (1 << 1) -- cgit v1.2.3