Re: [asterisk-dev] ARI Snoop Channel Whisper
Michael Petruzzello wrote: I have been developing an application through Asterisk's ARI. While the Snoop Channel's spy functionality works very well, the whispering functionality does not work, unless the channel being whispered to and the snoop channel are both placed within a bridge. But that defeats the point of being able to whisper. For example, if a caller is in a conference with others, then the caller would have to be taken out of that bridge and then placed into another bridge so that the snoop channel could whisper to that channel. But now the caller is missing from the conference. Snoop's whisper would be far more effective if it could just attach itself to another channel for like it does for spying. The underlying framework used by Snoop channels currently requires a constant stream of media to be flowing in the direction. If the channel is just hanging out then this won't happen. You should be able to ensure media flow by using the channel /silence operation. There is a JIRA issue[1] to remove this requirement but it's not easy and noone has worked on it. [1] https://issues.asterisk.org/jira/browse/ASTERISK-24397 -- Joshua Colp Digium, Inc. | Senior Software Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: www.digium.com & www.asterisk.org -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
Re: [asterisk-dev] ARI Snoop
On Sun, Jul 19, 2015 at 4:01 PM, Phil Mickelson p...@cbasoftware.com wrote: Thank you for your response. Phil Mickelson On Sun, Jul 19, 2015 at 4:56 PM, Joshua Colp jc...@digium.com wrote: Phil Mickelson wrote: Hello, I've written a full answering service application with Asterisk at the center. All of my interaction with Asterisk is through ARI. Thank you so much for this feature! Without it I wouldn't have been able to make this work! I've just implemented a new Snoop feature. Without boring you with the details (unless you want them) I am able to Snoop on an operator regardless of whether or not they are on an active call. However, the only way the Whisper option works is if they are on an actual call. The only difference internally is there are two channels connected through a central bridge. Otherwise, the operator's channel is the only one in that bridge. Since I can hear the operator regardless of the current call situation I'm assuming there must be code in the Snoop option to mute the operator if a call is not active? There is no code to do that. What whispering does require though (for both Chanspy and Snoop channels) is a constant media stream out to the channel. It's likely that in the specific scenario there is nothing generating a stream and thus nothing to whisper into. There's an open issue[1] to remove this requirement but I know of noone currently working on it. [1] https://issues.asterisk.org/jira/browse/ASTERISK-24397 Well nuts. Looks like my theory wasn't right :-) I wonder - as a workaround until that issue is addressed, you *may* be able to force the Whisper by starting Silence on the target channel first: https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Channels+REST+API#Asterisk13ChannelsRESTAPI-startSilence That *should* start silence frames going to the target of the Snoop channel, at which point, there's at least something flowing through to allow the audiohook to start sending Whispered audio. (If I'm wrong, Josh will tell me why :-) -- Matthew Jordan Digium, Inc. | Director of Technology 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA Check us out at: http://digium.com http://asterisk.org -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
Re: [asterisk-dev] ARI Snoop
Thank you for your response. Phil Mickelson On Sun, Jul 19, 2015 at 4:56 PM, Joshua Colp jc...@digium.com wrote: Phil Mickelson wrote: Hello, I've written a full answering service application with Asterisk at the center. All of my interaction with Asterisk is through ARI. Thank you so much for this feature! Without it I wouldn't have been able to make this work! I've just implemented a new Snoop feature. Without boring you with the details (unless you want them) I am able to Snoop on an operator regardless of whether or not they are on an active call. However, the only way the Whisper option works is if they are on an actual call. The only difference internally is there are two channels connected through a central bridge. Otherwise, the operator's channel is the only one in that bridge. Since I can hear the operator regardless of the current call situation I'm assuming there must be code in the Snoop option to mute the operator if a call is not active? There is no code to do that. What whispering does require though (for both Chanspy and Snoop channels) is a constant media stream out to the channel. It's likely that in the specific scenario there is nothing generating a stream and thus nothing to whisper into. There's an open issue[1] to remove this requirement but I know of noone currently working on it. [1] https://issues.asterisk.org/jira/browse/ASTERISK-24397 -- Joshua Colp Digium, Inc. | Senior Software Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: www.digium.com www.asterisk.org -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
Re: [asterisk-dev] ARI Snoop
On Fri, Jul 17, 2015 at 10:14 AM, Phil Mickelson p...@cbasoftware.com wrote: Hello, I've written a full answering service application with Asterisk at the center. All of my interaction with Asterisk is through ARI. Thank you so much for this feature! Without it I wouldn't have been able to make this work! Thanks! That's really great to hear. A lot of times it's hard to know whether or not a feature is actually making people's lives easier or better - it's always nice to know that it's working well! I've just implemented a new Snoop feature. Without boring you with the details (unless you want them) I am able to Snoop on an operator regardless of whether or not they are on an active call. However, the only way the Whisper option works is if they are on an actual call. The only difference internally is there are two channels connected through a central bridge. Otherwise, the operator's channel is the only one in that bridge. I'd definitely be interested in knowing what you've implemented - it's always cool to hear how someone makes use of Asterisk and ARI! I would expect the Whisper option to work regardless of the channel's presence in a bridge. In both cases (snooping/whispering), the Snoop operation works by hooking itself onto the target channel using an audiohook. That audiohook feeds audio into/out of the target channel's stream, which means that so long as audio is flowing in the intended direction(s), it should get piped in/out. There could be two things going on here: 1) There's a bug in the Whisper audiohook code or the Snoop code in ARI. That's certainly possible, as it's one of the more complex parts of ARI. 2) The channel isn't answered or - internally - hasn't been told to send a progress (183 w/SDP, etc.) notification. Ideally, we'd handle the latter of those two cases automatically if a Snoop channel is attached to a channel (which means that would be a bug as well) - but I'd be curious to know if the channel is answered or not when you attach the Whispering Snoop channel to it. Since I can hear the operator regardless of the current call situation I'm assuming there must be code in the Snoop option to mute the operator if a call is not active? Just to be sure, I setup the entire procedure using Swagger instead of my program and got the same results. I also used the Delete Mute option to make sure the operator wasn't muted. Once the operator was on a live call I then had to run Snoop again and was able to Whisper to the operator. I didn't check if I could still Whisper to the operator after the call ended. I should. Am I right about the restriction for Whisper? If not, any suggestions? And, if I am right, can a new option be added to allow Whisper to work without an active call? And, if that would be a bounty type change if someone is interested in making it can you please let me know how much it would cost? The wiki page on bug bounties outlines how that process works: https://wiki.asterisk.org/wiki/display/AST/Asterisk+Bug+Bounties I can't really say how much it would cost, as that's something that's negotiated between the person offering the bounty and those who choose to take it. Thank you for your time! And, thank you again for ARI!!! No problem! Hopefully we can figure out what is going on with your Whisper scenario. If the channel is answered and the Whisper isn't working, please do open up an issue and attach the logs illustrating it so we can't get to the bottom of the problem. Matt -- Matthew Jordan Digium, Inc. | Director of Technology 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA Check us out at: http://digium.com http://asterisk.org -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
Re: [asterisk-dev] ARI Snoop
Matthew Jordan wrote: snip Well nuts. Looks like my theory wasn't right :-) I wonder - as a workaround until that issue is addressed, you *may* be able to force the Whisper by starting Silence on the target channel first: https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Channels+REST+API#Asterisk13ChannelsRESTAPI-startSilence That *should* start silence frames going to the target of the Snoop channel, at which point, there's at least something flowing through to allow the audiohook to start sending Whispered audio. (If I'm wrong, Josh will tell me why :-) You're wrong! That you may be wrong. You're right. Starting silence *should* work. I haven't tried it but on paper it looks fine. Cheers, -- Joshua Colp Digium, Inc. | Senior Software Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: www.digium.com www.asterisk.org -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
Re: [asterisk-dev] ARI Snoop
Matthew, I really, really appreciate the effort! I will try your suggestion and see if it works. The operator (the channel being snooped) is active. However, there's no other voice connection other than snoop. I just saw the response from Joshua so that bodes well. I'll let you guys know if this works. Thank you again. Phil Mickelson On Sun, Jul 19, 2015 at 5:40 PM, Matthew Jordan mjor...@digium.com wrote: On Sun, Jul 19, 2015 at 4:01 PM, Phil Mickelson p...@cbasoftware.com wrote: Thank you for your response. Phil Mickelson On Sun, Jul 19, 2015 at 4:56 PM, Joshua Colp jc...@digium.com wrote: Phil Mickelson wrote: Hello, I've written a full answering service application with Asterisk at the center. All of my interaction with Asterisk is through ARI. Thank you so much for this feature! Without it I wouldn't have been able to make this work! I've just implemented a new Snoop feature. Without boring you with the details (unless you want them) I am able to Snoop on an operator regardless of whether or not they are on an active call. However, the only way the Whisper option works is if they are on an actual call. The only difference internally is there are two channels connected through a central bridge. Otherwise, the operator's channel is the only one in that bridge. Since I can hear the operator regardless of the current call situation I'm assuming there must be code in the Snoop option to mute the operator if a call is not active? There is no code to do that. What whispering does require though (for both Chanspy and Snoop channels) is a constant media stream out to the channel. It's likely that in the specific scenario there is nothing generating a stream and thus nothing to whisper into. There's an open issue[1] to remove this requirement but I know of noone currently working on it. [1] https://issues.asterisk.org/jira/browse/ASTERISK-24397 Well nuts. Looks like my theory wasn't right :-) I wonder - as a workaround until that issue is addressed, you *may* be able to force the Whisper by starting Silence on the target channel first: https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Channels+REST+API#Asterisk13ChannelsRESTAPI-startSilence That *should* start silence frames going to the target of the Snoop channel, at which point, there's at least something flowing through to allow the audiohook to start sending Whispered audio. (If I'm wrong, Josh will tell me why :-) -- Matthew Jordan Digium, Inc. | Director of Technology 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA Check us out at: http://digium.com http://asterisk.org -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
Re: [asterisk-dev] ARI Snoop
Phil Mickelson wrote: Hello, I've written a full answering service application with Asterisk at the center. All of my interaction with Asterisk is through ARI. Thank you so much for this feature! Without it I wouldn't have been able to make this work! I've just implemented a new Snoop feature. Without boring you with the details (unless you want them) I am able to Snoop on an operator regardless of whether or not they are on an active call. However, the only way the Whisper option works is if they are on an actual call. The only difference internally is there are two channels connected through a central bridge. Otherwise, the operator's channel is the only one in that bridge. Since I can hear the operator regardless of the current call situation I'm assuming there must be code in the Snoop option to mute the operator if a call is not active? There is no code to do that. What whispering does require though (for both Chanspy and Snoop channels) is a constant media stream out to the channel. It's likely that in the specific scenario there is nothing generating a stream and thus nothing to whisper into. There's an open issue[1] to remove this requirement but I know of noone currently working on it. [1] https://issues.asterisk.org/jira/browse/ASTERISK-24397 -- Joshua Colp Digium, Inc. | Senior Software Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: www.digium.com www.asterisk.org -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev