audiosocket
audiosocket copied to clipboard
Multiple calls handling
Is this true that audiosocket can only process one call at a time?
exten = 100,1,Verbose("Call to AudioSocket via Dialplan Application")
same = n,Answer()
same = n,AudioSocket(40325ec2-5efd-4bd3-805f-53576e581d13,server.example.com:9092)
same = n,Hangup()
This configuration only allows one caller at a time to listen to the audio stream, second caller has to wait until the first one hangs up or stream ends playing.
Why do you say that? One presumes the audiosocket server can handle more than one socket connection at a time, and each call in Asterisk gets its own execution routine.
I say that, because I tried using it, AudioSocket client can only handle one connection, while blocking the whole dial plan until the playback has finished. Try it yourself. 😎
This is used in many places and with high volumes. So far as i am aware, nothing in one asterisk call thread can block another, but i certainly have not had it happen with AudioSocket. You are saying that when one call is connected to an AudioSocket, no other calls may be processed by asterisk generally? Or no more may be sent to any AudioSocket service? Or no more may be sent to the same AudioSocket service? Or something else?
I say that, because I tried using it, AudioSocket client can only handle one connection, while blocking the whole dial plan until the playback has finished. Try it yourself. 😎
there are two examples. Use multithreaded example for more than one channel. Aterisk definitely supports more than one.
Is this true that audiosocket can only process one call at a time?
exten = 100,1,Verbose("Call to AudioSocket via Dialplan Application") same = n,Answer() same = n,AudioSocket(40325ec2-5efd-4bd3-805f-53576e581d13,server.example.com:9092) same = n,Hangup()
This configuration only allows one caller at a time to listen to the audio stream, second caller has to wait until the first one hangs up or stream ends playing.
If you use exact this dialplan for testing I think issue is in the same uuid you use to call Audiosocket() So try to generate unique uuid for each call that receive in exten 100, this should work