I’m implementing a whisper feature using ARI, and I’ve run into a problem I can’t quite figure out.
When I initiate whisper mode using a snoop channel, I am able to hear the agent, but the agent cannot hear me — even though the whisper direction is set to "in"
.
No errors are thrown, and the bridge creation and channel addition seem fine.
Code:
DTMF triggers whisper mode:
Channel snoop = ari.channels().snoopChannel(targetAgentChannel, “_whisper-” + channelId)
.setApp(“app-name”)
.setAppArgs(channelId)
.setSpy(“both”)
.setWhisper(“in”)
.execute();
Then in onStasisStart
for the snoop channel:
public static String createWhisperBridgeAndAddChannelI(String channel) throws RestException {
Bridge bridge = ari.bridges().create().setType(“mixing”).execute();
ari.channels().unmute(channel).setDirection(“out”).execute(); // also tried “in” and muting
addChannelToBridge(bridge.getId(), channel); // Whisper channel added here
return bridge.getId();
} (here channel is snoop channel args,channelId) I later add snoop channel to this bridge
logs
202504231042049,asterisk,onSuccess,{“args”:[“1745385117.4631889”],“asterisk_id”:“00:50:56:01:16:64”,“application”:“app-4”,“channel”:{“connected”:{“number”:“”,“name”:“”},“caller”:{“number”:“”,“name”:“”},“name”:“Snoop/1745385112.4631888-00000005”,“dialplan”:{“app_name”:“Stasis”,“context”:“default”,“app_data”:“app-4,1745385117.4631889”,“priority”:1,“exten”:“s”},“language”:“en”,“creationtime”:“Wed Apr 23 10:42:21 IST 2025”,“id”:“1745385141.4631892”,“state”:“Up”,“accountcode”:“”},“type”:“StasisStart”,“timestamp”:“Wed Apr 23 10:42:21 IST 2025”},bargingCode,9604,bridgeId,b1d4e3c4-33ab-4dee-8a72-026e0d1cbeb6,agent removed from the bridge and created a snoop channel,
onStasisStart,details,{“args”:[“1745385117.4631889”],“asterisk_id”:“00:50:56:01:16:64”,“application”:“app-4”,“channel”:{“connected”:{“number”:“”,“name”:“”},“caller”:{“number”:“”,“name”:“”},“name”:“Snoop/1745385112.4631888-00000005”,“dialplan”:{“app_name”:“Stasis”,“context”:“default”,“app_data”:“app-4,1745385117.4631889”,“priority”:1,“exten”:“s”},“language”:“en”,“creationtime”:“Wed Apr 23 10:42:21 IST 2025”,“id”:“1745385141.4631892”,“state”:“Up”,“accountcode”:“”},“type”:“StasisStart”,“timestamp”:“Wed Apr 23 10:42:21 IST 2025”},
snoop channel is now up: Snoop/1745385112.4631888-00000005,id: 1745385141.4631892
#######when I left the whisper bridge
=========== chanel left bridge : bridge =============== {“asterisk_id”:“00:50:56:01:16:64”,“application”:“app-4”,“channel”:{“connected”:{“number”:“”,“name”:“”},“caller”:{“number”:“781100996”,“name”:“”},“name”:“PJSIP/softswitch-00228f7f”,“dialplan”:{“app_name”:“Stasis”,“context”:“axon”,“app_data”:“app-4”,“priority”:9,“exten”:“0117109638”},“language”:“en”,“creationtime”:“Wed Apr 23 10:41:57 IST 2025”,“id”:“1745385117.4631889”,“state”:“Up”,“accountcode”:“”},“bridge”:{“creator”:“Stasis”,“channels”:[“1745385141.4631892”],“bridge_type”:“mixing”,“bridge_class”:“stasis”,“name”:“”,“video_mode”:“talker”,“creationtime”:“Wed Apr 23 10:42:21 IST 2025”,“technology”:“simple_bridge”,“id”:“a1ddafb0-8037-41fb-8a7b-b837444e4f8e”},“type”:“ChannelLeftBridge”,“timestamp”:“Wed Apr 23 10:43:00 IST 2025”}
- Is there any specific channel direction/unmute/mute setting needed for the snoop channel in whisper mode?
- Is
whisper: "in"
enough, or does the audio path need additional configuration?
- Is there a known limitation or behavior in whisper bridges I might be missing?