MOH stops

How can I get my MOH(Music On Hold) working?

When I put an extension on hold I get:

Called 1200
– SIP/1200-081a4b88 is ringing

  • SIP/1200-081a4b88 answered SIP/1203-08182e10
  • Started music on hold, class ‘default’, on channel ‘SIP/1200-081a4b88’
    [color=red]Stopped music on hold[/color] on SIP/1200-081a4b88

So the MOH starts, but stops directly afterwords :unamused:

(First I didn’t have any mp3 files in /var/lib/asterisk/mohmp3.
Then I got:
Found no files in /var/lib/asterisk/mohmp3
Unable to spawn mp3player.

then I put a mp3 file in /var/lib/asterisk/mohmp3 and I got the above message )

[quote=“henkoegema”]How can I get my MOH(Music On Hold) working?

When I put an extension on hold I get:

Called 1200
– SIP/1200-081a4b88 is ringing

  • SIP/1200-081a4b88 answered SIP/1203-08182e10
  • Started music on hold, class ‘default’, on channel ‘SIP/1200-081a4b88’
    [color=red]Stopped music on hold[/color] on SIP/1200-081a4b88

So the MOH starts, but stops directly afterwords :unamused:

(First I didn’t have any mp3 files in /var/lib/asterisk/mohmp3.
Then I got:
Found no files in /var/lib/asterisk/mohmp3
Unable to spawn mp3player.

then I put a mp3 file in /var/lib/asterisk/mohmp3 and I got the above message )[/quote]

Some additional info:
During compiling *
make clean
make mpg123

I got error:

make[3]: *** No rule to make target \ ', needed bympg123’. Stop.
make[3]: Leaving directory /usr/src/asterisk-1.2.15/mpg123-0.59r' make[2]: *** [mpg123-make] Error 2 make[2]: Leaving directory/usr/src/asterisk-1.2.15/mpg123-0.59r’
make[1]: *** [linux] Error 2
make[1]: Leaving directory `/usr/src/asterisk-1.2.15/mpg123-0.59r’
make: *** [mpg123] Error 2
asterisk:/usr/src/asterisk-1.2.15 #

[quote=“henkoegema”]How can I get my MOH(Music On Hold) working?

When I put an extension on hold I get:

Called 1200
– SIP/1200-081a4b88 is ringing

  • SIP/1200-081a4b88 answered SIP/1203-08182e10
  • Started music on hold, class ‘default’, on channel ‘SIP/1200-081a4b88’
    [color=red]Stopped music on hold[/color] on SIP/1200-081a4b88

So the MOH starts, but stops directly afterwords :unamused:

(First I didn’t have any mp3 files in /var/lib/asterisk/mohmp3.
Then I got:
Found no files in /var/lib/asterisk/mohmp3
Unable to spawn mp3player.

then I put a mp3 file in /var/lib/asterisk/mohmp3 and I got the above message )[/quote]

What is the best way to debug this problem, so that I can try to find [color=blue]WHY it stops[/color] ??

Have not been able to solve the problem yet. :frowning:

Even a
CLI> sip debug peer 1200
wasn’t of much help.

This is what I get when I put 1200 intermittend OH HOLD.(with debugging switched off again)

Executing Dial(“Zap/1-1”, “SIP/1200|40|rtT”) in new stack
– Called 1200
– SIP/1200-081c45c8 is ringing
– SIP/1200-081c45c8 answered Zap/1-1
Started music on hold, class ‘default’, on channel ‘Zap/1-1’
Stopped music on hold on Zap/1-1
Started music on hold, class ‘default’, on channel ‘Zap/1-1’
Stopped music on hold on Zap/1-1
Started music on hold, class ‘default’, on channel ‘Zap/1-1’
Stopped music on hold on Zap/1-1

After started moh I get immediately stopped moh.

But I have not found out WHY it stops??

you’re lacking info. what MoH are you using ? the Asterisk-source Freeplay files, or your own ? what format are the files in if your own ? any difference in behaviour using native MoH instead of mp3player ? does mpg123 exist on your system ?

You solved my problem !

It was indeed mpg123 which didn’t exist in my system.
After installing mpg123, MOH started working.

Thanks very much :smiley: .