[asterisk-dev] extending bridging API

Klaus Darilion klaus.mailinglists at pernau.at
Mon Feb 8 13:29:44 CST 2010


Hi!

I just tried to understand how the new bridging API works, and how I can 
extend it, but I am not sure how/where to extend it. Thus I have some 
questions :-)

For example the bridge should react on AST_CONTROL_* frames. If a 
participant puts the call on hold, and AST_CONTROL_HOLD is received on 
the participants channel, the participant should be muted. Or if 
AST_CONTROL_CONNECTED_LINE is received, the other participants should be 
informed about the new line identity.

Where would this kind of features be implemented? Adding a new bridge 
implementation in the bridges/ directory or by adding the code to 
main/bridging.c?

Further, these features should be configurable, thus I guess I have to 
add new options to ConfBridge() application. But how will the features 
be signaled to the bridging core? Adding new capabilities, or a new 
flag, when calling ast_bridge_new()?

Further, AFAIS there are callbacks from the bridging core to the 
application, but only DTMF events are supported. How/where do I have to 
extend the hooks to signal e.g. AST_CONTROL_CONNECTED_LINE to the 
calling application too?

Finally, is it somehow possible to stream audio only to a single 
participant? Consider this (rather stupid) example: A participant 
changes line identity and AST_CONTROL_CONNECTED_LINE is received. Now, I 
want to playback to this single participant "The other participants will 
be informed about your new identity", and maybe playback to all other 
participants "user x changed its identity to Y". Is this possible from 
within the calling application? E.g. the ConfBridge application receives 
the event that a participant sent AST_CONTROL_CONNECTED_LINE and then 
ConfBridge instructs the bridging core to play certain voice prompts to 
certain participants?

thanks
klaus



More information about the asterisk-dev mailing list