How to send Hookswitch "flash" to pstn for 3way calling

I’ve seen several posts about this subject but I am still in need of help, we have Freepbx 15.0.17.47 with Yealink T42S phones connected to Grandstream 4108 FXO gateway with pots lines connected, all i want to do is send a “Flash” to the pots line to use the 3way calling/conference call feature. Yealink says this is a function for the Grandstream , Grandstream says there unit will work with flash and thats all they say,Can this be done ? All I have are PSTN lines and I would like to utilize is the 3way calling feature. The issue I have is this for tenants and each tenant is responsible for there own PSTN lines, currently they are using Avaya IP Office in the same way and flash works fine on that system. Any help is greatly appreciated.

I assume these are SIP to analogue gateways, and you are using dtmfmode=rfc2833 or rfc4733 (depending on channel driver) on Asterisk.

Asterisk maps the pseudo DTMF digit f to the telephony event for hook flash. I would guess the gateway is expecting to see that event.

Thank you for your reply David55,
The Yealink phones are PJSIP the Grandstreams are using sip connected via sip trunks. The phone is set to "DTMF Type RFC2833 the Grandsteram is also set to RFC2833 …what am I missing ??

You need to enable the DTMF log and see if the Yealink phones actually send hook flash events. If they do, you should enable RTP debugging and confirm that hook flash events are being sent to the gateway.

I haven’t researched whether chan_pjsip actually handles that event type. Sending hook flash through a PABX is not a standard thing to do, and would be impossible on most traditional PABXes, which would always treat hook flash as a local signal, and would be on lines intended for PABX use, for which hook flash serves no purpose. As such it is not something of which many people will have any experience. (I’m assuming your analogue lines are intended for direct connection to phones, not for PABX use, e.g. they will be loop start lines. I wouldn’t expect lines intended for PABX use to honour hook flash.)

It appears the Yealink is not sending the flash event based on what I see, any idea’s on how to get the phone to send the flash ?

  • Channel PJSIP/122-0000009b left ‘simple_bridge’ basic-bridge <701df97d-ba1b-4809-b48e-49655c535458>
    – Channel SIP/GSGW13-5-0000008c left ‘simple_bridge’ basic-bridge <701df97d-ba1b-4809-b48e-49655c535458>
    == Spawn extension (macro-dialout-trunk, s, 34) exited non-zero on ‘PJSIP/122-0000009b’ in macro ‘dialout-trunk’
    == Spawn extension (from-internal, 7177259999, 11) exited non-zero on ‘PJSIP/122-0000009b’
    – Executing [h@from-internal:1] Macro(“PJSIP/122-0000009b”, “hangupcall”) in new stack
    – Executing [s@macro-hangupcall:1] GotoIf(“PJSIP/122-0000009b”, “1?theend”) in new stack
    – Goto (macro-hangupcall,s,3)
    – Executing [s@macro-hangupcall:3] ExecIf(“PJSIP/122-0000009b”, “0?Set(CDR(recordingfile)=)”) in new stack
    – Executing [s@macro-hangupcall:4] NoOp(“PJSIP/122-0000009b”, "SIP/GSGW13-5-0000008c montior file= ") in new stack
    – Executing [s@macro-hangupcall:5] GotoIf(“PJSIP/122-0000009b”, “1?skipagi”) in new stack
    – Goto (macro-hangupcall,s,7)
    – Executing [s@macro-hangupcall:7] Hangup(“PJSIP/122-0000009b”, “”) in new stack
    == Spawn extension (macro-hangupcall, s, 7) exited non-zero on ‘PJSIP/122-0000009b’ in macro ‘hangupcall’
    == Spawn extension (from-internal, h, 1) exited non-zero on ‘PJSIP/122-0000009b’
    – PJSIP/122-0000009b Internal Gosub(crm-hangup,s,1) start
    – Executing [s@crm-hangup:1] NoOp(“PJSIP/122-0000009b”, “Sending Hangup to CRM”) in new stack
    – Executing [s@crm-hangup:2] NoOp(“PJSIP/122-0000009b”, “HANGUP CAUSE: 16”) in new stack
    – Executing [s@crm-hangup:3] ExecIf(“PJSIP/122-0000009b”, “0?Set(__CRM_VOICEMAIL=)”) in new stack
    – Executing [s@crm-hangup:4] NoOp(“PJSIP/122-0000009b”, “MASTER CHANNEL: 1629901924.311 = 1629901924.311”) in new stack
    – Executing [s@crm-hangup:5] GotoIf(“PJSIP/122-0000009b”, “0?return”) in new stack
    – Executing [s@crm-hangup:6] Set(“PJSIP/122-0000009b”, “__CRM_HANGUP=1”) in new stack
    – Executing [s@crm-hangup:7] AGI(“PJSIP/122-0000009b”, “agi://127.0.0.1/sangomacrm.agi”) in new stack
    – <PJSIP/122-0000009b>AGI Script agi://127.0.0.1/sangomacrm.agi completed, returning 0
    – Executing [s@crm-hangup:8] Return(“PJSIP/122-0000009b”, “”) in new stack
    == Spawn extension (from-internal, h, 1) exited non-zero on ‘PJSIP/122-0000009b’
    – PJSIP/122-0000009b Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=

Seems that people have had problems with this even without a PABX in the middle!

Another search result, on a Yealink forum produced no answers at all.

However it looks unlikely that you can do this with a literal hook flash; you probably have to program something, on the phone, to send one.

I can find no mention of hook flash in the phone’s user guide.

You can probably define an Asterisk feature code and have it execute “SendDTMF(f)” on the B side, to see if the the gateway handles the hook flash signal.

Agreed!
Seems there is little information out there on how to do this and Yealink hasn’t been the best with there answers,Honestly I’m not sure how to setup a feature code to send that in asterisk can you recommend a place or site I can look at to give this a try?

I approach this forum from an almost purely Asterisk point of view, but I think feature codes are also fairly fundamental to FreePBX, so I’d rather leave it to someone with the FreePBX expertise to give you the approved way of doing it.

Thanks David55 I appreciate you taking time to look this over with me, hopefully somebody out there can help.

It should be technically possible to do this, but I have no recollection of ever seeing a good description of anyone succeeding. I tried once years ago using DAHDI with both analog phones and FXO ports, and gave up, you’re probably going to find it even more difficult using a gateway.

has anyone ever setup a hook flash using DTMF 16 via sip info ? as a soft key?

I assume that if you do nothing special, 3-way calling from the Yealink works just fine, though it ties up two POTS lines instead of one. If not, please provide details.

So I assume that the motivation is to reduce the frequency of inbound callers encountering a busy signal or outbound callers encountering an all-circuits-busy condition.

Approximately how often are 3-way calls made? On average, how long do they last? How many lines do the affected tenants have? How often are they all occupied?

I’m asking because it may be easier to eliminate a line shortage by supplementing or replacing them with SIP trunks, which will avoid busy conditions altogether, instead of just alleviating them in this one case.

If you really want to make the flash work, I would first test that Asterisk sending a DTMF F actually causes the 4108 to send a hook flash. You could do this with a Custom Trunk specifying the D option in its dial string, or by writing custom dial plan that calls SendDTMF.

If that works, you could then define a new in-call feature (analogous to *2 for attended transfer) that runs code which locates the B channel for the call and does a SendDTMF of F on that channel.

Thank you for your reply Stewart1, Correct the Yealink will tie up both pots lines for a 3way call, the other issue is tenants with only one pots line and 3way calling, 3way calling traffic isn’t heavy and I agree a sip trunk would resolve this, can you give me an example of what “D” in a dial string would like in a custom trunk?

Can anyone recommend a sip trunk provider that can provide outbound only service ?

He doesn’t mean in the dial string. He means in the Dial application parameters.

same => n, Dial(PSJIP/xxxx,D(F))

I’ll leave it to those more familiar with FreePBX to describe the simplest way of achieving this within the FreePBX framework.

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