Hi,
I have searched this ad naseum, but still can’t find an answer, except perhaps that it can’t be done.
I have an extension that does not want hold music to be heard on the other end when they answer a second line, or put them on hold.
I have looked at mohsuggest, mohinterpret, SetMusicOnHold(), SetMusicClass() but nothing seems to work to override the default nature of asterisk.
When 200 calls 300 and places 300 on hold - default moh plays. If 200 places 300 on hold, I get silence.
When 300 calls 200 and places 200 on hold - default moh plays. If 300 places 200 on hold, I get silence.
In sip.conf:
musiconhold=none
musicclass=none
mohsuggest=none
mohinterpret=none
In musiconhold.conf
[none]
mode=files
directory=/var/lib/asterisk/mohmp3/none
(this directory only contains 10.gsm - 10 seconds of silence)
In my dial plan:
[macro-nomusic]
exten => s,1,NoOp(Turn off MOH for this channel)
exten => s,2,SetMusicOnHold(none)
;
; ***** END OF CONTEXT [nomusic]
[internal-extensions-check]
.
.
.
exten => 200,1,SetMusicOnHold(none)
exten => 200,n,Dial(SIP/9025551234200,20,Tt,M(nomusic))
;
exten => 300,1,SetMusicOnHold(none)
exten => 300,n,Dial(SIP/9025551234300,20,Tt,M(nomusic))