* Added progress option to the app_dial D() option. When progress DTMF is
present, those values are sent immediatly upon receiving a PROGRESS message
regardless if the call has been answered or not.
+ * Added functionality to the app_dial F() option to continue with execution
+ at the current location when no parameters are provided.
Dialplan Functions
------------------
<para>When the caller hangs up, transfer the called party
to the specified destination and continue execution at that location.</para>
</option>
+ <option name="F">
+ <para>Proceed with dialplan execution at the next priority in the current extension if the
+ source channel hangs up.</para>
+ </option>
<option name="g">
<para>Proceed with dialplan execution at the next priority in the current extension if the
destination channel hangs up.</para>
}
ast_set2_flag(peer, autoloopflag, AST_FLAG_IN_AUTOLOOP); /* set it back the way it was */
}
- if (!ast_check_hangup(peer) && ast_test_flag64(&opts, OPT_CALLEE_GO_ON) && !ast_strlen_zero(opt_args[OPT_ARG_CALLEE_GO_ON])) {
- replace_macro_delimiter(opt_args[OPT_ARG_CALLEE_GO_ON]);
- ast_parseable_goto(peer, opt_args[OPT_ARG_CALLEE_GO_ON]);
+ if (!ast_check_hangup(peer) && ast_test_flag64(&opts, OPT_CALLEE_GO_ON)) {
+ if(!ast_strlen_zero(opt_args[OPT_ARG_CALLEE_GO_ON])) {
+ replace_macro_delimiter(opt_args[OPT_ARG_CALLEE_GO_ON]);
+ ast_parseable_goto(peer, opt_args[OPT_ARG_CALLEE_GO_ON]);
+ } else { /* F() */
+ int res;
+ res = ast_goto_if_exists(peer, chan->context, chan->exten, (chan->priority) + 1);
+ if (res == AST_PBX_GOTO_FAILED) {
+ ast_hangup(peer);
+ goto out;
+ }
+ }
ast_pbx_start(peer);
} else {
if (!ast_check_hangup(chan))
goto_func = (async) ? ast_async_goto : ast_explicit_goto;
if (ast_exists_extension(chan, context, exten, priority, chan->cid.cid_num))
return goto_func(chan, context, exten, priority);
- else
- return -3;
+ else {
+ return AST_PBX_GOTO_FAILED;
+ }
}
int ast_goto_if_exists(struct ast_channel *chan, const char* context, const char *exten, int priority)