Gathering DTMF with variables in bridged calls?

I am using AMI to detect dtmf in bridged calls but I have not found a way to carry over variables I assigned in the dialplan. I need to be able to differentiate between users as we have several variables to send updates during the call, but since I can’t carry them over the DTMF is impossible to link the the variables previously set…

Ok I’ve tried adding custom SIP headers to the last outbound Dial. How do I view them when looking at Events with the AMI? I’ve checked in both DialBegin event and DTMFEnd, but fail to see the headers I’ve added.

Adding custom SIP headers doesn’t make them appear in AMI events, the same goes for channel variables. Those get emitted as a Varset AMI event if allowed to do so, but don’t appear in other manager events. There IS the ability to have a configured list of channel variables always appear in channel related AMI events[1] though how you do that in FreePBX I don’t know. Generally people maintain state in their AMI application instead.

[1] https://github.com/asterisk/asterisk/blob/master/configs/samples/manager.conf.sample#L60

Right now I am using this dialplan. When the firct caller answers he will press ‘1’ to dial whatever number it is associafted with.

; Handle DTMF inputs
exten => 1,1,NoOp(Dialing number 1)
  same => n,Dial(PJSIP/${ARG3}@sip1)
  same => n,Hangup()

Problem is that doing this creates a bridge and thus no longer follows the dialplan. I am looking for a way to keep the new bridged call into continuing to use the dialplan and a new Context inside of it. How would I do this?

I am basically looking for any way to monitor and control DTMF that will keep track of what user and phone is doing the dtmf and act accordingly.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.