Index: apps/app_dial.c =================================================================== --- apps/app_dial.c (revision 193831) +++ apps/app_dial.c (working copy) @@ -216,6 +216,7 @@ " You cannot use any additional action post answer options in conjunction\n" " with this option. Also, pbx services are not run on the peer (called) channel,\n" " so you will not be able to set timeouts via the TIMEOUT() function in this routine.\n" +" u - No early-media-bridging from caller to callee.\n" " w - Allow the called party to enable recording of the call by sending\n" " the DTMF sequence defined in the automon setting in the featuremap section\n" " of features.conf.\n" @@ -283,6 +284,7 @@ #define OPT_CANCEL_ELSEWHERE ((uint64_t)1 << 33) #define OPT_PEER_H ((uint64_t)1 << 34) #define OPT_CALLEE_GO_ON ((uint64_t)1 << 35) +#define OPT_NOCALLEEEARLYMEDIA ((uint64_t)1 << 36) enum { OPT_ARG_ANNOUNCE = 0, @@ -334,6 +336,7 @@ AST_APP_OPTION('W', OPT_CALLER_MONITOR), AST_APP_OPTION('x', OPT_CALLEE_MIXMONITOR), AST_APP_OPTION('X', OPT_CALLER_MIXMONITOR), + AST_APP_OPTION('u', OPT_NOCALLEEEARLYMEDIA), END_OPTIONS ); #define CAN_EARLY_BRIDGE(flags,chan,peer) (!ast_test_flag64(flags, OPT_CALLEE_HANGUP | \ @@ -862,8 +865,10 @@ ast_log(LOG_WARNING, "Unable to send URL\n"); if (single && ((f->frametype == AST_FRAME_VOICE) || (f->frametype == AST_FRAME_DTMF_BEGIN) || (f->frametype == AST_FRAME_DTMF_END))) { - if (ast_write(outgoing->chan, f)) - ast_log(LOG_WARNING, "Unable to forward voice or dtmf\n"); + if (f->frametype != AST_FRAME_VOICE || !ast_test_flag64(peerflags, OPT_NOCALLEEEARLYMEDIA)) { + if (ast_write(outgoing->chan, f)) + ast_log(LOG_WARNING, "Unable to forward voice or dtmf\n"); + } } if (single && (f->frametype == AST_FRAME_CONTROL) && ((f->subclass == AST_CONTROL_HOLD) || @@ -1421,7 +1426,7 @@ outbound_group = ast_strdupa(outbound_group); } ast_channel_unlock(chan); - ast_copy_flags64(peerflags, &opts, OPT_DTMF_EXIT | OPT_GO_ON | OPT_ORIGINAL_CLID | OPT_CALLER_HANGUP | OPT_IGNORE_FORWARDING); + ast_copy_flags64(peerflags, &opts, OPT_DTMF_EXIT | OPT_GO_ON | OPT_ORIGINAL_CLID | OPT_CALLER_HANGUP | OPT_IGNORE_FORWARDING | OPT_NOCALLEEEARLYMEDIA); /* loop through the list of dial destinations */ rest = args.peers;