Music on Hold problem

I’m having problems with Music on Hold for incoming calls.
Basically music on hold is working.

If I am on a call with someone and I put them on hold, they hear hold music. I have tested this both on the local network and from the PSTN.

I have also created an extension that puts the call on hold automatically ( ie: exten => MusicOnHold() ) and if I dial this extension from the local network this also works fine

However if an incoming SIP call arrives from the PSTN and I direct it to use music on hold ( ie: exten => MusicOnHold() ) it will put the call on hold but they will hear no music.

The call is definitely on hold and I see no error messages in /var/log/asterisk /messages.

My extensions.conf is setup like this:

[incoming]
exten => s,1,Answer()
exten => s,2,MusicOnHold()
exten => s,3,Hangup()

I have tried using both mp3 and the line in port of my sound card for hold music. Neither work

And I should note that sound is working both ways for normal calls. It is only musiconhold which is not transmitting sound over the PSTN

Please Help

Sorry to bump this up but I am desperate to find a solution
I have recently tried 3 different builds of asterisk - 1.2.13, 1.2.24, 1.4.11. All have the same issue.

Just a thought also. Is it possible that this is a NAT issue?

I don’t think it’s a nat issue.
The call is coming from pstn using the sip protocol, so through a sip gateway ?

Bye.

Marco Bruni

Also switch on the rtp debug with “rtp debug” cli command and check if any rtp packet is sent to the client that is on hold.

Bye.

Marco Bruni

Hi
plz check with this after answer plz set as
exten => 1,2,setmuscionholf()
in the braket specific MOH that u inculde in moh.conf

may this help you

thanks

Thank you both for replying.
I turned RTP debugging on and saw no logs when I dialled in. I’m guessing this means that the asterisk box is not even attempting to play music on hold.

Also tried amits suggestion but again the same issue occurs.

Does anybody know of any other realtime logs I can look at?
Or is there anybody out there who has had this issue before?

Music on hold needs a timing source, so if you don’t have any zaptel hardware load the module ztdummy, restart * and try again.

Bye.

Marco Bruni

Hi

try setting up an extensions to test it.

extensions.conf:exten => 519,1,Answer extensions.conf:exten => 519,n,MusicOnHold()

or

extensions.conf:exten => 519,1,Answer extensions.conf:exten => 519,n,WaitMusicOnHold(60)

if you only want to delay them.

this way you can dialit internally to check it works

Ian