Search the Asterisk Blog

A Little Glimpse Into ConfBridge

By Joshua C. Colp

The ConfBridge dialplan application is used countless times each day by people to do conferencing. Long ago this was done using the MeetMe dialplan application that utilized DAHDI functionality but with the requirement on DAHDI for it to operate an alternative was needed and ConfBridge came into existence. Have you ever wondered how it actually works though?

Before we dive in let us first define what bridging in Asterisk is. Bridging is the act of taking channels and connecting them together so they can communicate. On the surface this may sound easy but underneath it can be a bit difficult. For example in a two party call you just need to take media from one side and send it to the other. Wait a minute – they might be different formats so now you also need to set up translation paths so they get transcoded between each. Woah – someone just added video so now you need to renegotiate the other side. It adds up and conference bridges are no exception.

With two party calls you merely act as a media forwarder. Media comes in, media goes out. With conference bridges the bridge itself is a producer of media and not a forwarder. This is because you are producing combined audio. Surprise: ConfBridge doesn’t do this! Instead the bridging API in Asterisk is leveraged and is responsible for this part of the conference bridge. Each multiparty bridge has a thread that is responsible for doing this mixing. It uses the timing API in Asterisk to have a timer that wakes up at a fixed interval (by default 20 milliseconds). On wake up it collects media from each participant, producing a combined audio frame, and then sends it to each participant while removing the participant’s contributed audio. This results in audio frames going to each participant at a nice 20 millisecond interval.

So what does ConfBridge actually do? Well, while the bridging core is responsible for doing all of the mixing that does not give you all the functionality that users come to rely on. ConfBridge, as a higher level application, is what provides that functionality. The join and leave audio, DTMF menu providing control, muting of participants, CLI commands, etc. That is all provided by ConfBridge itself.

No Comments Yet

Get the conversation started!

Add to the Discussion

Your email address will not be published. Required fields are marked *

About the Author

Joshua C. Colp

Joshua Colp is a Senior Software Developer at Digium and a long time Asterisk developer. He originally started in the community submitting simple patches and grew into improving and creating new core components of Asterisk itself. He is a self-taught programmer who believes in finding the balance between doing things the way they should be done and doing what is right for the people using the software. In his spare time he enjoys smashing fax machines.

See All of Joshua C.'s Articles