Call flow script - run on a DN number range

David Cureton

Customer
Joined
Jul 10, 2026
Messages
3
Reaction score
1
I would like to have a call flow script run in a DN range such as 400-499, the script would look at the DN say "423" and look up the mobile number alias of the user at extention 123.

This would allow me to have a direct dial extension that directly forward to the users mobile if it exists. However it appears I can only associsate a script to a single number not a number range.

Any thought on how to achieve this without have 100 duplicates of the same script on each virtual extention?
 
There's no way to register the script on multiple extension numbers unfortunately, you will need to duplicate it. If you have hundreds of extensions then this will be a problem.

Another option would be having a single script built with a CFD app that will ask for the number via DTMF. Then for example you call 400, the CFD app answers, and you enter 123 via DTMF, and then the CFD app can do the lookup of the mobile for extension 123, and transfer the call to that number. Not as easy as a BLF key, but not that hard either.
 
There's no way to register the script on multiple extension numbers unfortunately, you will need to duplicate it. If you have hundreds of extensions then this will be a problem.

Another option would be having a single script built with a CFD app that will ask for the number via DTMF. Then for example you call 400, the CFD app answers, and you enter 123 via DTMF, and then the CFD app can do the lookup of the mobile for extension 123, and transfer the call to that number. Not as easy as a BLF key, but not that hard either.
Thanks Ernesto, appreciate the helpful feedback.

Best regards, David
 
Indeed, it isn’t possible to assign multiple dial codes to the same CallScript. Creating 100 copies of the same CallFlow can quickly become confusing, especially when you need to roll out a fix.

One possible workaround is to create a second CallFlow with a dial code outside the specified range and use it as a “duplicator.”

Take a look at the attached example. Update the values on lines 63, 64, and 65, call the duplicator CallFlow , (Only for Call Flow duplication) and stay on the line until the call ends. It’ll automatically create the duplicates within the specified range.

I’ve also added a DUPLICATE_OF property to handle future updates without overwriting unrelated CallFlows. If you update the original source code and call the duplicator again, the changes will be propagated only to the CallFlows created from that source.
The range values are strings, so dial codes containing * are supported as well. However, both range values must end in a digit.

A CallFlow that duplicates another CallFlow… a little unusual, but it works, haha!

Call Script : https://www.3cx.com/docs/call-api-linux/
 

Attachments

Nice trick. Also now with the new MCP server functionality in Update 10, you can ask your AI client to do this for you, just say it :-)
 

Forum statistics

Threads
111,899
Messages
589,624
Members
164,765
Latest member
domi