[asterisk-dev] Dialplan pre-bridge handlers

Joshua Elson joshelson at gmail.com
Tue Jul 21 11:04:53 CDT 2020


In a general sense, this kind of functionality would indeed be helpful.
We've run into a number of circumstances where stuff as simple as setting a
channel variable on a known channel (particularly when you're directly
operating on Local/ abstractions) would be helpful. I've seen far too many
people using SHELL with AMI calls in these out of band scripts that are
quite risky to do this. Using SHARED + MASTER_CHANNEL can - sometimes - get
you where you need to go, but it's particularly kludgy, doesn't work in all
circumstances, and doesn't make for very readable code.

I've run into the exact issue - needing to do stuff with MixMonitor on
other channels - quite a few times. Never got around to cleaning this up to
submit, but attached patch adds a MuteMixMonitor application that takes as
its first argument a Channel ID. Nikša - if your situation is limited to
just the MixMonitor issue, you could pretty easily modify existing
start/stop apps or add a new one to do what you need.

On Tue, Jul 21, 2020 at 3:31 AM Nikša Baldun <it at voxdiversa.hr> wrote:

> I suspected there might be a catch. So far, our dabbling in Asterisk code
> consists of some patches, mostly for our internal use, and a small Asterisk
> module. It didn't take us long to figure out how to make a module, even
> with limited documentation, but this looks an order of magnitude more
> difficult.
> On 21. 07. 2020. 10:58, Joshua C. Colp wrote:
>
> On Tue, Jul 21, 2020 at 3:52 AM Nikša Baldun <it at voxdiversa.hr> wrote:
>
>> Thanks for the reply, Joshua. It would definitely be useful. I took a
>> look at FreePBX code to see how they handle call recordings in my example
>> scenario, and apparently they call a PHP script from dialplan, which then
>> controls recording via AMI connection. An awful lot of effort, not to
>> mention a performance hit. I am guessing they wouldn't do it if there was
>> any other way.
>>
>> I am not surprised that this functionality does not exist, I know that
>> Asterisk development is difficult, but I am surprised there was no talk
>> about it. I might take a crack at this myself if my schedule clears up. I
>> am thinking, pre-bridge handlers already exist, and methodology for pushing
>> handlers onto a channel already exists. So one could figure it out with
>> some effort. Or am I being naive?
>>
> Each provider of such functionality does its own parsing, handling of any
> other channel, but does call a common function. The pushing of handlers
> isn't generic or anything, so it would have to be copied.
>
> --
> Joshua C. Colp
> Asterisk Technical Lead
> Sangoma Technologies
> Check us out at www.sangoma.com and www.asterisk.org
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20200721/33223ef3/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mute-mixmonitor.patch
Type: application/octet-stream
Size: 5206 bytes
Desc: not available
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20200721/33223ef3/attachment.obj>


More information about the asterisk-dev mailing list