Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple calls handling #14

Open
scorpio1441 opened this issue Feb 16, 2023 · 5 comments
Open

Multiple calls handling #14

scorpio1441 opened this issue Feb 16, 2023 · 5 comments

Comments

@scorpio1441
Copy link

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.

@Ulexus
Copy link
Member

Ulexus commented Feb 18, 2023

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.

@scorpio1441
Copy link
Author

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. 😎

@Ulexus
Copy link
Member

Ulexus commented Feb 19, 2023

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?

@arheops
Copy link

arheops commented May 2, 2023

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.

@Badalien
Copy link

Badalien commented Aug 4, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants