Page 1 of 1

Use Keys When App is Open

PostPosted: Tue Nov 26, 2013 12:58 pm
by billychia
I received this message and was wondering if anyone else experienced this behavior and/or had a fix?

I noticed on the caller Id app that you provide it blocks keys while displayed. For example if I called the app launches and shows the callerid from the server sample file. If I try to transfer or press any digium keys such as a number key they are blocked and nothing happens (I.e can't get a key pad sound or anything). The work around is to press the X to close the caller id then all the buttons work. Is there any way to fix this or are number keys and others all disabled until the foreground window is closed?

Re: Use Keys When App is Open

PostPosted: Fri Nov 29, 2013 2:21 am
by tomdemoor
Hi Billy,

I noticed this behaviour:
When i push a numeric key in a foregrouned app, I don't hear the dtmf-tone.
Although the tone is sent/recevied correctly in Asterisk.
When I let Asterisk send a DTMF-tone back to the phone, I don't hear it either.

But the keys do work, I have interaction based on the keys I'm pressing.

Re: Use Keys When App is Open

PostPosted: Mon Dec 02, 2013 9:27 am
by malcolmd
There was a conversation thread about this that was started via the features e-mail address also. It looks like we're dealing with the shotgun approach here - which usually doesn't work as well as you want since you get different replies and it just leads to lots of extra work.

When your custom app is in the foreground, you've got control of the keys, and pressing the hardkeys or DTMF keys doesn't push those events down into the phone application. With what we have, making that kind of a change isn't a simple-to-do.

You do have access to the onkey (http://phones.digium.com/content/onkeykey) handler, that'll let you grab a key and then perform other things, e.g. http://phones.digium.com/methods/digiumphonesenddtmf
or the other methods at http://phones.digium.com/phone-api/refe ... igiumphone

The best advice currently is to just grab a softkey that backgrounds your app into an idle screen app, with your important information, then the user can interact however they want with a call, and you can use a BLF key to bring that app back into the foreground.

Cheers