Res_musiconhold spontaneously fail

Hi all, I’m having a problem with my Asterisk 13.13.0. In a stablised call, when the destiny put me on hold (on other PBX not-Asterisk) my Asterisk starts musiconhold on my channel. It only happends with a few calls. I thing the other person in the other PBX sends a DTMF and my Asterisk is reading it. Here you are the log:

[Jan 12 13:09:59] VERBOSE[37568][C-00020080] app_dial.c: SIP/9072-00023550 answered SIP/trunk4-0002354b
[Jan 12 13:09:59] VERBOSE[37955][C-00020080] bridge_channel.c: Channel SIP/9072-00023550 joined 'simple_bridge' basic-bridge <602f811b-3f2a-4834-903f-1065e8d8972c>
[Jan 12 13:09:59] VERBOSE[37568][C-00020080] bridge_native_rtp.c: Locally RTP bridged 'SIP/trunk4-0002354b' and 'SIP/9072-00023550' in stack
[Jan 12 13:09:59] VERBOSE[37568][C-00020080] bridge_native_rtp.c: Locally RTP bridged 'SIP/trunk4-0002354b' and 'SIP/9072-00023550' in stack
[Jan 12 13:10:06] VERBOSE[37955][C-00020080] res_musiconhold.c: Started music on hold, class 'default', on channel 'SIP/9072-00023550'
[Jan 12 13:10:06] VERBOSE[37955][C-00020080] bridge_native_rtp.c: Locally RTP bridged 'SIP/trunk4-0002354b' and 'SIP/9072-00023550' in stack

Please, how can i fix it? Thanks!

I don’t see anything wrong.

Music on hold is triggered by sending a= with something other than active, or sending a zero media destination; it is not triggered by the receipt of DTMF.

If you don’t want Asterisk to detect a hold, you must stop the peer from signalling one.

thanks for the answer, and how can i do this?

Ask the people that support the product used for the peer.

In any case, why is it a problem?

i can’t ask to that people …
The problem is that in my channel, in my Asterisk i ear the external music on hold and my at the same time, and when the destiny stops the hold, i still earing my music on hold.

You can avoid the first problem by either disabling direct media, or by ensuring that both the specific and default music on hold are invalid (although this involves relying on how an invalid configuration is handled).

The problem is that SDP uses a=sendonly to mean both hold and that it is sending but not receiving media. When a phone goes on hold, it generally doesn’t end media, but when a PABX does, it often does send media. If you have direct media, the upstream system sees a direct feed from the downstream and one from Asterisk. chan_sip does not re-invite the media back to itself when it sees sendonly. I don’t know if pjsip is different.

The second problem suggests a protocol error, so you will need to provide the full protocol log for a failing session.

thanks again for you patient. In sip.conf i have:
directmedia=no
since ever. I can’t change or ask to the other PBX administrators, i need to block “external request” to my Ansterisk, there is no other ways?

People often specify both names for directmedia, so make sure you haven’t set a conflicting setting under canreinvite.

As far as I can remember, Asterisk should not forward media if it is running a generator on the channel, so this sort of conflict normally only happens with direct media, however my memory could be wrong, as we had a very strong preference for direct media.

The other way was to deliberately break music on hold.

i haven’t a solution yet. I’ve searching a lot and this problem happens since a decade. Please help, how to avoid Asterisk accept remote party codes?