[asterisk-dev] Need to run an AGI from dialplan only upon call hold

Marco Signorini marcotasto at libero.it
Fri Aug 31 02:53:15 CDT 2012


Hi.

The link reported by Lenz refers to the frame_trigger patch we implemented.
The idea is to define a set of control frames that will trigger specific 
dialplan calls when found on the channel where the filter is applied.
In QueueMetrics this could be used to write to the queue_log some 
specific events used by the engine to retrieve, for example, hold and 
unhold events on the agent's channels.
I never tested the patch in a production environment but, as far as I 
remember, I was able to have events written in the queue_log in my test 
environment.

As told by Lenz the code was not included in the main trunk because it 
allows arbitrary code execution on the same thread is handling the 
control packets in Asterisk.

You sad you already tried to use it but without success. Could you, 
please, tell me what's the problem you had?

Thank you and regards,
Marco Signorini.



On 08/31/2012 09:05 AM, Lenz Emilitri wrote:
> We developed something along these lines as a general solution that 
> would not be linked to a specific channel types. This was needed as it 
> would be very useful in call-center scenarios to keep track of channel 
> holds done by agents, and as QueueMetrics implements this 
> functionality, we would have liked to offer a general solution that 
> could be of interest in many cases.
>
> You can find it at 
> https://issues.asterisk.org/jira/browse/ASTERISK-19319 - it was not 
> accepted into the main trunk as it may be quite dangerous as it allows 
> arbitrary code execution on a single thread, but if you are careful 
> and you know what you are doing, it basically works.
>
> So, as there is an actual need out there for something along these 
> lines, if anybody has a better implementation idea, it would be great 
> to share it :)
>
> Thanks
> l.
>
>
>
>
> 2012/8/27 uma udupi <umaudupi at yahoo.com <mailto:umaudupi at yahoo.com>>
>
>     Hi there,
>
>     I'm new to Asterisk. I need to call (from dialplan) a macro or a
>     gosub or an AGI upon one of the connected party in a bridged call
>     (on sip trunk) puts the call on HOLD. Anyhelp greatly appreciated
>
>     PS: I looked into app_dial.c if I can capture AST_CONTROL_HOLD
>     event, and call a macro, however once ast_bridge_call() is called,
>     Dial app does not get mid-call events on the call (like
>     AST_CONTROL_HOLD/AST_CONTROL_UNHOLD)
>
>     I also tried to use frame_trigger.c but it didn't work too. I
>     understand this is not a good approach.
>
>     Thanks,
>     Uma
>
>     --
>     _____________________________________________________________________
>     -- 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
>
>
>
>
> -- 
> Loway - home of QueueMetrics - http://queuemetrics.com
> Test-drive WombatDialer alpha @ http://wombatdialer.com
>
>
>
> --
> _____________________________________________________________________
> -- 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/20120831/3834ce96/attachment.htm>


More information about the asterisk-dev mailing list