[asterisk-app-dev] ARI play to channel without muting channel
Fridrich Maximilian
M.Fridrich at commend.com
Thu Oct 27 02:29:06 CDT 2022
>> It is not expected, and I do believe there are people doing this. You'd need
>> to show the precise things you are doing and what events occur. Underneath
>> it's using the same stuff as ChanSpy, so if that works then Snoop should
>> work.
>
> Oh, there IS an inherent limitation in the underlying API that all this uses
> - it requires media flowing to the channel in order to whisper into it. If
> that's not happening, then it won't occur.
So far I've had no luck with the snoop channel. I have tried all combinations of
the spy=in&whisper=out parameters when creating the snoop channel via ARI and
the logs and events we receive all look correct - no errors/warnings or
anything.
Here's what we are doing in our scenario:
1. An incoming PJSIP channel enters the Stasis Application.
2. We create an externalMedia channel and a bridge.
3. We add the externalMedia and PJSIP channel to the bridge.
There is always audio flowing from the incoming PJSIP channel to the
externalMedia channel.
Now we want to play an audio file to the incoming PJSIP channel while still
receiving audio from that PJSIP channel. Calling the /play endpoint on the
channel stopped the incoming audio and calling /play on the bridge would play
the audio to the externalMedia channel as well, so this is not an option.
We tried creating a snoop channel on the incoming PJSIP channel and then calling
the /play endpoint on the snoop channel, but no outgoing audio was transmitted
to the PJSIP channel.
Are we doing something wrong? Surely there has to be a way to play an audio file
to a channel without blocking its incoming audio (and without having to stream
the media).
Thanks,
Max
More information about the asterisk-app-dev
mailing list