login | register
Thu 09 of Sep, 2010 [06:57 UTC]

voip-info.org

History

Asterisk cmd Flash

Created by: oej,Last modification on Thu 15 of Jan, 2009 [13:31 UTC] by the_mumu

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


Comments

Comments Filter
222

333Re: X100P + Call-Waiting how-to.

by the_mumu, Thursday 15 of January, 2009 [13:37:28 UTC]
In my case to get call waiting working properly I had to use 'callee' instead of 'caller' in features.conf. When I tried it with 'caller' it attempted to Flash() the SIP line instead of the ZAP line and failing that, dropped the first call.

Also, putting DYNAMIC_FEATURES=>zapflash into the globals section of extensions.conf means you will not need to separately Set() it for any extra contexts you have.

extensions.conf
globals
DYNAMIC_FEATURES=>zapflash

features.conf
applicationmap
zapflash => *0,callee,flash,()

222

333Re: flash transfer problem in asterisk integration with old PBX

by carlos_ventura, Thursday 05 of July, 2007 [18:21:18 UTC]
Hi!! i'm new in this.. i try to do flash with my pstn line, for use call waiting option but i try this command with trixbox 2.0 and not working.. i have a rhino card 4fxo .. plz send me back how i can do..

thantx

Carlos ventura
Carlos@gvr.com.do
222

333Re: Call waiting Flash Hook

by carlos_ventura, Thursday 05 of July, 2007 [18:21:14 UTC]
Hi!! i'm new in this.. i try to do flash with my pstn line, for use call waiting option but i try this command with trixbox 2.0 and not working.. i have a rhino card 4fxo .. plz send me back how i can do..

thantx

Carlos ventura
Carlos@gvr.com.do
222

333Re: X100P + Call-Waiting how-to.

by carlos_ventura, Thursday 05 of July, 2007 [18:21:13 UTC]
Hi!! i'm new in this.. i try to do flash with my pstn line, for use call waiting option but i try this command with trixbox 2.0 and not working.. i have a rhino card 4fxo .. plz send me back how i can do..

thantx

Carlos ventura
Carlos@gvr.com.do
222

333Re: flash transfer problem in asterisk integration with old PBX

by plink, Monday 27 of November, 2006 [11:19:12 UTC]
I've solved the problem changing the flash time in the zapata.conf file,
I've set:

flash = 200 (the defualt was 750 ms)

in the extensions.conf the code is for example:

exten => 42,1,Flash()
exten => 42,2,SendDTMF(42,250)
exten => 42,3,Hangup()

now the transfer with flash works correctly

222

333flash transfer problem in asterisk integration with old PBX

by plink, Tuesday 07 of November, 2006 [14:39:01 UTC]
I've tried to transfer a call using the Flash command, but with my configuration it doesn't work.
I have a traditional PBX connected with a zap channel to Asterisk that acts like an IVR:

TELCO line --> traditional PBX (FXS) --> (FXO) Asterisk

From the TELCO line I can make a call to the traditional PBX and reach Asterisk, the IVR system on Asterisk answers the call and I can dial an extension (for example 42 that is on the traditional PBX). In the asterisk dialplan I've set to transfer the call using Flash() like in this example:

exten => 42,1,Flash()
exten => 42,2,Background(silence/1) wait 1 second for the traditional PBX
exten => 42,3,SendDTMF(42,250)
exten => 42,4,Background(silence/1) wait 1 second for the traditional PBX
exten => 42,5,Hangup()

When I dial the extension 42, the phone 42 on the traditional PBX rings but when I answer there isn't communication with the call from the TELCO line and after a few seconds the line hangup.
Here you can see what happen in asterisk CLI console:

      Executing Answer("Zap/4-1", "") in new stack
   — Executing BackGround("Zap/4-1", "a_suoni_plink/menu_esterno2") in new stack
   — Playing 'a_suoni_plink/menu_esterno2' (language 'it')
 == CDR updated on Zap/4-1
   — Executing Flash("Zap/4-1", "") in new stack
   — Flashed channel Zap/4-1
   — Executing BackGround("Zap/4-1", "silence/1") in new stack
   — Playing 'silence/1' (language 'it')
   — Executing SendDTMF("Zap/4-1", "42") in new stack
   — Executing BackGround("Zap/4-1", "silence/1") in new stack
   — Playing 'silence/1' (language 'it')
   — Executing Hangup("Zap/4-1", "") in new stack
 == Spawn extension (incoming, 42, 5) exited non-zero on 'Zap/4-1'
   — Hungup 'Zap/4-1'

I've tried the following changes to the dialplan in my example but transfer still doesn't work:

- I've tried to use wait(1) instead of Background(silence/1)

- I've tried without Background(silence/1) or wait(1):

exten => 42,1,Flash()
exten => 42,2,SendDTMF(42,250)
exten => 42,3,Hangup()

- I've tried without the Hangup() instructions at the end

Has anyone the same problem like me and any suggestions?


222

333

by Yozh, Saturday 29 of July, 2006 [01:36:33 UTC]
Hi,

I have everythng working on my * all the features that I want exept one.

I have a SPA-1000 connected to my home phones and X100P for the POTS line. The SPA gives me call waiting indication(beep) but when I press flash I just get dial tone. is it SPA-1000 thats doing something wrong or * not flashing the card ? Please help me with this issue because with out call waiting I cant use my * at all. Thank you.
222

333Flash() on a SIP line?

by undrhil, Monday 12 of June, 2006 [05:16:57 UTC]
Is there a way to simulate the transfer feature on a SIP line so it still only requires the one line for transferring a call, or is this functionality (three-way calling with transfer) not available on SIP lines?

222

333Flash timing

by clivechan, Friday 27 of January, 2006 [06:37:42 UTC]
How can we set the flash timing, and what is the default flash timing (in miliseconds) for Asterisk?

Can someone advice me on this?

222

333Re: X100P + Call-Waiting how-to.

by okarcheboy, Friday 06 of January, 2006 [05:04:22 UTC]
Here is an alternative method that I just found. This makes it nice and simple to 'flash' an incoming POTS line (ZAP channel) as opposed to the dialplan scripts that I have seen that require tranferring the call, hanging up, and waiting for a call back. That was too confusing for my wife (me too). Now all that has to be done is press *3 and it is done. No transfers. No hanging up. No dial back.

extensions.conf
context
exten => s,n,Set(DYNAMIC_FEATURES=zapflash)

exten => s,n,Dial(SIP/xxxx,15,tw)

features.conf
applicationmap
zapflash => *3,caller,flash,() <<<<<<<<<< needs a comma between flash and ()