@ -133,8 +133,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
< para > Reset the call detail record ( CDR ) for this call . < / para >
< / option >
< option name = " c " >
< para > If the Dial ( ) application cancels this call , always set the flag to tell the channel
driver that the call is answered elsewhere . < / para >
< para > If the Dial ( ) application cancels this call , always set HANGUPCAUSE to ' answered elsewhere ' < / para >
< / option >
< option name = " d " >
< para > Allow the calling user to dial a 1 digit extension while waiting for
@ -727,8 +726,6 @@ static void hanguptree(struct dial_head *out_chans, struct ast_channel *exceptio
/* Hangup any existing lines we have open */
if ( outgoing - > chan & & ( outgoing - > chan ! = exception ) ) {
if ( answered_elsewhere ) {
/* The flag is used for local channel inheritance and stuff */
ast_set_flag ( ast_channel_flags ( outgoing - > chan ) , AST_FLAG_ANSWERED_ELSEWHERE ) ;
/* This is for the channel drivers */
ast_channel_hangupcause_set ( outgoing - > chan , AST_CAUSE_ANSWERED_ELSEWHERE ) ;
}
@ -2515,12 +2512,12 @@ static int dial_exec_full(struct ast_channel *chan, const char *data, struct ast
if ( outbound_group )
ast_app_group_set_channel ( tc , outbound_group ) ;
/* If the calling channel has the ANSWERED_ELSEWHERE flag set, inherit it. This is to support local channels */
if ( ast_ test_flag( ast_channel_flags ( chan ) , AST_FLAG_ANSWERED_ELSEWHERE ) )
ast_ set_flag( ast_channel_flags ( tc ) , AST_FLAG _ANSWERED_ELSEWHERE) ;
if ( ast_ channel_hangupcause( chan ) = = AST_CAUSE_ANSWERED_ELSEWHERE )
ast_ channel_hangupcause_set( tc , AST_CAUSE _ANSWERED_ELSEWHERE) ;
/* Check if we're forced by configuration */
if ( ast_test_flag64 ( & opts , OPT_CANCEL_ELSEWHERE ) )
ast_ set_flag( ast_channel_flags ( tc ) , AST_FLAG _ANSWERED_ELSEWHERE) ;
ast_ channel_hangupcause_set( tc , AST_CAUSE _ANSWERED_ELSEWHERE) ;
/* Inherit context and extension */
@ -3079,11 +3076,11 @@ out:
}
ast_channel_early_bridge ( chan , NULL ) ;
hanguptree ( & out_chans , NULL , 0 ) ; /* In this case, there's no answer anywhere */
hanguptree ( & out_chans , NULL , ast_channel_hangupcause ( chan ) = = AST_CAUSE_ANSWERED_ELSEWHERE ? 1 : 0 ) ; /* forward 'answered elsewhere' if we received it */
pbx_builtin_setvar_helper ( chan , " DIALSTATUS " , pa . status ) ;
senddialendevent ( chan , pa . status ) ;
ast_debug ( 1 , " Exiting with DIALSTATUS=%s. \n " , pa . status ) ;
if ( ( ast_test_flag64 ( peerflags , OPT_GO_ON ) ) & & ! ast_check_hangup ( chan ) & & ( res ! = AST_PBX_INCOMPLETE ) ) {
if ( ! ast_tvzero ( calldurationlimit ) )
memset ( ast_channel_whentohangup ( chan ) , 0 , sizeof ( * ast_channel_whentohangup ( chan ) ) ) ;