No audio is heard between two specific channels after adding them to a bridge

What I’m trying to achieve:

Using ARI, A call is originated from asterisk to a customer’s phone number. Some data is played and the call ends. Optionally but very important for this case, another call is originated at the same time from asterisk to a customer service rep. This customer service rep should be able to talk to the customer and hear whatever data is played back by asterisk.

What is actually happening:

The call to the customer and to the supervisor are connecting. They both can answer and talk to each other. But only the customer can hear the audios that are played by asterisk. The customer service rep cannot hear those audios. I also tested playing dtmfs with asterisk and the customer rep can’t hear them.

What I’m doing:

Using ARI:

  • I create a bridge with type ‘mixing’
  • I create two channels (endpoints are PJSIP), one to reach the customer, one to reach the customer service REP
  • When the appropriate event message arrives (‘StasisStart’) I add the channels to the bridge. I add each channel with a ‘participant’ role, not muted, specifying the same app name.

What things I am seeing, what have I done:

  • I see that the bridge is in softmix mode
  • changed codec priorities codecs (and even disabled codecs) on both phones (polycoms in this case)
  • disabled directmedia on pjsip

I’ve read the docs a couple of times and I’m sure I’m missing something, I just don’t know what.

Do you see audio going to the customer service rep? What is their client? What is the network arrangement? Do other scenarios work?

Do other scenarios work?

I honestly thank you for reminding me of the obvious and to ensure the basics are working. I’ve made calls in different configurations (with and without ARI) and everything works as expected.

I realized that the specific scenario that does NOT work is when I play a sound or DTMF on a bridge. And I think this might be my fault because I’m missing something or not understanding the way a bridge works.

In my code, if I change the call to the ARI function that plays audios or DTMFs on a channel and try either or both the customer and reps channels, they both play. I could fix my issue just by doing this, actually. But I would like to understand why I can’t play the audio/DTMF on the bridge and have the two channels hear it.

I’ve read the API[1] of both channel and bridge and I don’t get the impression that I need to do something in particular for this to work.

I’ve seen some HTTP status codes returned by ARI when I do something clearly wrong, but I see no errors when I try to play something on the bridge.

Any advice is appreciated.

  1. Home - Asterisk Documentation

What exactly are you trying to do, ARI usage wise, what are the complete steps you’re doing with actual values?

@jcolp thanks for your time. I found the issue.

The cause was in my original post although I didn’t know it. I was trying to play DTMFs on the bridge but there is no ARI method to do so.

What tripped me was that there was a case where no bridge_id was saved by my app and that bridge_id was being POST'ed empty to the API but no error was returned by ARI:

POST "http://REDACTED:REDACTED@whatever:8088/ari/bridges//dtmf", "dtmf=%23&duration=350", "Accept"=>"application/json", "Content-Length"=>"21", "Content-Type"=>"application/x-www-form-urlencoded"
11:33:03 bridger.1 | # => 200 OK | application/json 232 bytes, 0.11s

(Notice the lack of bridgeId)

I wasn’t logging the actual request, only the response (and since it was 200 I assumed it was OK). When I started logging the request per your comment I noticed the missing id immediately. I fixed that then I got a 404 (as expected), then realized there is no /dtmf method for bridges.

Thanks again for your time and patience.

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