]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Check if the musiconholdclass was changed with setmusiconhold and if yes then play...
authorMartin Pycko <martinp@digium.com>
Mon, 16 Jun 2003 16:58:47 +0000 (16:58 +0000)
committerMartin Pycko <martinp@digium.com>
Mon, 16 Jun 2003 16:58:47 +0000 (16:58 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1096 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_agent.c

index 0b3d74e8491cdca64761a575faf3ddce0c93f771..a798147776dbe89f87faa879b7f7f0f1ceee2e49 100755 (executable)
@@ -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"