Bridging 2 legs + need to use holding bridge?

As a test program for using the ARI, I’m trying to make Asterisk call 2 phones and let the users talk. When either hangs up, end the call. My planned ARI steps are:

  1. Create bridge
  2. Call user A to create channel
  3. Call user B to create channel
  4. Add channels A and B to bridge
  5. Wait for hangup of either channel A/B
  6. Destroy bridge.

I was looking at some examples (ARI and Bridges Bridge Operations - Asterisk Documentation) and it uses a “holding bridge”.

Could someone confirm:

  • Is use of a holding bridge necessary? I assumed both legs will just hear the other side ringing if they answer first.
  • I assume I need to listed for the hangup event in order to trigger cleanup of the call
  • And for cleanup, I assume channels are automatically deleted, I just need to delete the bridge? (this overlaps another post- but so closely related I left it here too)

Thanks

No, a holding bridge is not necessary. It’s just part of the example on the linked page. It’s up to you to handle hangups. Channels will be cleaned up on hangup in Asterisk, but if you have any state in your ARI application you have to clean that up yourself. Bridges like mentioned before are up to you to clean up.

I’d also like to add that you keep saying “create channel”. The /create route is separate in ARI and has different behavior. In a prior post it showed you originating a call. Originated calls only enter your ARI application upon answer. This means that it is then up to you to handle ringing, so if an event is raised on one channel that it is ringing you then have to use ARI to tell the other to ring.

Just to clarify, I meant “original a channel” (which I thought meant post to /ari/channels). But as per my other post, perhaps I should be using /ari/channel/create.

I know in my head what I’m trying to do, perhaps not expressing it well, or understanding the documentation well.

A holding bridge, as previously said, if not necessary. Having said that, suppose you have two individual channels A and B carrying a conversation in a bridge which we are going to call conference bridge, and for whatever reason you want to play a prompt to A that you don’t want B to hear. Well, you could create yet a different new bridge which you will call holding bridge, send A to holding bridge and play his prompt in that bridge and when done and want to, remove A from holding bridge and send him back to conference bridge where B is.
To be sure, the functionality for what I just described already exists and is called snoop-channel, but I went through it cause it is an example of a use case.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.