Resource icon

TUTORIAL updated Single call flow control toggle to alter multiple inbound routes

islandtech

Wassamassaw
Joined
Jan 11, 2009
Messages
679
Reaction score
137
islandtech submitted a new resource:

Single call flow control toggle to alter multiple inbound routes - Call Flow Control

You want 1 button control to send inbound routes to the same night destination but different day destinations.
One BLF on your phone to control the following three separate call flow controls (which can be expanded)

Example:
DID A - day to ring group front office night to the night IVR
DID B - day to sales queue night to the night IVR
DID C - day to ext xxx night to the night IVR

1. Build all needed Call Flow Controls
2. Open the web GUI -> Other Tab -> open Config Edit
3. Select...

Read more about this resource...
 

islandtech

Wassamassaw
Joined
Jan 11, 2009
Messages
679
Reaction score
137
Updated and tested on asterisk 16.13.0 incredible GUI 15.0.12.37 (Incredible PBX/FAX 2020.1 for Centos 7)

Code still works as is.

Below is an example showing multiple BLF buttons including the main nite button.
Add an additional BLF button on your phone for each CFC index



Code:
[set-call-flow-toggle]
exten => 6483,1,Answer
exten => 6483,2,Set(togglestate=${DB(DAYNIGHT/C0)})
exten => 6483,3,GotoIf($[${togglestate} = NIGHT]]?12:4)
exten => 6483,4,Set(DB(DAYNIGHT/C0)=NIGHT)
exten => 6483,5,Set(DB(DAYNIGHT/C1)=NIGHT)
exten => 6483,6,Set(DB(DAYNIGHT/C2)=NIGHT)
exten => 6483,7,Set(DEVICE_STATE(Custom:onleave)=InUse)
exten => 6483,8,Set(DEVICE_STATE(Custom:DAYNIGHT0)=InUse)
exten => 6483,9,Set(DEVICE_STATE(Custom:DAYNIGHT1)=InUse)
exten => 6483,10,Set(DEVICE_STATE(Custom:DAYNIGHT2)=InUse)
exten => 6483,11,Hangup
exten => 6483,12,Set(DB(DAYNIGHT/C0)=DAY)
exten => 6483,13,Set(DB(DAYNIGHT/C1)=DAY)
exten => 6483,14,Set(DB(DAYNIGHT/C2)=DAY)
exten => 6483,15,Set(DEVICE_STATE(Custom:onleave)=Not_InUse)
exten => 6483,16,Set(DEVICE_STATE(Custom:DAYNIGHT0)=Not_InUse)
exten => 6483,17,Set(DEVICE_STATE(Custom:DAYNIGHT1)=Not_InUse)
exten => 6483,18,Set(DEVICE_STATE(Custom:DAYNIGHT2)=Not_InUse)
exten => 6483,19,Hangup



[ext-local-custom]
; Add hint to link to the Custom Device State
exten => 6483,hint,Custom:onleave&Custom:DAYNIGHT0&Custom:DAYNIGHT1&Custom:DAYNIGHT2
 

mainenotarynet

Not really a Guru - Just a long time user
Joined
May 29, 2010
Messages
754
Reaction score
155
Well, I have been using this 6483 for about 2 years now (when it first came out, I think) and it's great.

However, I just came across a (maybe not a) bug that many would not come across.

Scenario: You are a receptionist for 4 different people (In my case a Notary public, 2 amateur radio clubs and a small micro church) -- Now the Notary is out of commission for a bit (supplies stolen from car) so that isin Night Mode all the time now.

If you use 6483 to set all to Night, Great (both BLFs [6483 AND *281) go red as they should.
If you use 6483 to Set all to Day mode, Great (Both BLFs are Green as they should

BUT if you want to do only one of my 5 (c0/c1/c2/c3/c4) by *28x (*281 in example) I only want the 281 BLF Red to show only THEY are in night mode with c0/c2/c3/c4 still in day mode. What mine did was show that both *281 (red as it should be)and 6483 which SHOULD stay Green, was also RED - Bad for me. The GUI will show correct states but that does not help the BLFs with the wrong state.

I think the reason may be that the Hint line is looking at ALL CFCs and if ONE is "InUse" the whole hint is Red.

Now in My case I could leave the hint alone and see the overall state of CFCs and if I need create BLF for the one that needs manual toggling (*281 for me) but to have (up to) 11 [6483 & *280-*289] BLFs tying up a sidecar is a bit extreme.

I see two work arounds:
1- only have a BLF for those on vacation or on Permanent Night for a while and toggle all other together.
2 - Adjust the hint line to omit (in my case Custom:DAYNIGHT1) the permanent Night from the hint to show all Days with exception of the permanent Night as green and in NIGHT the one already in NIGHT would just stay there, but when Turned to DAY , you need to manually activate the Permanent Night as a step 2 in the morning.

Great script, use it often but sometimes all is not best. Thanks.
 

islandtech

Wassamassaw
Joined
Jan 11, 2009
Messages
679
Reaction score
137
@mainenotarynet Yes I've noticed that also, but the original question was asked to switch all lines.
The easiest work around that I use is:
remove
Code:
exten => 6483,5,Set(DB(DAYNIGHT/C1)=NIGHT)

exten => 6483,9,Set(DEVICE_STATE(Custom:DAYNIGHT1)=InUse)

exten => 6483,13,Set(DB(DAYNIGHT/C1)=DAY)

exten => 6483,17,Set(DEVICE_STATE(Custom:DAYNIGHT1)=Not_InUse)

edit and remove from the hint line
Code:
Custom:DAYNIGHT1

adjust the priority numbers

edit priority 3 to pick up the new priority number after the first hangup


forgot to mention to change priority 2 to reflect a different DAYNIGHT/Cx to monitor if you are not including C0
 
Last edited:

Members online

No members online now.

Forum statistics

Threads
25,810
Messages
167,754
Members
19,240
Latest member
nikko
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.
Top