mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-03 03:02:15 +00:00
Add HANGUPCAUSE information to callee channels
This adds HANGUPCAUSE information to called channels so that hangup handlers can, in conjunction with predial dialplan execution, access the hangupcause information when the dialed channel hangs up on a one-to-one basis instead of a many-to-one basis as with HANGUPCAUSE usage on the caller channel. Review: https://reviewboard.asterisk.org/r/2069/ (closes issue ASTERISK-20198) ........ Merged revisions 371258 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2819,6 +2819,7 @@ static struct ast_frame *__analog_handle_event(struct analog_pvt *p, struct ast_
|
||||
cause_code->ast_cause = AST_CAUSE_NETWORK_OUT_OF_ORDER;
|
||||
case ANALOG_EVENT_ONHOOK:
|
||||
ast_queue_control_data(ast, AST_CONTROL_PVT_CAUSE_CODE, cause_code, data_size);
|
||||
ast_channel_hangupcause_hash_set(ast, cause_code, data_size);
|
||||
switch (p->sig) {
|
||||
case ANALOG_SIG_FXOLS:
|
||||
case ANALOG_SIG_FXOGS:
|
||||
@@ -3498,6 +3499,7 @@ winkflashdone:
|
||||
if (p->hanguponpolarityswitch) {
|
||||
ast_debug(1, "HangingUp on polarity switch! channel %d\n", p->channel);
|
||||
ast_queue_control_data(ast, AST_CONTROL_PVT_CAUSE_CODE, cause_code, data_size);
|
||||
ast_channel_hangupcause_hash_set(ast, cause_code, data_size);
|
||||
ast_softhangup(p->owner, AST_SOFTHANGUP_EXPLICIT);
|
||||
p->polarity = POLARITY_IDLE;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user