[asterisk-dev] ARI Extending Existing Feature: bridge control

Jonathan White uvacity at googlemail.com
Sun Dec 21 06:01:20 CST 2014


This would be a very useful feature to have available in dialplan. To be able vary the length of a call, during the call. 

I just emailed the dev list with the thought of adding this feature to confbridge with the following type of commands:
same => n,Set(CONFBRIDGE(bridge,max_time)=
or
same => n,Set(CONFBRIDGE(bridge,max_datetime)=
or
same => n,Set(CONFBRIDGE(bridge,start_datetime)=
same => n,Set(CONFBRIDGE(bridge,stop_datetime)=

with the following to add some notifications
same => n,Set(CONFBRIDGE(bridge,hangup_warning)=
same => n,Set(CONFBRIDGE(bridge,hangup_message)=

The idea was that if you have some call credit it will reduce by the variable number of callers which will join the same bridge. 

Using same => n,Set(TIMEOUT(absolute)= only sets the time out for an individual call and not the bridge.

Perhaps something that could be used for all call types would be a better approach rather than modifying individual apps.

Regards


From: Nir Simionovich 
Sent: Wednesday, December 17, 2014 8:16 PM
To: Asterisk Developers Mailing List 
Subject: [asterisk-dev] ARI Extending Existing Feature: bridge control

Hi All, 

  After shipping out my first patch to ARI, I became hungry :-)

  So, now I've set up a slightly higher goal, adding a much required feature for ARI. I'll describe the problem first, then 
I have some questions. 

  The Asterisk dial application enables us to limit the duration of the call and play a warning sound. Once this had been 
set, as far as I know, you can't modify these values externally. When the feature was originally introduced, over 10 years 
ago, the goal was simple: enable a calling card system to limit the call according to a credit line.

  As time went by, people realized that this feature is useful, however limited. In today's mobile application era, when a 
VoIP phone can actually purchase credit while on the actual call, we need a way to control this from an external source. 

  Now, I've started digging into the code, and I've managed to understand that following (feel free to bash me if I'm wrong):

  1. The time limits are maintained at the bridge structure, not at the channel - using the ast_bridge_config data structure
  2. The ARI bridges GET method only retrieves a list of bridges and their associated channels, not their configurations

  So, assuming that I'm reading the ast_ari_bridges_list function from resouce_bridges.c correctly, we retrieve
a snapshot of all active bridges via the snapshots variable (if you can call it that). The output is built by iterating through it.

  Now, my questions:

  1. Is there a way to obtain the information in ast_bridge_config for each of the iterated bridges, then output it via the JSON response?
  2. Is there a way to manipulate the configuration of the bridge, via modifying the associated bridge configuration?

  The floor is now open :-)

Nir S


--------------------------------------------------------------------------------
-- 
_____________________________________________________________________
-- 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/20141221/72ace539/attachment.html>


More information about the asterisk-dev mailing list