When two callers hit this dialplan at the same time, it plays for all simultaneously. No problem here.
[from-internal]
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.
[from-internal]
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.
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.