@ -482,7 +482,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct dial_l
ast_clear_flag ( o , DIAL_STILLGOING ) ;
ast_clear_flag ( o , DIAL_STILLGOING ) ;
HANDLE_CAUSE ( cause , in ) ;
HANDLE_CAUSE ( cause , in ) ;
} else {
} else {
ast_rtp_make_compatible ( c , in );
ast_rtp_make_compatible ( c , in , single );
if ( c - > cid . cid_num )
if ( c - > cid . cid_num )
free ( c - > cid . cid_num ) ;
free ( c - > cid . cid_num ) ;
c - > cid . cid_num = NULL ;
c - > cid . cid_num = NULL ;
@ -550,6 +550,8 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct dial_l
OPT_CALLEE_HANGUP | OPT_CALLER_HANGUP |
OPT_CALLEE_HANGUP | OPT_CALLER_HANGUP |
OPT_CALLEE_MONITOR | OPT_CALLER_MONITOR |
OPT_CALLEE_MONITOR | OPT_CALLER_MONITOR |
DIAL_NOFORWARDHTML ) ;
DIAL_NOFORWARDHTML ) ;
/* Setup early media if appropriate */
ast_rtp_early_media ( in , peer ) ;
}
}
/* If call has been answered, then the eventual hangup is likely to be normal hangup */
/* If call has been answered, then the eventual hangup is likely to be normal hangup */
in - > hangupcause = AST_CAUSE_NORMAL_CLEARING ;
in - > hangupcause = AST_CAUSE_NORMAL_CLEARING ;
@ -576,6 +578,9 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct dial_l
case AST_CONTROL_RINGING :
case AST_CONTROL_RINGING :
if ( option_verbose > 2 )
if ( option_verbose > 2 )
ast_verbose ( VERBOSE_PREFIX_3 " %s is ringing \n " , c - > name ) ;
ast_verbose ( VERBOSE_PREFIX_3 " %s is ringing \n " , c - > name ) ;
/* Setup early media if appropriate */
if ( single )
ast_rtp_early_media ( in , c ) ;
if ( ! ( * sentringing ) & & ! ast_test_flag ( outgoing , OPT_MUSICBACK ) ) {
if ( ! ( * sentringing ) & & ! ast_test_flag ( outgoing , OPT_MUSICBACK ) ) {
ast_indicate ( in , AST_CONTROL_RINGING ) ;
ast_indicate ( in , AST_CONTROL_RINGING ) ;
( * sentringing ) + + ;
( * sentringing ) + + ;
@ -584,6 +589,9 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct dial_l
case AST_CONTROL_PROGRESS :
case AST_CONTROL_PROGRESS :
if ( option_verbose > 2 )
if ( option_verbose > 2 )
ast_verbose ( VERBOSE_PREFIX_3 " %s is making progress passing it to %s \n " , c - > name , in - > name ) ;
ast_verbose ( VERBOSE_PREFIX_3 " %s is making progress passing it to %s \n " , c - > name , in - > name ) ;
/* Setup early media if appropriate */
if ( single )
ast_rtp_early_media ( in , c ) ;
if ( ! ast_test_flag ( outgoing , OPT_RINGBACK ) )
if ( ! ast_test_flag ( outgoing , OPT_RINGBACK ) )
ast_indicate ( in , AST_CONTROL_PROGRESS ) ;
ast_indicate ( in , AST_CONTROL_PROGRESS ) ;
break ;
break ;
@ -595,6 +603,8 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct dial_l
case AST_CONTROL_PROCEEDING :
case AST_CONTROL_PROCEEDING :
if ( option_verbose > 2 )
if ( option_verbose > 2 )
ast_verbose ( VERBOSE_PREFIX_3 " %s is proceeding passing it to %s \n " , c - > name , in - > name ) ;
ast_verbose ( VERBOSE_PREFIX_3 " %s is proceeding passing it to %s \n " , c - > name , in - > name ) ;
if ( single )
ast_rtp_early_media ( in , c ) ;
if ( ! ast_test_flag ( outgoing , OPT_RINGBACK ) )
if ( ! ast_test_flag ( outgoing , OPT_RINGBACK ) )
ast_indicate ( in , AST_CONTROL_PROCEEDING ) ;
ast_indicate ( in , AST_CONTROL_PROCEEDING ) ;
break ;
break ;
@ -1056,7 +1066,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
}
}
/* Setup outgoing SDP to match incoming one */
/* Setup outgoing SDP to match incoming one */
ast_rtp_make_compatible ( tmp - > chan , chan );
ast_rtp_make_compatible ( tmp - > chan , chan , ! outgoing & & ! rest );
/* Inherit specially named variables from parent channel */
/* Inherit specially named variables from parent channel */
ast_channel_inherit_variables ( chan , tmp - > chan ) ;
ast_channel_inherit_variables ( chan , tmp - > chan ) ;
@ -1550,6 +1560,7 @@ out:
sentringing = 0 ;
sentringing = 0 ;
ast_indicate ( chan , - 1 ) ;
ast_indicate ( chan , - 1 ) ;
}
}
ast_rtp_early_media ( chan , NULL ) ;
hanguptree ( outgoing , NULL ) ;
hanguptree ( outgoing , NULL ) ;
pbx_builtin_setvar_helper ( chan , " DIALSTATUS " , status ) ;
pbx_builtin_setvar_helper ( chan , " DIALSTATUS " , status ) ;
if ( option_debug )
if ( option_debug )