[asterisk-bugs] [Asterisk 0018276]: [patch] streamplayer-like utility, but for anything that comes out of a shell pipe

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Dec 28 04:01:34 UTC 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18276 
====================================================================== 
Reported By:                malaiwah
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   18276
Category:                   Utilities/General
Reproducibility:            N/A
Severity:                   feature
Priority:                   normal
Status:                     ready for testing
Asterisk Version:           1.6.2.13 
JIRA:                       SWP-2557 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-11-08 10:40 CST
Last Modified:              2010-12-27 22:01 CST
====================================================================== 
Summary:                    [patch] streamplayer-like utility, but for anything
that comes out of a shell pipe
Description: 
streamplayer Asterisk utility can only be used for raw TCP streams.

I just adapted the utility to be useful with anything that comes from a
shell pipe and added it to my "pipe chain" for my streaming music-on-hold.
The utility takes input from stdin (in 2k blocks) and sends it to stdout
only if the write would not block. As explained in streamplayer, Asterisk
blocks writes to stdout when it does not need the MOH source, but streaming
mpg123/sox I use would still be outputting data.

This effectively gets rid of the error I had in my Asterisk at various
intervals depending on music-on-hold usage:

[Nov  8 09:31:17] NOTICE[24616] res_musiconhold.c: Request to schedule in
the past?!?!

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

---------------------------------------------------------------------- 
 (0130000) jcovert (reporter) - 2010-12-27 22:01
 https://issues.asterisk.org/view.php?id=18276#c130000 
---------------------------------------------------------------------- 
This builds a utility that goes into /usr/sbin/ (or other appropriate
destination).  In 1.8, it needs the

streamnoblock: streamnoblock.o

line in utils/Makefile

but needs

  <member name="streamnoblock">
        <defaultenabled>no</defaultenabled>
  </member>

added to menuselect-tree just before the similar lines for "streamplayer"
to make it selectable (and off by default) in the Utilities menu.

It also needs the line

   int s;

removed to eliminate a compiler warning for an unused variable.

/john 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-12-27 22:01 jcovert        Note Added: 0130000                          
======================================================================




More information about the asterisk-bugs mailing list