aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_phone.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-07-19 20:44:39 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-07-19 20:44:39 +0000
commit6049bb6539153c2f400f1f2dbc763c74d796204b (patch)
tree3c36781db3a5a7a08967cbe8d83acb5d82e581cb /channels/chan_phone.c
parent28df168d0f9fd12f5914263015dc26898e834146 (diff)
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: http://svn.digium.com/svn/asterisk/trunk@37988 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_phone.c')
-rw-r--r--channels/chan_phone.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/channels/chan_phone.c b/channels/chan_phone.c
index 99ce67a71..12ccba585 100644
--- a/channels/chan_phone.c
+++ b/channels/chan_phone.c
@@ -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);
}