Template: {if} {else} {endif} based on %%pbx_ip%?

Status
Not open for further replies.

421

Joined
Jan 30, 2013
Messages
1
Reaction score
0
Hello,
I want to make some "if then else"-templates based on the pbx_ip variable.
Is it possible to use something like:
{IF %%bpx_ip%%=1.2.3.4}
...
{ELSE}
...
{ENDIF}
?

I tried with %%, %, without %% but the resulting CFG is not right, the {...}-statements are literally placed into the provisioning file. So 3CX is not parsing the {if else}-tags.

Any ideas?
Best regards,
Boris.
 
My take is that the template is a configuration file that is only applying a variable to a field attribute. You have to implicitly state the condition you want the attribute to assume as the phone does not have the ability to determine anything on its own relative to its configuration other than perhaps if the config file is applicable to its make/model.

It is not a question of 3CX parsing the file. 3CX merely populates the variables in the template upon extension set-up and provisioning. There is no execution of a template file as in a program. It simply passes the field attributes into the template and ten to the applicable phone so that the phone will function in the environment it was programmed to be.
 
Status
Not open for further replies.

Members Online Now

Forum statistics

Threads
111,835
Messages
589,289
Members
164,667
Latest member
Infinity Network