# MoH silence

**URL:** <https://community.asterisk.org/t/moh-silence/41386>\
**Category:** Asterisk Support\
**Created:** [December 19, 2012, 7:38pm UTC](https://community.asterisk.org/t/moh-silence/41386 "2012-12-19T19:38:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebbor](https://avatars.discourse-cdn.com/v4/letter/s/a8b319/32.png) [@sebbor](https://community.asterisk.org/u/sebbor)\
**Post date:** [December 19, 2012, 7:38pm UTC](https://community.asterisk.org/t/moh-silence/41386/1 "2012-12-19T19:38:42Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![david55](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@david55](https://community.asterisk.org/u/david55)\
**Post date:** [December 19, 2012, 10:22pm UTC](https://community.asterisk.org/t/moh-silence/41386/2 "2012-12-19T22:22:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![MasterLog](https://avatars.discourse-cdn.com/v4/letter/m/f04885/32.png) [@MasterLog](https://community.asterisk.org/u/MasterLog)\
**Post date:** [December 20, 2012, 4:26am UTC](https://community.asterisk.org/t/moh-silence/41386/3 "2012-12-20T04:26:32Z")

</div>

Hi. Maybe your problem is related with mine?  
[viewtopic.php?f=1&t=85188&start=0](http://forums.asterisk.org/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

---

<div class="post-metadata">

**Author:** ![sebbor](https://avatars.discourse-cdn.com/v4/letter/s/a8b319/32.png) [@sebbor](https://community.asterisk.org/u/sebbor)\
**Post date:** [December 24, 2012, 9:14am UTC](https://community.asterisk.org/t/moh-silence/41386/4 "2012-12-24T09:14:54Z")

</div>

[quote=“MasterLog”]Hi. Maybe your problem is related with mine?  
[viewtopic.php?f=1&t=85188&start=0](http://forums.asterisk.org/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…

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [February 16, 2013, 11:16am UTC](https://community.asterisk.org/t/moh-silence/41386/5 "2013-02-16T11:16:30Z")

</div>

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](http://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](http://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?

---

<div class="post-metadata">

**Author:** ![david55](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@david55](https://community.asterisk.org/u/david55)\
**Post date:** [February 16, 2013, 1:38pm UTC](https://community.asterisk.org/t/moh-silence/41386/6 "2013-02-16T13:38:16Z")

</div>

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?
