mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-14 00:24:05 +00:00
merge Russell's 'hold_handling' branch, finally implementing music-on-hold handling the way it was decided at AstriDevCon Europe 2006 (and the way people really want it to be)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
4
pbx.c
4
pbx.c
@@ -5170,7 +5170,7 @@ static int pbx_builtin_waitexten(struct ast_channel *chan, void *data)
|
||||
ast_app_parse_options(waitexten_opts, &flags, opts, args.options);
|
||||
|
||||
if (ast_test_flag(&flags, WAITEXTEN_MOH))
|
||||
ast_moh_start(chan, opts[0]);
|
||||
ast_indicate_data(chan, AST_CONTROL_HOLD, opts[0], strlen(opts[0]));
|
||||
|
||||
/* Wait for "n" seconds */
|
||||
if (args.timeout && (ms = atof(args.timeout)) > 0)
|
||||
@@ -5195,7 +5195,7 @@ static int pbx_builtin_waitexten(struct ast_channel *chan, void *data)
|
||||
}
|
||||
|
||||
if (ast_test_flag(&flags, WAITEXTEN_MOH))
|
||||
ast_moh_stop(chan);
|
||||
ast_indicate(chan, AST_CONTROL_UNHOLD);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
Reference in New Issue
Block a user