[asterisk-dev] ARI Extending Existing Feature: bridge control
Nir Simionovich
nir.simionovich at gmail.com
Wed Dec 17 14:16:11 CST 2014
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
<http://doxygen.asterisk.org/trunk/db/d0b/resource__bridges_8c.html#f456b35967dc37f869de264ee800f2b8>
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20141217/0c19e7a0/attachment.html>
More information about the asterisk-dev
mailing list