[asterisk-dev] Bounty for regular beep in Monitor() and MixMonitor()

Matthew Jordan mjordan at digium.com
Tue Jan 21 09:25:18 CST 2014


On Tue, Jan 21, 2014 at 4:23 AM, Andrey Utkin
<andrey.krieger.utkin at gmail.com> wrote:
> 2013/9/26 Alistair Cunningham <acunningham at integrics.com>:
>> I don't think we want to do this. This is for Enswitch, which is a big
>> complex carrier product, with some systems having many thousands of
>> concurrent calls, and lots of existing dial plan complexity such as heavy
>> use of local channels. We really really don't want to make the call flow any
>> more complex, and are looking for a well engineered solution rather than a
>> hack.
>
> Is this posting still actual?

I'll let Alistair answer this :-)

> To Asterisk maintainers: would implementation of such feature be
> reviewed for inclusion into upstream?
>

Yes, subject to the usual process for new features to be included into Asterisk:
 (1) Following of the coding guidelines [1]
 (2) Attached to a JIRA issue with a license contributor agreement signed
 (3) Peer reviewed [2]. If the author needs Review Board access, that
can be provided.
 (4) Tests written that exercise the feature [3]. There's no way to do
this feature without some mucking around in MixMonitor/Monitor, so it
would be appropriate to have tests that verify the functionality, and
help prevent the feature from breaking in future revisions of
Asterisk. We can provide some guidance on writing a test in the
Asterisk Test Suite for this. [4]

A few thoughts on the feature proposal:
 (1) Monitor and MixMonitor are widely different in their
implementation. Neither are really 'set up' for injecting audio into
the stream that they sit on, and the state of the channel that they
are receiving audio from can vary widely, i.e., the channel can be in
an application, a bridge, etc. Blindly using a playback operation on
the channel from the Monitor/MixMonitor code may work in some
situations, but have strange side effects in others.
 (2) One possible way of achieving this would be to write a frame hook
that attaches itself to a channel, plays back the specified file in a
manner similar to ChanSpy (although don't copy the ChanSpy code. That
would be bad.), then detaches itself. Monitor/MixMonitor (or any
application) would then have to just create the hook and attach it at
the appropriate time. Another example of creating such a hook (albeit,
for a channel) can be seen in the ARI snoop operation
(res_stasis_snoop).

[1] https://wiki.asterisk.org/wiki/display/AST/Coding+Guidelines
[2] https://wiki.asterisk.org/wiki/display/AST/Reviewboard+Usage
[3] https://wiki.asterisk.org/wiki/display/AST/Writing+a+Python+Test
[4] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Test+Suite+Documentation

Matt

-- 
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org



More information about the asterisk-dev mailing list