[Freeswitch-users] How to detect DTMF and generate an event?

Michael Collins msc at freeswitch.org
Fri Oct 17 05:15:01 MSD 2014

I believe bind_digit_action (BDA) will do what you need. I think the trick
for you is to specify the detection leg and the action leg, that is, where
does BDA listen for a DTMF (self, peer, both) and where does it execute the
action (again on self, peer, or both).

There are some examples here:

However, I recommend you set up some simple call bridges where you
explicitly set the detect and event action legs differently so that you can
see it first hand. Once you have it working in simple cases, like pressing
a digit executing a dp app log, then you can move on to more interesting
endeavors. It's been a while, but I recall doing stuff like setting various
targets on various legs that printed log lines to the console, kinda like,
"Hey, this should be on the b-leg! UUID is '${uuid}'"

Let us know how it goes.


On Thu, Oct 16, 2014 at 2:08 PM, Szeto, Steven <steven_szeto at mitel.com>

> If I establish a call between two registered endpoints, and then press a
> DTMF key, I can see a DTMF key press event from the originator's call id:
> Freeswitch EventName: [[EVENT-NAME, DTMF]] - CallId:
> [694eb613-6b97-4197-a951-5288066ffbf5] ()
> GenerateDTMFEvent - CallID: [694eb613-6b97-4197-a951-5288066ffbf5] -
> TimeStamp: [10/17/2014 01:03:34.993 AM] - DTMF: [5] ()
> How can I get equivalent DTMF events on the terminator's call id? I hear
> the DTMF key on the phone, but I need to process the keystroke in my own
> application.
> Can the bind_digit_action application do what I need? If so, can I please
> get an example?
> --
> Regards,
> Steve Szeto
> *MiContact Center IVR Team*
> Software Design
> *Phone:613-592-2122 <613-592-2122>*
> Mobile:
> *Mitel*
> 350 Legget Drive,
> Kanata, Ontario, K2K 2W7, Canada
> mitel.com
> steven.szeto at mitel.com
> [image: Facebook] <http://www.facebook.com/mitel.networks>[image: Twitter]
> <http://www.twitter.com/Mitel>[image: Google Plus]
> <http://plus.google.com/+mitel>[image: Linkedin]
> <http://www.linkedin.com/company/mitel>
> This e-mail (including any attachments) is for the sole use of the
> intended recipient(s) and may contain information that is confidential
> and/or protected by legal privilege. Any unauthorized review, use, copy,
> disclosure or distribution of this e-mail is strictly prohibited. If you
> are not the intended recipient, please notify Mitel immediately and destroy
> all copies of this e-mail.  Mitel does not accept any liability for breach
> of security, error or virus that may result from the transmission of this
> message.
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20141016/0a2276d7/attachment.html 

Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list