From: Martin Pycko Date: Mon, 16 Jun 2003 16:58:47 +0000 (+0000) Subject: Check if the musiconholdclass was changed with setmusiconhold and if yes then play... X-Git-Tag: 0.5.0~400 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fb101603f049a62503af97df1d96f993a385a7ff;p=thirdparty%2Fasterisk.git Check if the musiconholdclass was changed with setmusiconhold and if yes then play that class git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1096 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_agent.c b/channels/chan_agent.c index 0b3d74e849..a798147776 100755 --- a/channels/chan_agent.c +++ b/channels/chan_agent.c @@ -592,6 +592,9 @@ static int login_exec(struct ast_channel *chan, void *data) if (p->chan) res = -1; if (!res) { + /* check if the moh class was changed with setmusiconhold */ + if (*(chan->musicclass)) + strncpy(p->moh, chan->musicclass, sizeof(p->moh) - 1); ast_moh_start(chan, p->moh); manager_event(EVENT_FLAG_AGENT, "Agentlogin", "Agent: %s\r\n"