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

Send AMI Actions to one of the amihosts #27

Open
ahelbadry opened this issue Dec 8, 2021 · 1 comment
Open

Send AMI Actions to one of the amihosts #27

ahelbadry opened this issue Dec 8, 2021 · 1 comment

Comments

@ahelbadry
Copy link

Hello,

I like the project, very good implementation very much, thanks for that.

I want to ask a question, as I'm having multiple servers connected to the AMIws instance, and I want to send an AMI command to one of them.

When I send the request, I get a reply from all the servers connected that the action has been executed on all servers.

I send the request through web-socket as follows:

{
"type":2,
"server_id":1,
"server_name":"server",
"ssl":false,
"data":{
"Action":"QueueAdd",
"ActionID":"actid",
"Queue":"queue",
"Interface":"SIP/ext",
"Penalty":"0",
"Paused":"true",
"MemberName":"name"
}
}

Thanks in advance.

@staskobzar
Copy link
Owner

Hello,
Did you try with the AMI server header described here: https://github.com/staskobzar/amiws#special-header-amiserverid

sock.send(JSON.stringify({"Action": "CoreStatus", "AMIServerID": 1}));

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

2 participants