Thank you for your responses on this topic. How can I implement this here?
https://docs.asterisk.org/Asterisk_22_Documentation/API_Documentation/Module_Configuration/res_pjsip/#suppress_moh_on_sendonly
Do I need to do this in the pjsip.conf or in the extensions.conf, and what should I enter? Is that right on pjsip.conf?
suppress_moh_on_sendonly=yes
EDIT: I have now used suppress_moh_on_sendonly=yes
in pjsip.conf
, but now the other party does not hear my MOH anymore. However, my goal is that the other party hears my MOH, but if the other party puts me on hold in their own queue, I should not hear my MOH but the MOH from the other party instead. Does that means that I have to use “no” instead of “yes” or maybe it’s a problem that I use moh_suggest=MyOwnMOH for the phone endpoint? So maybe it’s moh_passthrough=yes that I want?
So my pjsip.conf looks like this:
[MySIPTrunk]
…
moh_passthrough=yes
…
and
[MyPhoneEndpoint]
…
moh_suggest=MyOwnMOH_2
…
Ok, moh_passthrough=yes
doesn’t work, because the callee hears either my MOH or their own provider’s MOH. I’m not sure at this point, but I think I’ve found the problem in my musiconhold.conf
:
[default]
mode=files
directory=/etc/asterisk/sounds/MOH/MyOwnMOH_1
[MyOwnMOH]
mode=files
directory=/etc/asterisk/sounds/MOH/MyOwnMOH_2
In pjsip.conf
, I use moh_suggest=MyOwnMOH_2
for the phone endpoint, and I think that the provider endpoint, which does not include a moh_suggest
, will use the default
section from musiconhold.conf
and plays MyOwnMOH_2
. So, should I remove the default
section in musiconhold.conf
?