OpenWrt Forum Archive

Topic: Asterisk and Music-on-hold

The content of this topic has been archived on 29 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello,
I have installed Asterisk 1.2 in Asus Wl-500G Premium and everything work fine except music-on-hold.

I put an MP3 file in /usr/lib/asterisk/mohmp3

this is my musiconhold.conf:

[default]
mode=quietmp3
directory=/usr/lib/asterisk/mohmp3

When I try to test the service I get:

May  9 11:58:19 NOTICE[10967] res_musiconhold.c: Request to schedule in the past?!?!

I read here:

http://www.voip-info.org/wiki/view/Asterisk+timer

that the problem could be related to timing, so I installed "dummy zaptel timer support" reported in this topic:

http://forum.openwrt.org/viewtopic.php?id=8198

but the problem still persist and I'm getting crazy.

Anyone can help?

(Last edited by vinx on 9 May 2007, 11:37)

Don't worry too much about it; try to solve it by implementing some of the suggestions in the following text:

  http://www.asteriskguru.com/tutorials/r … _past.html

As you can see there, your box doesn't quite meet the hardware advise for Asterisk; stuff like this can always happen.
Also: I would advise to upgrade to 1.4.x (better support; future proof) unless you can give a reason why this is impossible.

Hans.

I already read that document, off course without success...

This is the situation:

I was running asterisk 1.0 on my old wrt54g v1, then I moved on an Asus WL-500Gp and I upgraded to ver. 1.4 but I wasn't able to let it work, so I downgraded to ver 1.2 and everything work fine except th music-on-hold, I know this is not so important but......

vinx wrote:

Hello,
I have installed Asterisk 1.2 in Asus Wl-500G Premium and everything work fine except music-on-hold.

I put an MP3 file in /usr/lib/asterisk/mohmp3

this is my musiconhold.conf:

[default]
mode=quietmp3
directory=/usr/lib/asterisk/mohmp3

When I try to test the service I get:

May  9 11:58:19 NOTICE[10967] res_musiconhold.c: Request to schedule in the past?!?!

I read here:

http://www.voip-info.org/wiki/view/Asterisk+timer

that the problem could be related to timing, so I installed "dummy zaptel timer support" reported in this topic:

http://forum.openwrt.org/viewtopic.php?id=8198

but the problem still persist and I'm getting crazy.

Anyone can help?

Do you have quietmp3 player application installed?  Better don't go for it , use the native files  mode
Take the backup of your musiconhold.conf and have only following... Thanks

[default]                                                                     
mode=files                                                                     
directory=/usr/lib/asterisk/mohmp3

[native]                                                                       
mode=files                                                                     
directory=/usr/lib/asterisk/mohmp3

baba2s wrote:

Do you have quietmp3 player application installed?  Better don't go for it , use the native files  mode
Take the backup of your musiconhold.conf and have only following... Thanks

[default]                                                                     
mode=files                                                                     
directory=/usr/lib/asterisk/mohmp3

[native]                                                                       
mode=files                                                                     
directory=/usr/lib/asterisk/mohmp3

Already tried, dosn't work.

what kind of music files are needed for native mode?

vinx wrote:

I was running asterisk 1.0 on my old wrt54g v1, then I moved on an Asus WL-500Gp and I upgraded to ver. 1.4 but I wasn't able to let it work,

Can you indicate what went wrong for you with 1.4; I know people are running it succesfully on WL-500Gp so you should also be able to.
I would rather invest in solutions for 1.4 than for 1.2. Moreover: music-on-hold works just fine for me in 1.4...

Option 1 (external player for mp3s) :

[default]
mode=custom
directory=/usr/lib/asterisk/mohmp3
application=/usr/bin/madplay -Q -o raw:- --mono -R 8000 -a -12

with mp3 files in <directory>

Option 2 (convert your audio files according to: http://astrecipes.net/?n=152)

[default]
mode=files
directory=/usr/lib/asterisk/moh

Put your converted files in /usr/lib/asterisk/moh.
Both work just fine, with less CPU load for option 2.

Hans.

(Last edited by zandbelt on 9 May 2007, 20:48)

vinx wrote:

[Already tried, dosn't work.

what kind of music files are needed for native mode?

As Hans said, your MP3 file may be bad.
With above settings its worked for me in 1.2.x and working great in 1.4 on Asus WL-500Gp.

Thanks

zandbelt wrote:

Can you indicate what went wrong for you with 1.4; I know people are running it succesfully on WL-500Gp so you should also be able to.
I would rather invest in solutions for 1.4 than for 1.2. Moreover: music-on-hold works just fine for me in 1.4...

I don't know. I just insted ver. 1.4, copied sip.conf and extension.conf from 1.0 (working) and sip phones doesn't register, I was unable to register my geographic number with eutelia.

So I had need phone, so I uninstalled Ver 1.4 and installed ver 1.2 and with the same conf. files all worked lika a charm.

Probably in ver. 1.4 something has changed in conf. files, but right now I have no time to investigate.

zandbelt wrote:

Option 2 (convert your audio files according to: http://astrecipes.net/?n=152)

[default]
mode=files
directory=/usr/lib/asterisk/moh

Put your converted files in /usr/lib/asterisk/moh.
Both work just fine, with less CPU load for option 2.

Ok, I did option 2.
A strange behaviour happens. I copied tree files in /usr/lib/asterisk/moh respectly in wav, gms, ulaw coding.

I changed musiconhold.conf with this:

[default]
mode=files
directory=/usr/lib/asterisk/moh

I first reloaded res_musiconhold.so, then restarted asterisk, but still try to locate files in /usr/lib/asterisk/mohmp3 folder:

May 10 10:24:51 WARNING[1331]: file.c:512 ast_openstream_full: File /usr/lib/asterisk/mohmp3/domoo3 does not exist in any format
vinx wrote:
zandbelt wrote:

Can you indicate what went wrong for you with 1.4; I know people are running it succesfully on WL-500Gp so you should also be able to.
I would rather invest in solutions for 1.4 than for 1.2. Moreover: music-on-hold works just fine for me in 1.4...

I don't know. I just insted ver. 1.4, copied sip.conf and extension.conf from 1.0 (working) and sip phones doesn't register, I was unable to register my geographic number with eutelia.

So I had need phone, so I uninstalled Ver 1.4 and installed ver 1.2 and with the same conf. files all worked lika a charm.

Probably in ver. 1.4 something has changed in conf. files, but right now I have no time to investigate.

Is there a way to install asterisk 1.4 on a WRT54G v.1 ?

Now I have this one as a spare, and I can try to play with it, but the problem is the limited amount of flash (only 4Mb)

vinx wrote:

A strange behaviour happens. I copied tree files in /usr/lib/asterisk/moh respectly in wav, gms, ulaw coding.

I changed musiconhold.conf with this:

[default]
mode=files
directory=/usr/lib/asterisk/moh

I first reloaded res_musiconhold.so, then restarted asterisk, but still try to locate files in /usr/lib/asterisk/mohmp3 folder:

May 10 10:24:51 WARNING[1331]: file.c:512 ast_openstream_full: File /usr/lib/asterisk/mohmp3/domoo3 does not exist in any format

You obviously must have a mixup somewhere in your configs (or you're looking at an old log file); check that you don't have two asterisk installations that get mixed up

Hans.

The discussion might have continued from here.