Hook flashing an FXO SIP Gateway

Hello everyone,

I apologize in advance if this question has been answered elsewhere on this forum. I have been searching the web for several weeks and have yet to find a solution.

I have three regular POTS lines connected to a Grandstream GXW 4104 FXO gateway, each FXO port is setup with its own SIP trunk into Asterisk. I have an IVR built with a custom extension that when a caller presses 1 it goes to the custom extension that plays a recording saying your call will be transferred, it issues a hook flash to the FXO gateway, dials a telephone number of a third party and hangs up to have the telephone company transfer the call. The problem is I haven’t found a way to send a command to the gateway to hook flash. I read on the web I need to send a DTMF 16, or an “r” character. I tried using SendDTMF with the commands mentioned but Asterisk rejects it. I have the latest firmware loaded into the Gateway which does support hook flash, but the problem I am having is sending the message to the gateway to make it do a hook flash. I am using Asterisk 11.

Any help or direction on how to proceed would be greatly appreciated.

Thank you,


Asterisk code RFC 2833 code 16 as “f”, not “r”. There are some limitation on where it is supported.

Does the SDP from the gateway actually specify support for 0-16?

Thank you for the reply. I went through the documentation on the gateway and the best I can find is that it should support DTMF 0-16 as it says “Flexible DTMF transmission method,
User interface of In-audio, RFC2833, and SIP Info”. I do have the trunk configured for RFC2833, and I tried SendDTMF with an f and I get a message in the asterisk log stating I can’t use the “f” character. What is the proper way to send ‘f’?
I can post config and logs tonight.

I’d need to read the source code to be sure of where Asterisk supports sending flash via RFC 2833.