Sending a Flash hook signal via a Digium 4 port FXO card


I have a server that is running FreePBX. This server also has a 4 port FXODahdi card installed.

FreePBX has detected the analogue port under DADHI config → Analog ports

There is one SIP client registered to the Freepbx.

I created a Trunk that is linked to the FXO port/DAHDI channel.

I have set up an outbound route on the FreePBX that allows me to make a call from the SIP client and route the call out via the Dahdi trunk. When I make a test outbound call it works successfully.

The next test I wanted to do was to send a flash hook from the FXO port to the FXS port after a call is established. When I do the test I make an outbound call from the SIP client to an external number, the call connects via the DAHDI trunk and there is two-way audio. When I press the hold button on the SIP client, on the other end I hear the MOH from Freepbx.

What I would like to see first is that when I press the hold button on the sip client (after the call has been established). The SIP client then sends an INVITE with the SDP attribute a=sendonly and I want the Freepbx to interpret that to send a flash hook signal on the FXO port instead of sending the music on hold generated by FreePBX.

Is this possible with my current setup?

current asterisk and FreePBX version
FreePBX 16.0.33
freepbx*CLI> core show version
Asterisk 18.20.2 built by mockbuild @ jenkins7 on a x86_64 running Linux on 2024-01-02 13:09:10 UTC

I look forward to hearing from you.


I think you would be better off using a feature code. I believe SendDTMF F will cause DAHDI to flash.

Hi Dave55, I will give that a go.

Hi @david55 , I searched the GUI to create a Custom feature code. I could create one in Misc Application, but there is a destination section where I am unsure what to fill in there. I tried to set the Destination to ‘Misc Destination’. But when I tried to create a Misc Destination I tried to set the ‘dial’ field to F but it got rejected with an error message ‘please enter a valid dial string.’

I need a bit of hand-holding to set the Feature code correctly for Flash.

Can you provide a little more guidance on how to create a customer feature code to send a DTMF tone?

Feature code isn’t the right thing here since you want to so this in call…
You want to use _custom files. In this case /etc/asterisk/features_featuremap_custom.conf and your dialplan in /etc/asterisk/extensions_custom.conf

Also the dialplan application Something like exten => s,n,senddtmf(F)

I will give this a go and feedback. Thank you for providing the links

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