I have a call flow control that I want to use twice - I’d like to keep the ‘GUI version’ I’ve made with the front end, but is it possible to in dialplan code query the status of that control and then depending on its state send the call to different locations?
As in pseudocode
`exten => s,n,gotoif($["${day}"=“false”]?app-announcement,s,3) ;
You can set another call flow control on your match option of the current call flow control that will send the call according to the state of the second call flow control.
Thanks, Daniel , I’m already doing that, what I’m trying to achieve is a little more complex. I’m trying to use the state of a call flow toggle from inbound route A to allow inbound route B to hit a different announcement without needing to duplicate a second call flow toggle.
I’ve so far only been able to do this by duplicating my call flow toggle. It’s not such a big deal to do this, but I expect what I originally wanted to do is possible.
Yeah, cascading call flows sucks, and it’s not going to work in this application anyway.
Try using Time Conditions, and then in Advanced Settings enable the ‘Hook Time Conditions Module’. It will allow you to control multiple time conditions with a single call flow toggle.
You can write a small dialplan that will check the status of your call flow, and send the call based on the call flow’s state to a different location from the original call flow.
This is an example for a DID that will check a call flow state (assuming the first call flow index is 0 and the secretary’s extension is 222):
[custom-callflow-check]
exten => _X.,1,LOG(NOTICE,Checking the call flow state of phone number:${EXTEN})
same => n,GotoIf($[ "${DB(DAYNIGHT/C0)}" = "NIGHT" ]?app-announcement-3,s,1:continue)
same => n(continue),Goto(from-internal,222,1)
You can set your desired destinations in the true (app-annoucement-3,s,1) or false (continue) sections.