Hook Flash DTMF event

Does anyone here know how Asterisk handles/is supposed to handle “Hook Flash DTMF Events”?

In my Grandstream HT704, I enabled the following:
Send Hook Flash Event: No Yes (Hook Flash will be sent as a DTMF event if set to Yes)

When I flash during a call, I see this in the console:

[2021-02-01 11:16:48] WARNING[29673][C-00000af2]: channel.c:3322 ast_waitfordigit_full: Unexpected control subclass '9'
[2021-02-01 11:16:48] WARNING[29673][C-00000af2]: channel.c:3322 ast_waitfordigit_full: Unexpected control subclass '9'

Looked at channel.c as well, but that didn’t really clarify much for me. I’ve consulted with some others who also have not been able to get these Grandstream “DTMF Hook Flash Events” working right, and they’ve been having the same issue for about as long as they can remember. What I’d like to do is have the Grandstream connect directly to Asterisk when it flashes. It doesn’t support that natively, like Linksys ATAs do, but I was hoping to take advantage of this “hook flash event” to signal to Asterisk that a hook flash has occurred.

Nothing more shows up when I do a sip debug from my ATA concerning this “hook flash event” - any thoughts?

This is unsupported. Such events are merely passed through, not acted upon.

I assume by unsupported, you also mean there are no plans to support it?

Would there be any viable way of acting upon these kinds of events or is not even at the point where it can detect what kind of event it is and I could extend it from there?

Just a bit confused what that is there for if there is no way to use it or act upon it. I can see that something is happening when the event gets sent, and even if Asterisk won’t do anything out of the box with it, I’m wondering if there’s any way I could somehow detect it (e.g. a script, some kind of listener) to detect that there was a hook flash? Or is this an issue ATA-side?

I know of noone working on such a thing. Asterisk provides various ways to hook in and do things, such as framehooks, but for this you’d likely need to do it in the channel driver.

“Issue” is relative. For a flash hook what you generally want is to switch between calls, that doesn’t exist in Asterisk. ATAs from what I’m aware do it ATA-side and to Asterisk it knows no difference and just sees it as two calls.

Right, I realize they are all separate calls to Asterisk, but depending on the programming of the switch, you can associate different calls with a single line and implement the behavior to switch back and forth between them in the dialplan. I know that behavior would need to be written and that is easy enough to do. What I was wondering if there is any way to get the “message” that there was a hook flash event, and then in the dialplan I can start executing code to do whatever I wanted to - switch calls, bring in another dial tone, drop a previous call, etc.

There are no “calls” (plural). It’s a single call, thus the problem. You have to write the logic to then somehow handle and support multiple calls with the device - and what that means exactly doesn’t exist in Asterisk core or the SIP channel driver.

1 Like

Ah, I see what you’re saying now. If I didn’t have to support ATAs that work properly in this case, that wouldn’t be an issue - I could keep one call connected between the ATA and Asterisk and have the other calls handled in Asterisk, connected to the ATA<->Asterisk call in and out as needed. But since the hook flash is in the call and not spawning a new one, that logic would mean departing/abandoning from the “normal” way of supporting things.

I’ll keep trying to get in touch with Grandstream to see if they can add that capability. Thanks!

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