From: Joshua Colp Date: Mon, 19 Oct 2009 19:50:12 +0000 (+0000) Subject: Merged revisions 224567 via svnmerge from X-Git-Tag: 1.6.0.18-rc1~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e23fe4185756a23c314fb9eb3e21df19b7884e35;p=thirdparty%2Fasterisk.git Merged revisions 224567 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r224567 | file | 2009-10-19 16:49:09 -0300 (Mon, 19 Oct 2009) | 12 lines Merged revisions 224565 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r224565 | file | 2009-10-19 16:47:50 -0300 (Mon, 19 Oct 2009) | 5 lines Do not attempt early media bridging (ie: direct RTP setup) if options are enabled that should prevent it. (closes issue #14763) Reported by: cupotka ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@224568 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_dial.c b/apps/app_dial.c index 30a8bc5951..7b3f3ef27a 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -333,7 +333,8 @@ END_OPTIONS ); #define CAN_EARLY_BRIDGE(flags,chan,peer) (!ast_test_flag64(flags, OPT_CALLEE_HANGUP | \ OPT_CALLER_HANGUP | OPT_CALLEE_TRANSFER | OPT_CALLER_TRANSFER | \ - OPT_CALLEE_MONITOR | OPT_CALLER_MONITOR | OPT_CALLEE_PARK | OPT_CALLER_PARK) && \ + OPT_CALLEE_MONITOR | OPT_CALLER_MONITOR | OPT_CALLEE_PARK | \ + OPT_CALLER_PARK | OPT_ANNOUNCE | OPT_CALLEE_MACRO | OPT_CALLEE_GOSUB) && \ !chan->audiohooks && !peer->audiohooks) /* @@ -531,7 +532,9 @@ static void do_forward(struct chanlist *o, char *new_cid_num, *new_cid_name; struct ast_channel *src; - ast_rtp_make_compatible(c, in, single); + if (CAN_EARLY_BRIDGE(peerflags, c, in)) { + ast_rtp_make_compatible(c, in, single); + } if (ast_test_flag64(o, OPT_FORCECLID)) { new_cid_num = ast_strdup(S_OR(in->macroexten, in->exten)); new_cid_name = NULL; /* XXX no name ? */ @@ -1399,7 +1402,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags outbound_group = pbx_builtin_getvar_helper(chan, "OUTBOUND_GROUP"); } - 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_ANNOUNCE | OPT_CALLEE_MACRO | OPT_CALLEE_GOSUB); /* loop through the list of dial destinations */ rest = args.peers; @@ -1510,7 +1513,9 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags pbx_builtin_setvar_helper(tc, "DIALEDPEERNUMBER", numsubst); /* Setup outgoing SDP to match incoming one */ - ast_rtp_make_compatible(tc, chan, !outgoing && !rest); + if (CAN_EARLY_BRIDGE(peerflags, chan, tc)) { + ast_rtp_make_compatible(tc, chan, !outgoing && !rest); + } /* Inherit specially named variables from parent channel */ ast_channel_inherit_variables(chan, tc);