T
T
Talyan2019-12-15 09:43:43
linux
Talyan, 2019-12-15 09:43:43

Is it possible to have different Music on hold in Asterisk?

Hello.
Can you please tell me if it is possible to install different MoH in different contexts?
Since this music is set by the m parameter in the Dial() function, it turns out that I can either put the Music on hold filled by me by default, or leave nothing (do not specify the m parameter).

extensions.conf with regular MoH
[company_support]
exten => s,1,System(echo "${CALLERID(num)} - ${STRFTIME(${EPOCH},,%Y.%m.%d-%H:%M:%S)}" >> /var/log/asterisk/support)
exten => s,2,Dial(SIP/1001,25,m)

This is how the usual general Music on hold plays.
Tried to do like this:
extensions.conf with sound but no ringtone
[company_support]
exten => s,1,System(echo "${CALLERID(num)} - ${STRFTIME(${EPOCH},,%Y.%m.%d-%H:%M:%S)}" >> /var/log/asterisk/support)
exten => s,2,Background(/var/lib/asterisk/IVR/company/tyzhprogrammist)
exten => s,3,Dial(SIP/1001,25)

Noo yes - background music is playing, but the call to 1001 is not made until the music finishes playing. It is understandable - until the first event is completed, the second should not begin.
Therefore, the question is how to make exactly different music when translating calls for different extensions.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Shitskov, 2019-12-15
@flapflapjack

asterisk.ru/knowledgebase/Asterisk+cmd+SetMusicOnHold
Also, the music class from musiconhold.conf can be passed as a parameter to Dial via m(mymusic)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question