Upgrade 3CX to v18 and get it hosted free!

Asterisk cmd Flash

Author image

Synopsis:

Flashes a Zap Trunk

Description:

Flash()

Sends a flash on a zap trunk. A switchook flash (or link) is an on-hook condition that lasts no less than 200ms, and no more than 1200ms. The actual length is different for different systems (400-600ms is probably the safest). You can perform a flash by pressing the link button on an analog set so equipped, or simply hold down the hookswitch for about half a second (be careful: too long and you’ll hang up – too short and it’ll be ignored). Note that in the UK BT chose to use a 80ms flash time (aka Recall).

If you have any link-enabled features on your line, a flash is typically how you would access them.

Here’s a macro that will perform a link-transfer, which will allow you to transfer calls to an external number from your system without tying up a channel (the incoming line will be freed when the transfer is completed).

[macro-cell_user]
exten => s,1,Playback(transfer)
exten => s,2,Flash()
exten => s,3,SendDTMF(${ARG1})
exten => s,4,Hangup()

To call the macro, try something like this:

[globals]
MyCellPhone = 4165551234

[remote_sets]
exten => 6004,1,Macro(cell_user,${MyCellPhone})

NOTE: This will only work if link-transfer functionality is available on the incoming line. This is usually a feature you would pay extra for, so don’t assume it is there. Call your telco to find out about availabilty and cost in your area. Also, it might be wise to test it out with an analog line directly connected to the circuit so that you can be sure it the feautre functions correctly (as opposed to driving yourself nuts troubleshooting it).

 

Return codes

Returns 0 on success or -1 if this is not
a zap trunk

 

Example of Call Waiting with incoming POTS line (Zap)

Most POTS lines use a single hook flash for Call Waiting. The following will allow for the hook flash to be done any time during a call.

extensions.conf

[globals]
DYNAMIC_FEATURES=>zapflash

features.conf

[applicationmap]
zapflash => *0,callee,flash,()

To complete the setup, in Asterisk console run:

reload res_features.so
extensions reload

Once you hear the Call Waiting signal, just press *0 to switch to the other caller. You can press *0 as many times as you want to switch between the two parties.


Asterisk | Applications | Functions | Variables | Expressions | Asterisk FAQ


Article Reviews

Write a Review

Your email address will not be published. Required fields are marked *

Required Field. Minimum 5 characters.

Required Field. Minimum 5 characters, maximum 50.

Required field.There is an error with this field.

Required Field.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

There are no reviews for this article. Be the first one to write a review.

Related Posts:

Get 3CX - Absolutely Free!
Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.