Asterisk cmd Flash

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

Created by: oej, Last modification: Thu 15 of Jan, 2009 (13:31 UTC) by the_mumu


Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+

Page Changes | Comments

 

Featured -

Search: