OrangeCell Center Inc.
2009-Oct-22 23:54 UTC
[asterisk-users] Asterisk MOH playing old audio for first 30 to 60 seconds
Calling all members of the asterisk community, I am posting about an old issue that has been reported many places and times online, To my amazement, there has yet to be anyone that has reported any solutions to the following problem. "Initially when putting callers on hold, it plays between 30 and 60 seconds of old audio that was on the stream in the past. Then after that 30-60 seconds, it does a hard cut into what is currently playing (which sounds pretty bad)." I think it would be a great service and big help to all of the asterisk community, if you can please contribute your expertise on helping find a solution to this problem. This issue likely effects millions of asterisk users worldwide without a solution! Good Luck and Thanks very much in advance for your kind help and contribution!! I think it would be important to note that this issue happens regardless of whether you use mplayer and/or mpg123. Also, it happens only after a caller has been listening to the MOH, then disconnects from asterisk and next caller enters MOH again after a few minutes or more that the MOH/queue has been empty of callers... Interestingly enough, I just did some more research online and this issue was in fact already noted in a bug report back in 2003, without any resolution to date?? I really don't understand, why since it likely effects so many millions of asterisk users worldwide and is such a major problem, how come additional attention is not being given to this report?? especially in light that it has already been reported back in 2003 ? almost 6 years ago? Link: https://issues.asterisk.org/bug_view_page.php?bug_id=0000413 [^] Post: " (0002661) oliver (reporter) 2003-12-03 19:08 edited on: 2003-12-03 19:12 Yo, I discovered a small problem with MP3-streams. They start playing the first time a channel gets connected to MOH, but get interrupted in the way I described above as soon as no more channels are listening to MOH. An unfortunate side-effect is that in this case, mpg123 seems to lose the stream after a short time. The next channel connecting to MOH will hear the part of the stream that was still in mpg123's buffer, after which the audio gets cut off. Only restarting Asterisk or killing the mpg123-processes (after which Asterisk spawns fresh ones, which re-connect to the stream) will reliably get the stream back. Maybe this patch could be modified to kill and restart mpg123 if the MOH-source is a stream, has been idle with no channels listening and a new channel connects to it. In short: Check the number of listeners each time a new channel connects to MOH. If there are 0 listeners and the MOH-source is a stream, restart mpg123 to allow it to re-connect. Grtz, Oliver edited on: 12-03-03 19:03 " ...The next channel connecting to MOH will hear the part of the stream that was still in mpg123's buffer, after which the audio gets cut off... Here seems to be another such same exact problem report!! http://lists.digium.com/pipermail/asterisk-users/2008-January/204255.html
Tilghman Lesher
2009-Oct-23 00:44 UTC
[asterisk-users] Asterisk MOH playing old audio for first 30 to 60 seconds
On Thursday 22 October 2009 18:54:54 OrangeCell Center Inc. wrote:> "Initially when putting callers on hold, it plays between 30 and 60 > seconds of old audio that was on the stream in the past. Then after > that 30-60 seconds, it does a hard cut into what is currently playing > (which sounds pretty bad)."The problem has nothing to do with Asterisk and everything to do with the streaming application you're using. Asterisk does not cache any sound whatsoever; only the streaming application does. So any solution would have to fix this in the external streaming application, not within Asterisk itself. -- Tilghman Lesher Digium, Inc. | Senior Software Developer twitter: Corydon76 | IRC: Corydon76-dig (Freenode) Check us out at: www.digium.com & www.asterisk.org