Actually, I think this is a feature. Rather than startup a new instance of mpg123 each time someone goes on hold, one instance per MOH class is created and used for all calls of that class.


-brian

Gavin Hamill wrote:

Hullo :)

I'm using CVS-04/23/04-23 from the stable 1.0 branch on kernel 2.6 - since I have no Digium h/w, I've just managed to get the zaprtc module to compile and run, so I thought the best way to test it would be via MoH.

The MP3Player application works great ..

exten => 6901,1,Answer
exten => 6901,2,MP3Player(http://127.0.0.1:85/ES/28)

This will play callers BBC Radio 4 from my local streaming setup, and when they
hangup, the mpg123 process dies immediately. Perfect :)

Unfortunately, the same cannot be said about:

exten => 6900,1,Answer
exten => 6900,2,MusicOnHold

-- Accepting AUTHENTICATED call from 10.0.0.74, requested format = 2, actual format = 2
-- Executing Answer("[EMAIL PROTECTED]/5", "") in new stack
-- Executing MusicOnHold("[EMAIL PROTECTED]/5", "") in new stack
-- Started music on hold, class 'default', on [EMAIL PROTECTED]/5


Then I press 'Hangup' in IaxComm:

   -- Stopped music on hold on [EMAIL PROTECTED]/5
 == Spawn extension (default, 6900, 2) exited non-zero on '[EMAIL PROTECTED]/5'
   -- Hungup '[EMAIL PROTECTED]/5'

Alas, the 'mpg123' processes live on...

4049 pts/22 S 0:00 \_ asterisk -vvvvvvvvvc
4050 pts/22 S 0:00 | \_ mpg123 -q -s --mono -r 8000 -b 2048 -f 8192 sample-hold.mp3
4063 pts/22 S 0:00 | \_ mpg123 -q -s --mono -r 8000 -b 2048 -f 8192 sample-hold.mp3


In fact, if I redial ext 6900, I get played the MoH sample from the point at which mpg123 has reached in the mp3, rather than getting it from the start.

The MusicOnHold docs say: "Returns -1 on hangup. Never returns otherwise."

I beg to differ :) Is this a bug, or have I made some fundamental mistake?

Cheers,
Gavin.
_______________________________________________
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users



_______________________________________________ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to