[asterisk-dev] ChanSpy / ConfBridge limitation

Joshua C. Colp jcolp at sangoma.com
Mon Jan 15 03:42:42 CST 2024


On Sun, Jan 14, 2024 at 9:10 PM Mark Murawski <markm-lists at intellasoft.net>
wrote:

> Howdy -dev,
>
> Looking for a starting point to investigate this issue:
>
> Using the following AEL (and Running straight-dialplan results in the same
> issue)
>
> context services {
>   2802 => {
>     Answer();
>     Set(GLOBAL(foo)=${CHANNEL});
>     ConfBridge(Agent-PJSIP/2802);
>   }
>
>   9000 => {
>     Answer();
>     ChanSpy(${foo},qoSE);
>   }
> }
>
> PJSIP/2802-00003b18 -> ConfBridge("Agent-PJSIP/2802")
> <CBAnn/Agent-PJSIP/2802-00000075;2> joined 'softmix' base-bridge <56974564-b175-4b6a-93fc-fe4753082213>
> <PJSIP/2802-00003b18> joined 'softmix' base-bridge <56974564-b175-4b6a-93fc-fe4753082213>
>
> PJSIP/trunk-bob-00003b19 -> ChanSpy("PJSIP/2802-00003b18,qoSE")
> Spying on channel PJSIP/2802-00003b18
> Attaching spy channel PJSIP/trunk-bob-00003b19 to PJSIP/2802-00003b18
>
>
> Issue:
>   No audio is flowing from Spied-on PJSIP/2802-00003b18 to the spy-er PJSIP/trunk-bob-00003b19
>
>
> If for example, you change 2802 to the following:
>
>   2802 => {
>     Answer();
>     Set(GLOBAL(foo)=${CHANNEL});
>     Dial(PJSIP/2803);
>   }
>
>
> Wait for the call to connect/answer
>   PJSIP/2802-00003b20 -> PJSIP/2803-00003b5d (callee answered)
>
> And then run the same ChanSpy with options qoSE, resulting in:
>   PJSIP/trunk-bob-00003b97 -> ChanSpy("PJSIP/2802-00003b20,qoSE")
>   Attaching spy channel PJSIP/trunk-bob-00003b97 to PJSIP/2802-00003b20
>
>
> Result:
>   Audio IS flowing from spied-on PJSIP/2802-00003b20 to the spy-er on PJSIP/trunk-bob-00003b97
>
>
>
> One might say: Well, ChanSpy/ConfBridge don't mix... but then if you do the following... this DOES work:
>
> context services {
>   2802 => {
>     Answer();
>     Set(GLOBAL(foo)=${CHANNEL});
>     ConfBridge(Agent-PJSIP/2802);
>   }
>
>   9000 => {
>     Answer();
>     ChanSpy(${foo},qwSE);
>   }
> }
>
> Changing the option from 'o' to 'w', allows you to whisper to PJSIP/2802
>
> ----
>
>
> Goal:
>   Extract out an individual speaker's audio that's going into a ConfBridge
>   (Cannot join the bridge as a member, because then you're getting all participants audio)
>
>
> Summary:
>   1) You can whisper to a channel that joined a ConfBridge
>   2) You cannot listen to the audio from a channel that joined a ConfBridge
>
>
> Also:
>   I tried ChanSpy()'ing into both CBAnn/...;1  and CBAnn/...;2 and I could not get audio from here either
>
>
> Is this a bug or a limitation/missing-feature?
>
>
> What would be a good place to look into for resolving #2 ?
>
>
So what is the actual state of the channel and ConfBridge at that point in
time? You haven't really clarified that in this email at all. Is it
listening to music on hold? Is there no other channel present? Have you
looked at the core debug to see what the audiohooks API is saying?
Ultimately that's what is capturing the audio and making it available for
ChanSpy and it has no idea of ConfBridge or Dial or etc, so narrow down the
issue to either the ChanSpy module itself or audiohooks, and then go from
there. In a general sense from the available information I would say it is
a bug, though I am aware that this has worked for other people without
problem.

-- 
Joshua C. Colp
Director of Engineering | 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-dev/attachments/20240115/187e4997/attachment.html>


More information about the asterisk-dev mailing list