[asterisk-bugs] [Asterisk 0014416]: streamed moh breaks if nobody listen it

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Feb 6 02:37:59 CST 2009


The following issue has been SUBMITTED. 
====================================================================== 
http://bugs.digium.com/view.php?id=14416 
====================================================================== 
Reported By:                caspy
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   14416
Category:                   Resources/res_musiconhold
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           1.6.0.3-rc1 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-02-06 02:37 CST
Last Modified:              2009-02-06 02:37 CST
====================================================================== 
Summary:                    streamed moh breaks if nobody listen it
Description: 
If i have a moh class, which plays a network stream, and when no one
currently listening it, asterisk stops to receive data from player, 
then in a few minutes player stops reading network stream,
and then tcp connection dropeed from server side. Bad.

I did not find any player, which can always read network, even when no one
reads music from it.

I have looked what to patch, and decided, that asterisk's res_musiconhold
is the easiest way.

All we need, is to check for existence of 'listeners' not just before
reading music from player, but just after.
Look for code example in add.info.

With this patch, asterisk _always_ take music from player, and only then
decides what to do (waste away or play for somebody).

It's work fine in my production (1.6.0.3-rc1) for two month.

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-02-06 02:37 caspy          New Issue                                    
2009-02-06 02:37 caspy          Asterisk Version          => 1.6.0.3-rc1     
2009-02-06 02:37 caspy          Regression                => No              
2009-02-06 02:37 caspy          SVN Branch (only for SVN checkouts, not tarball
releases) => N/A             
======================================================================




More information about the asterisk-bugs mailing list