MoH silence

I’ve read some MoH treads but didn’t find anything that would help me…

I try to use MusicOnHold while incoming call is waiting for internal phone to answer. I have in my incoming context:

exten => MYNUMBERHERE,1,Dial(SIP/550,30,m(mohclass))

while in musiconhold.conf:

[mohclass]
mode=files
directory=/var/lib/asterisk/mohmp3/mohclass

and few different format files (wav, sln, gsm) in this directory. When I make a call from outside there is silence (I don’t hear ring also). In CLI i see like MoH is being played but in fact it doesn’t.

– Accepting call from ‘602xxxxxx’ to ‘618xxxxxx’ on channel 0/12, span 1
– Executing [618xxxxxx@incoming:1] Dial(“DAHDI/i1/602xxxxxx-770a”, “SIP/550,30,m(mohclass)”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called SIP/550
Started music on hold, class ‘mohclass’, on DAHDI/i1/602xxxxxx-770a
– SIP/550-00000783 is ringing
– SIP/550-00000783 is ringing
– Span 1: Channel 0/12 got hangup request, cause 16
– Stopped music on hold on DAHDI/i1/602xxxxxx-770a
== Spawn extension (incoming 618xxxxxx, 1) exited non-zero on ‘DAHDI/i1/602xxxxxx-770a’
– Hungup ‘DAHDI/i1/602xxxxxx-770a’

So it looks like Asterisk is playing MoH but as a caller I don’t hear anything. Something with format. What do you suggest? I tried few formats: gsm, wav, sln and nothing…

m generates early media. Early media isn’t possible on analogue phone lines and most ISDN operators will not pass it, because it would otherwise the allow the operation of free information lines.

Also, I believe, the Progress application now has to be called explicitly to allow early media.

The easiest solution is to answer the call before Dialing, but the caller is likely to get charged from the start, rather than the outgoing answer.

Hi. Maybe your problem is related with mine?
viewtopic.php?f=1&t=85188&start=0
When you call your asterisk, even if the call is not picked up, does the cellphone timer is rinning?
Bye

[quote=“MasterLog”]Hi. Maybe your problem is related with mine?
viewtopic.php?f=1&t=85188&start=0
When you call your asterisk, even if the call is not picked up, does the cellphone timer is rinning?
Bye[/quote]

No, cellphone timer i fine, I have problem only with silence MoH.

I will try with Answer and Progress stuff…

I’m having the same problem. I tried various things but cannot get the MusicOnHold to play sound.

As I cannot seem to get mpg123 to install, I have to use madplay. Currently, I’m having the following musiconhold.conf

[default]
mode=custom
application=/mnt/usb/etc/asterisk/mohstream.sh

where the mohstream.sh has:

/mnt/usb/usr/bin/madplay /mnt/usb/usr/lib/asterisk/mohmp3/moh1.mp3 -Qzr -o raw:- --mono -R 8000 -a -12

When I run the mohstream.sh seperately from Asterisk, then I get all “strange characters” in my console (where I suspect the mp3 file is being played?)

Can anyone help with this?

Doesn’t seem to be the same problem.

As there is no quality advantage in using MP3, and transcoding at run time is expensive, why not just pre-convert it to the codecs that are actually used?