We are trying to do a listen and then whisper by supervisor on a call going on between agent and the customer. In case of whisper, ideally, supervisor should be able to talk to the agent which is happening as expected in normal scenarios, however, the same is not happening in the following scenario:
- Call is initiated is agent
curl -X POST -u "username:password" "http://0.0.0.0:8088/ari/channels" \
--header 'Content-Type: application/json' \
-d '{
"endpoint": "<agent_channel>",
"timeout": 30,
"callerId": "<caller_id>",
"app": "pbx",
"appArgs": "default_args",
"channelId": "chanA_xxxxxxxx"
}'
- Call is initiated to customer
curl -X POST -u "username:password" "http://0.0.0.0:8088/ari/channels" \
--header 'Content-Type: application/json' \
-d '{
"endpoint": "<customer_channel>",
"timeout": 30,
"callerId": "<caller_id>",
"app": "pbx",
"appArgs": "default_args",
"channelId": "chanB_xxxxxxxx"
}'
- Create Bridge
curl -X POST -u "username:password" "http://0.0.0.0:8088/ari/bridges?type=mixing"
- Add agent and customer into same channel
curl -X POST -u "username:password" "http://0.0.0.0:8088/ari/bridges/BRIDGE_1_ID/addChannel?channel=CHAN_A_ID,CHAN_B_ID"
-
Customer and agent are able to talk to each other
-
Call is initiated to Supervisor
curl -X POST -u "username:password" "http://0.0.0.0:8088/ari/channels" \
--header 'Content-Type: application/json' \
-d '{
"endpoint": "<supervisor_channel>",
"timeout": 30,
"callerId": "<caller_id>",
"app": "pbx",
"appArgs": "default_args",
"channelId": "chanC_xxxxxxxx"
}'
- Mute Supervisor Channel
curl -X POST -u "username:password" "http://0.0.0.0:8088/ari/channels/CHAN_C_ID/mute?direction=in"
- A snoop channel is created on Agent leg (spy=both and whisper=out)
curl -X POST -u "username:password" "http://0.0.0.0:8088/ari/channels/CHAN_A_ID/snoop?app=exopbx&spy=both&whisper=out"
- A bridge is created
curl -X POST -u "username:password" "http://0.0.0.0:8088/ari/bridges?type=mixing"
- Snoop channel and supervisor channel is added to the bridge
curl -X POST -u "username:password" "http://0.0.0.0:8088/ari/bridges/BRIDGE_2_ID/addChannel?channel=CHAN_C_ID,SNOOP_ID"
-
Now supervisor is able to hear both agent and customer
-
Unmute supervisor channel
curl -X DELETE -u "username:password" "http://0.0.0.0:8088/ari/channels/CHAN_C_ID/mute?direction=in"
-
Now supervisor is able to talk to agent and agent is able to hear the supervisor
-
Agent mutes customer (direction = in)
curl -X POST -u "username:password" "http://0.0.0.0:8088/ari/channels/CHAN_B_ID/mute?direction=in"
- Now the agent is not able to hear supervisor which is not expected. Muting the customer should not have any effect on agent not able to hear supervisor.
Are we doing something wrong? Is there any change that we can do to make it work?