Affect Variable in One Call Processing Script Using Another?

Status
Not open for further replies.

TagleRock

Silver Partner
Basic Certified
Joined
Apr 24, 2018
Messages
160
Reaction score
16
I was trying to think of a way to restore the functionality of the dial code to over ride office hours. I was able to successfully use this to override the office hours. But I would like to have the flexibility to be granular or edit the call flow in CFD if I want to. I was trying to achieve this in CFD and simplest way I could think of was to have it increment a variable to a certain value when a code is dialed and loop sending it to an after hours destination as long as the varibale matches that value, then dial another code that changes it to a different value to set it back to in office. But I can't think of a way to properly route calls to it. If I set it up so that if a user dials a code then it will set the variable, but it won't matter because no calls will flow to it becuase no DID is assigned. If I send calls to it then the variable will be incremented upon execution to the matching value for the loop condition and calls will permanently be sent to the after hours destination.

So what I'm wondering is can I have a call processing script tell another to set variable to a certain value? Or is there a way to just set all hours to closed the entire day when a code is dialed? It seems like that is what the script I linked earlier is doing, but I don't see the function to change office hours in CFD.

This is not like a huge or urgent priority, its more of a control thing and me being able to customize it.
 
Use a global 3CX parameter.

Using ps.GetParameterValue(name) and ps.SetParameter(name, value)
 
Setting the value to a 3CX parameter is the way I would choose, because it's persisted even when services are restarted. Another possible way of sharing data between 2 calls is via static fields or properties in the C# code. This requires some programming knowledge. If you go this way, these variables will be reset when the Call Flow Server service is restarted. Just another option to consider.
 
Thank you both. I'll give it a try.
 
Just thought I would give an update on this. I was able to successfully use the get and set global property to do this. I created two call flow projects that both set a global property of OOO to 1 or 0. Then I have a third one that gets that value and loops routing to an extension vm if the condition is true.

I implemented it by uploading all three to 3CX. the two that set the property are triggered by dialing a code (the extension number assigned when its built). i then route incoming calls to the script that gets the value of the property and loops based on its value.

this seems to work well, but is there a way to assign a dial code like *81 or something to the script, rather than the extension number specified when its built? I tried giving it an extension number of *81 but it won't let me type anything but numbers in that box when I'm saving it.
 
Just thought I would give an update on this. I was able to successfully use the get and set global property to do this. I created two call flow projects that both set a global property of OOO to 1 or 0. Then I have a third one that gets that value and loops routing to an extension vm if the condition is true.

I implemented it by uploading all three to 3CX. the two that set the property are triggered by dialing a code (the extension number assigned when its built). i then route incoming calls to the script that gets the value of the property and loops based on its value.

this seems to work well, but is there a way to assign a dial code like *81 or something to the script, rather than the extension number specified when its built? I tried giving it an extension number of *81 but it won't let me type anything but numbers in that box when I'm saving it.
You can edit the manifest file inside the generated ZIP, and then edit the extension number to use that dial code instead.
 
Status
Not open for further replies.