Dear folks,
I wish to implement a custom call flow condition in FreePBX, where I can use an Asterisk expression.
For example, depending on the channel language set, I want the call to be directed to a different extension.
Note that I’m not talking about incoming calls, but anywhere in a call flow.
For example, after an IVR, if the user presses 1, I want to evaluate whether the caller ID matches something. Then, if it does, I want a different destination than if it didn’t.
I want to have a single IVR for multiple languages (using custom recordings in the subfolder of the language). The user gets here via caller ID. Then, it should say “For Spanish, please press 1” (in Spanish), or “For English, please press 1” if the language is incorrect.
Now I need a custom condition. Upon star, if the language was English, switch to Spanish. If the language was Spanish, switch to English.
How could I implement a custom condition like that in FreePBX?
Or would I have to go to one of the _custom files, and if so, which one?