AudioSocket application - blocks dialplan for all channels

Hello Everyone,

When two callers hit this dialplan at the same time, it plays for all simultaneously. No problem here.

exten => 1111,1,Answer()
same = n,Playback(basic-pbx-ivr-main)
same = n,Hangup()

But, when two callers hit this dialplan at the same time, only one of them can listen, while the others are blocked (silence). When the first caller finishes listening, then the second one starts.

exten => 1111,1,Answer()
same = n,AudioSocket(40325ec2-5efd-4bd3-805f-53576e581d13,localhost:8081)
same = n,Hangup()

Both dialplans are using similar Applications.

I tried AGI, AMI + AGI, but it results in the same scenario - only one caller can listen to AudioSocket app.

Is there a workaround to this?

Just had a quick look at the Asterisk code–am I right that Asterisk itself just provides a client, the actual server has to come from somewhere else?

Because this looks to me like a limitation of your AudioSocket server, in being able to accept only one connection at a time.

Yes, the server is written in Go and hosted on the same machine servicing wav files. But it definitely allows more than one connection (tested and confirmed). There is something on the Asterisk side which prevents it from doing so.

I ran a sniffer and the second connection attempt is not even initiated from the Asterisk side until the app exits…

If you got a deadlock backtrace[1] it may show where the threads are blocked. Just a note though that AudioSocket is community supported though so if there is a problem there, it’s up to the community to resolve it.


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