[CFD] V20 Script logic: Toggle Forwarding status and update Mobile Number via DTMF

TitanSurtur

Gold Partner
Basic Certified
Joined
Apr 10, 2025
Messages
2
Reaction score
0
Hi everyone,

I am looking for assistance in creating a Call Flow Designer script for a 3CX V20 installation.

The Goal: I need a script that allows a specific user (Ext 160) to toggle call forwarding via a BLF key.

The Logic:

Check Status: The script checks if the extension is currently "Available" or "Away".

If Available (Enable Forwarding):

Prompt user to enter a phone number via DTMF.

Validate the input.

Requirement: The script needs to programmatically update the extension's "Mobile Number" property with the user input AND switch the profile to "Away".

If Away (Disable Forwarding):

Prompt user to confirm disabling.

Requirement: Switch profile back to "Available" and clear the "Mobile Number" field.

My Question: Could someone provide the correct C# code snippet (compatible with V20 API) to update an extension's Mobile Number and current Profile? I want to ensure I am using the correct methods to modify the DN properties and save them properly.

Thanks in advance for your help!
 
Could someone provide the correct C# code snippet (compatible with V20 API) to update an extension's Mobile Number and current Profile?
No need for that. This can be done with CFD standard code blocks.
Change the mobile number for the extension with the CFD code block Set DN Property, Extension (the number) as string, the Property Name "MOBILENUMBER" (even a string) and your mobile number as Property Value as string in quotation marks.
Change the extension status with the CFD code block Set Extension Status.
1770896264538.png

1770896302331.png
 
OK thank you.
This is my first CFD and I'm a little bit confused with the software.

Can you help me to configure the script with what I need ?
 
Your logic requires the CFD code blocks GetExtensionStatus, CreateCondition, UserInput or PromptPlayback (with DTMF input, your choice; you can try both yourself), SetDNProperty and SetExtensionStatus. All of this in the correct combination with the correct parameters and it will work.

Validate the input.
The question is: how do you imagine that? What's supposed to happen there?

Instructions for the CFD are available within the program itself. Just click on Help or the F1 key in any dialog box. That will take you to the right help section. There's no need to include all the links here.
The basic operation of the CFD is intuitive - otherwise: there are also 3CX YT videos about ;)

The most important thing is: you need a plan and your first plan already looks good.
 

Members Online Now

Forum statistics

Threads
111,834
Messages
589,287
Members
164,662
Latest member
DejanMDS