[asterisk-app-dev] ARI play to channel without muting channel
Joshua C. Colp
jcolp at digium.com
Thu Oct 27 03:58:12 CDT 2022
On Thu, Oct 27, 2022 at 5:47 AM Joshua C. Colp <jcolp at digium.com> wrote:
> On Thu, Oct 27, 2022 at 4:29 AM Fridrich Maximilian <
> M.Fridrich at commend.com> wrote:
>
>> >> 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.
>>
>
> Is media flowing TO the incoming PJSIP channel?
>
To finish my early morning thought. The answer is likely no, which is why
whispering doesn't work. Whispering requires a constant stream of media TO
the channel[1]. This is because such core functionality predates any timing
or ability to provide its own frames out. Swapping things could work. That
is: Feed a snoop channel into external media, and then call /play directly
on the channel.
[1] https://issues.asterisk.org/jira/browse/ASTERISK-24397
--
Joshua C. Colp
Asterisk Project Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-app-dev/attachments/20221027/25afc25c/attachment.html>
More information about the asterisk-app-dev
mailing list