|
|
@ -313,6 +313,8 @@ AST_APP_OPTIONS(dial_exec_options, {
|
|
|
|
AST_APP_OPTION('W', OPT_CALLER_MONITOR),
|
|
|
|
AST_APP_OPTION('W', OPT_CALLER_MONITOR),
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define CAN_EARLY_BRIDGE(flags) (!ast_test_flag64(flags, OPT_CALLEE_HANGUP) && !ast_test_flag64(flags, OPT_CALLER_HANGUP) && !ast_test_flag64(flags, OPT_CALLEE_TRANSFER) && !ast_test_flag64(flags, OPT_CALLER_TRANSFER) && !ast_test_flag64(flags, OPT_CALLEE_MONITOR) && !ast_test_flag64(flags, OPT_CALLER_MONITOR) && !ast_test_flag64(flags, OPT_CALLEE_PARK) && !ast_test_flag64(flags, OPT_CALLER_PARK))
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* The list of active channels
|
|
|
|
* The list of active channels
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -660,6 +662,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
|
|
|
|
DIAL_NOFORWARDHTML);
|
|
|
|
DIAL_NOFORWARDHTML);
|
|
|
|
ast_copy_string(c->dialcontext, "", sizeof(c->dialcontext));
|
|
|
|
ast_copy_string(c->dialcontext, "", sizeof(c->dialcontext));
|
|
|
|
ast_copy_string(c->exten, "", sizeof(c->exten));
|
|
|
|
ast_copy_string(c->exten, "", sizeof(c->exten));
|
|
|
|
|
|
|
|
if (CAN_EARLY_BRIDGE(peerflags))
|
|
|
|
/* Setup early bridge if appropriate */
|
|
|
|
/* Setup early bridge if appropriate */
|
|
|
|
ast_channel_early_bridge(in, peer);
|
|
|
|
ast_channel_early_bridge(in, peer);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -686,7 +689,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
|
|
|
|
case AST_CONTROL_RINGING:
|
|
|
|
case AST_CONTROL_RINGING:
|
|
|
|
ast_verb(3, "%s is ringing\n", c->name);
|
|
|
|
ast_verb(3, "%s is ringing\n", c->name);
|
|
|
|
/* Setup early media if appropriate */
|
|
|
|
/* Setup early media if appropriate */
|
|
|
|
if (single)
|
|
|
|
if (single && CAN_EARLY_BRIDGE(peerflags))
|
|
|
|
ast_channel_early_bridge(in, c);
|
|
|
|
ast_channel_early_bridge(in, c);
|
|
|
|
if (!(pa->sentringing) && !ast_test_flag64(outgoing, OPT_MUSICBACK)) {
|
|
|
|
if (!(pa->sentringing) && !ast_test_flag64(outgoing, OPT_MUSICBACK)) {
|
|
|
|
ast_indicate(in, AST_CONTROL_RINGING);
|
|
|
|
ast_indicate(in, AST_CONTROL_RINGING);
|
|
|
@ -696,7 +699,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
|
|
|
|
case AST_CONTROL_PROGRESS:
|
|
|
|
case AST_CONTROL_PROGRESS:
|
|
|
|
ast_verb(3, "%s is making progress passing it to %s\n", c->name, in->name);
|
|
|
|
ast_verb(3, "%s is making progress passing it to %s\n", c->name, in->name);
|
|
|
|
/* Setup early media if appropriate */
|
|
|
|
/* Setup early media if appropriate */
|
|
|
|
if (single)
|
|
|
|
if (single && CAN_EARLY_BRIDGE(peerflags))
|
|
|
|
ast_channel_early_bridge(in, c);
|
|
|
|
ast_channel_early_bridge(in, c);
|
|
|
|
if (!ast_test_flag64(outgoing, OPT_RINGBACK))
|
|
|
|
if (!ast_test_flag64(outgoing, OPT_RINGBACK))
|
|
|
|
ast_indicate(in, AST_CONTROL_PROGRESS);
|
|
|
|
ast_indicate(in, AST_CONTROL_PROGRESS);
|
|
|
@ -707,7 +710,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case AST_CONTROL_PROCEEDING:
|
|
|
|
case AST_CONTROL_PROCEEDING:
|
|
|
|
ast_verb(3, "%s is proceeding passing it to %s\n", c->name, in->name);
|
|
|
|
ast_verb(3, "%s is proceeding passing it to %s\n", c->name, in->name);
|
|
|
|
if (single)
|
|
|
|
if (single && CAN_EARLY_BRIDGE(peerflags))
|
|
|
|
ast_channel_early_bridge(in, c);
|
|
|
|
ast_channel_early_bridge(in, c);
|
|
|
|
if (!ast_test_flag64(outgoing, OPT_RINGBACK))
|
|
|
|
if (!ast_test_flag64(outgoing, OPT_RINGBACK))
|
|
|
|
ast_indicate(in, AST_CONTROL_PROCEEDING);
|
|
|
|
ast_indicate(in, AST_CONTROL_PROCEEDING);
|
|
|
|