Answer the question
In order to leave comments, you need to log in
How to determine that the operator is talking?
Greetings colleagues!
The task before me is very simple at first glance.
It is necessary to determine the fact that the operator is busy.
Where do I need this information?
I need information about the state in some kind of automatic call mechanism, which is written in PHP
. When sorting through the list of operators, I could definitely tell that this operator is currently busy.
The opinions of my colleagues were divided on the choice of method.
Some say, use AMI
Others just define it in the browser (bind to WebRTC technology events)
In the case of AMI, if I do this in PHP, my script will choke on the flow of information, since there will be no asynchrony and I will have to process each line of the stream in turn information.
In the second case, everything seems to be fine, but until the second tab opens, because when I open the tab, I planned to refresh the status state.
Plz drop an idea.
Answer the question
In order to leave comments, you need to log in
Igor ,
In the case of AMI, if I do this in PHP, my script will choke on the flow of information
Action: Login
ActionID: 1
Username: ВАШ_ЛОГИН
Secret: ВАШ_ПАРОЛЬ
Events: off
Action: Command
Command: core show hints
[email protected] : SIP/240,CustomPresen State:Idle Watchers 0
[email protected] : SIP/241,CustomPresen State:InUse Watchers 0
[email protected] : SIP/242,CustomPresen State:Unavailable Watchers 0
You can get a list of endpoints (/enpoints) via ARI and see which of them have active channels.
You can get active channels (/channels) and see which endpoints are associated with them.
You can iterate over all devices (/deviceStates/{deviceName}) and see their status.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question