Not able to detect talk events in confBridge 10 - asterisk

I am using confBridge in my asterisk for conferencing.
I want to detect who is talking and who is not talking inside a conference.
For this there is an option in confBridge "talk_detection_events=yes" this sends the talk events to AMI, but it only sends the talk events when the user joins a conference and after that I am not able to see any events in AMI.
I want that whenever a user starts talking or stops talking there should be an event triggered in AMI.
Or, is there any command by which I can detect if a user is talking or not in confbridge?
Also, I want to detect keypress (dtmf) events in confbridge. There is an option "dtmf_passthrough=yes" which pass the dtmf events to the AMI, but I did not see any events when a user presses any key in a conference.
Please help me in setting up these.
Regards
Anil

Talk Detection:
While setting talk_detection_events=yes will enable sending AMI events out denoting when a user begins/ends talking, that may not be sufficient to configure your ConfBridge depending on several other factors.
Whether or not a user is determined to be 'talking' depends on combinations of the dsp_talking_threshold and dsp_silence_threshold settings. If you are not receiving the talk detection events that you expect, then you may need to tweak these settings to match the audio properties that ConfBridge is receiving from its participants.
Alternatively, you should ensure that your AMI account has sufficient class permissions to receive the Talk Detection events. The event has the EVENT_FLAG_CALL class permission, and you should be listening for the event ConfbridgeTalking.
DTMF
dtmf_passthrough has nothing to do with the actual raising of the DTMF AMI event, which is done by the channel read/write routines. dtmf_passthrough allows the DTMF key presses to be sent to the other channels in the bridge - typically, the ConfBridge application absorbs the DTMF key presses.
With this enabled, you should see DTMF events - at a minimum - on the Bridging channel. If you aren't seeing events of any kind, you most likely don't have the appropriate class permissions set on the AMI account.
All of that being said, I have to wonder why you're looking for the DTMF key presses. In general, actions on channels in ConfBridge should take place using the menu system implemented in ConfBridge, or using the AMI/CLI commands. You'd be hard pressed to accurately intercept and handle a channel's DTMF while it was still in the conference bridge - the channel, at that point, is in owned by the bridge layer, and anything you choose to do to that channel is almost certainly unsafe.

Related

Asterisk AMI - How to simulate a DTMF sending action over AMI

I am building an application in Asterisk , which has to simulate the phone keypress action i.e DTMF. For instance , if a caller calls a number and the IVR requires to press a digit , the application (say a webpage) should also be able to simulate the same key press. I tried the following:
- I have a web application that triggers PlayDTMF action over AMI to simulate the key press on the caller channel. Unfortunately this didn't work , as it played the DTMF digit on the channel (the keypress could be heard) but asterisk didn't receive the DTMF. It was just playing the DTMF, which is what the AMI action was designed for. I technically need to "send" the DTMF digit on the channel.
- the sendDTMF function in asterisk couldn't be used either,as it is a dialplan function and I need a AMI action to trigger DTMF from an external source.
A similar issue was reported sometime back: Asterisk AMI: DTMF not received on SIP channel
I am using Asterisk 11. Is there a way to implement the above using AMI/AGI? Or do i need to further upgrade my Asterisk to 12 to make use of ARI?
Appreciate your inputs.
I managed to simulate the DTMF action , by Dialing/Originating out to a local context and using the outgoing bridging channel id for DTMF input. So the flow is :
call lands on Asterisk -> Asterisk Dials out to a Local context -> The dialout creates a bridging event which has the outgoing channel id(store in some DB) -> The local context can have the IVR flow and using the stored channel and PLayDTMF action - dtmf digits can be inserted. Not sure if there is a more elegant solution to this!

Asterisk / Freepbx does not set CallerID to calling party when queue contains a cell phone

Does Asterisk / FreePBX support the ability to pass the caller ID of an inbound caller to a remote support agent (on a cell phone)?
Our work has a queue for incoming calls which contains "remote agents" (people on cell phones). To the cell phone agents, all calls appear to be coming from our main number (385-111-1111). We would like the calls to appear to be coming from the caller (201-555-5555).
This is not a problem with our SIP trunk provider. In the past we used different PBX software, with the same SIP trunk provider, and it was able to set the Caller ID properly. Extensions are capable of setting and passing arbitrary Caller ID, only calls from queues retain the main number.
Outgoing PEER Details:
host=sip.provider.com
type=friend
trustrpid=yes
sendrpid=yes
I've manipulated so many settings that I've come to wonder if Asterisk / FreePBX simply does not support this. Has anyone successfully been able to do this?
Asterisk certainly does. Capture the CID in a dialplan variable at the beginning of the call and set the outbound CID to the same value before passing it on.
There's no direct way to do this within the FreePBX GUI but there is a workaround:
Set up a virtual extension
Enable follow-me on the extension, add the mobile number to the follow-me list
Set the follow-me CID mode to default
Ensure the queue's agent restrictions allow the use of follow-me numbers
Have the agent log into the queue using the virtual extension instead of their mobile number
The default behaviour for the follow-me extension is to pass the incoming caller ID out. So, some flexibility is lost (mobile numbers have to be changed in follow-me settings) but it does allow the desired behaviour.
Asterisk supports setting the callerid for all outgoing or redirected calls. I did this with v1.8 and v13.7 as I'm facing the exact same requirements.
This feature depends on the provider and the contract they setup with you. My Provider calls it "Special Arrangement / Clip no screening". In my case they use "P-Asserted-Identity" to find callerid.
I had to set the following options in the outgoing sip trunk in sip.conf:
trustrpid=yes
sendrpid=pai

Asterisk ARI early media detection

I'm playing with asterisk ARI and I have few problems that I'm unable to solve.
Originating a call from ARI does not register any events until channel is UP. Is it possible to force it to enter Stasis before channel is in UP state?
I'm trying to detect if there is voice in early media (operator messages on GSM gateway calls). Can it be done?
It is very much possible with Asterisk 14 version.
https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Channels+REST+API#Asterisk14ChannelsRESTAPI-create
This will create a new channel and place into Stasis immediately.
You will be able to do any operation over the newly created channel.
You can originate the call into a Local channel, then perform your dial from the local channel.
Early media is carried via SIP 183, which means, that Asterisk isn't really aware of it. Well, it is aware at the channel level, saying: "Please open media ports", however, there is not ARI event that says that.
Gotta admit, it does sound like a cool feature for ARI.

Asterisk HOLD functionality workaround

I'm using asterisk with webrtc in chrome (SIPml5 client) and also using their webrtc2sip gateway.
My problem is that I can't send the hook-flash/flash signal to asterisk for some reason.
Is there a possibility to trigger hook flash by sending DTMF signals ? (which apparently work for me )
Example: I want to trigger the standard hold functionality by sending the following DTMF sequence: #123.
On the other hand as a workaround, could I hold a channel using AMI or AGI ?
Basically I want the other party to hear OnHoldMusic while the channels/call remain active. On the local side I can just mute the audio tag which is fine.
Thanks.
Yes, you can do hold using ami command hold or AGI exec command musiconhold
That info is availible in AMI/AGI documentation
You can handle dtmf by using features.conf

Asterisk AMI: determining if a channel held

I'm trying to figure out a way to reliably detect if a channel is held via AMI. I have two issues:
On Asterisk 1.8 I get the MusicOnHold event when a channel is held. Is this a reliable event? Can Asterisk be configured in a way that this event won't be sent?
Earlier versions of Asterisk (1.6.0) don't send an event for MusicOnHold. In fact, all I get is an ExtensionStatus event when I put a call on hold. Is there another event I could enable or command I could send to figure out if a channel is on hold?
I know these are older versions of Asterisk but we have customers that are still using them.
Yes event is realible if you AMI application is realible.
No idea about ealy versions.Except you can detect moh by dialplan using NewExten event. Sure that will nto detect moh from endpoint.
Note, some phones not do MOH but instead just plaiing moh sound. For such phones you can't detect MOh state.
I was missing "callevents=yes" in my sip.conf. I get hold events properly now even on older versions of Asterisk.

Resources