Recieving DTMF in GUI's call

Community based support for the Digium Phone Application Programming Interface (API).

Moderators: jwitt, sruffell, malcolmd, Moderator

Recieving DTMF in GUI's call

Postby rjconrad » Thu Sep 05, 2013 2:03 pm

Is there any way to recieve a DTMF signal while monitoring a call through the handler?

Also has anyone successfully used to AMI to do anything useful through the GUI by doing AJAM maybe?
rjconrad
Newsterisk
 
Posts: 12
Joined: Tue Jul 23, 2013 10:44 am

Re: Recieving DTMF in GUI's call

Postby sruffell » Fri Sep 06, 2013 7:50 am

Is there any way to recieve a DTMF signal while monitoring a call through the handler?


There is not any way to process the audio stream or receive DTMF events with the phone API. Perhaps you could decode DTMF on the server and use the SIP messaging to send notices to the phone about DTMF?
sruffell
Oldsterisk
 
Posts: 200
Joined: Fri Jan 07, 2011 2:02 pm

Re: Recieving DTMF in GUI's call

Postby rjconrad » Fri Sep 06, 2013 1:09 pm

Do you have any suggestion on how to decode the DTMF?

My setup is that I have a SIP phone that connects to another channel that I wrote custom, so when I send the DTMF it is coming in from the SIP channel to mine and all I hear is the audio of it, so is there a way to decode that it was a DTMF signal from that audio?

All I am trying to do really is send some sort of signal to my channel through a button on the GUI. So it does not need to be DTMF if there is some other thoughts you have to send a signal from the sip channel (activated from the GUI) to my custom channel.

Thanks!
rjconrad
Newsterisk
 
Posts: 12
Joined: Tue Jul 23, 2013 10:44 am

Re: Recieving DTMF in GUI's call

Postby sruffell » Fri Sep 06, 2013 1:58 pm

If I understand correctly, your phone is registering with a custom asterisk channel driver that you wrote that speaks the SIP protocol? In that case, I'm not really sure if you can use the normal SIP messaging.

See the "Interacting with Asterisk" section on then Custom Phone Applications with Asterisk wiki page for a description of how its "normally" done.

So what you'll probably want to use is something like long-polling along with a NetRequest object in order to send messages from your channel driver to your custom app. This should eliminate the need to decode DTMF in your channel driver.

Will this work?
sruffell
Oldsterisk
 
Posts: 200
Joined: Fri Jan 07, 2011 2:02 pm

Re: Recieving DTMF in GUI's call

Postby rjconrad » Mon Sep 09, 2013 6:57 am

It ended up that because I based my custom channel off of chan_console, it had methods that I previously deleted and did not notice called console_digit_begin and digit_end which can recieve the DTMF tone and be my "interrupt" for changing one of the flags (Push-to-Talk). Thanks for your input though, I might need to do that for other options that I have.

-Ryan C.
rjconrad
Newsterisk
 
Posts: 12
Joined: Tue Jul 23, 2013 10:44 am


Return to Digium Phone API

Who is online

Users browsing this forum: No registered users and 1 guest

cron