• V20: 3CX Re-engineered. Get V20 for increased security, better call management, a new admin console and Windows softphone. Learn More.

Provisioning template variables, is this possible?

Status
Not open for further replies.

efounco

Joined
Sep 28, 2011
Messages
139
Reaction score
6
OK, bare with me as this will be hard to explain...

What I'm trying to do is provision each and every phone in our company to utilize 2 separate extensions. However, Instead of creating a custom template for each and every phone, I would like to create a single template for all the phones and somehow utilize/modify the built in 3CX variables to populate the second extension.

For example, all the the phones/extensions are setup accordingly:

Phone 1
[E1] 112
[E2] 212

Phone 2
[E1] 119
[E2] 219

In the provisioning template, extension 1 is dynamically populated by this entry:
<Auth_ID_1_ group="Ext_1/Subscriber_Information">%%extension_auth_id%%</Auth_ID_1_>

Ideally, I would like modify the %%extension_auth_id%% variable to somehow use it for extension 2 also.

i.e.
<Auth_ID_2_ group="Ext_2/Subscriber_Information">(%%extension_auth_id%%)+100</Auth_ID_2_>
or
<Auth_ID_2_ group="Ext_2/Subscriber_Information">1 & RIGHT(2,%%extension_auth_id%%)</Auth_ID_2_>

Is it possible?

I'm not familiar with the 3CX scripting language, so I have no idea if it can handle basic mathematical functions or not.
 
OK, if I add a numeric value before the variable, it sorta' works.

<Auth_ID_2_ group="Ext_2/Subscriber_Information">1%%extension_number%%</Auth_ID_2_>

returns

[E1] 112
[E2] 1112

Unfortunately, because the 3CX phone system is limited to static amount of digits (3 or 4, etc.), it will not let me add 3 or 4 digit extensions at will. You must modify the custom parameters and making a bunch of changes to the system extensions before you can add either/or. This is a total PITA and not going to work for adding/removing extensions, so, I'm back to modifying the variable instead.

BTW, if you accidentally modify the ENL (Extension Number Length) setting to be blank (or null), it will crash the entire 3CX phone system. You will be unable to add or change ANY extensions or make ANY changes to the 3CX system without recovering from a backup where this value is not blank (or null).
 
You can post new (or vote for existing) idea to force 3CX to remove strict definition of the internal dial plan.

Thanks
 
If I were to submit and idea, it would just get lost in the 1000+ others. :)

Ideally, it WOULD be nice to have the ability to assign multiple extensions per phone, but in reality, I know this will never happen. I'm just trying to craft a workaround for this limitation...
 
You could borrow a variable from the BLF provisioning area. For example, configure BLF 50 to be a speed dial with the desired second extension number. (Assuming BLF 50 is beyond the range you would use on your phones.) Then use %%blf50%% in your template as follows:

<Auth_ID_2_ group="Ext_2/Subscriber_Information">%%blf50%%</Auth_ID_2_>

You could even use an if statement to conditionally provision the second line only if there is a value in blf50.

# BLF 50 is special placeholder for line 2 provisioning
{IF blf50}
<Auth_ID_2_ group="Ext_2/Subscriber_Information">%%blf50%%</Auth_ID_2_>
{ENDIF}

I hope that helps.
Paul
 
Haha, that's a pretty creative solution Paul. However, I think I will just write a little script that monitors provisioning folder and applies changes to to the .xml automatically. That seems to be the only feasible way of doing this...
 
I like your scripting idea. With that approach you can do anything you want.

Nice.
 
Status
Not open for further replies.

Getting Started - Admin

Latest Posts

Forum statistics

Threads
141,605
Messages
748,774
Members
144,717
Latest member
sprice352
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.