mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +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:
@@ -64,6 +64,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
#include "asterisk/callerid.h"
|
||||
#include "asterisk/causes.h"
|
||||
#include "asterisk/stringfields.h"
|
||||
#include "asterisk/musiconhold.h"
|
||||
|
||||
#include "DialTone.h"
|
||||
|
||||
@@ -219,6 +220,12 @@ static int phone_indicate(struct ast_channel *chan, int condition, const void *d
|
||||
p->lastformat = -1;
|
||||
res = 0;
|
||||
break;
|
||||
case AST_CONTROL_HOLD:
|
||||
ast_moh_start(chan, data, NULL);
|
||||
break;
|
||||
case AST_CONTROL_UNHOLD:
|
||||
ast_moh_stop(chan);
|
||||
break;
|
||||
default:
|
||||
ast_log(LOG_WARNING, "Condition %d is not supported on channel %s\n", condition, chan->name);
|
||||
}
|
||||
|
Reference in New Issue
Block a user