[asterisk-dev] Dialplan pre-bridge handlers

Nikša Baldun it at voxdiversa.hr
Tue Jul 21 01:51:53 CDT 2020

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?

On 20. 07. 2020. 16:29, Joshua C. Colp wrote:
> On Fri, Jul 17, 2020 at 6:04 AM Nikša Baldun <it at voxdiversa.hr 
> <mailto:it at voxdiversa.hr>> wrote:
>     Hello,
>     I have been using Asterisk for years, and the one thing that I
>     believe
>     is sorely missing, but I can't find any mention of it on the
>     Internet,
>     and that is pushable pre-bridge handlers. In current setup, there are
>     following limitations:
>     1. Pre-bridge handler can only be attached to the B-leg channel,
>     not the
>     A-leg channel.
>     2. The handler will only be executed before a bridge resulting
>     from Dial
>     application, but a channel can be bridged multiple times during its
>     lifetime (by SIP attended transfer, for example).
>     So, for example, if I want to turn call recording on/off depending on
>     who the channel is bridged to, there is no way to do that via
>     dialplan
>     (that I know of).
>     There is a possibility to attach hangup handlers to any channel by
>     using
>     CHANNEL(hangup_handler_push), but no similar feature for pre-bridge
>     handlers, which are much more important, IMO. So, has there been any
>     discussion among developers about this topic?
> I can't say I've heard anyone request or discuss such a thing 
> anywhere. That being said it sounds at face value like it could be useful.
> -- 
> Joshua C. Colp
> Asterisk Technical Lead
> Sangoma Technologies
> Check us out at www.sangoma.com <http://www.sangoma.com> and 
> www.asterisk.org <http://www.asterisk.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20200721/c40f3524/attachment.html>

More information about the asterisk-dev mailing list