Provisioning template variables, is this possible?

User to User - Answers are provided by the community. 3CX does NOT provide technical support via this forum. Commercial grade support should NOT be expected

Moderators: kevin, 3CX staff

Provisioning template variables, is this possible?

Postby efounco » Tue Jan 31, 2012 6:30 pm

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.
Last edited by efounco on Tue Jan 31, 2012 7:02 pm, edited 3 times in total.
efounco
Expert
Expert
 
Posts: 122
Joined: Wed Sep 28, 2011 3:37 pm

Re: Provisioning template variables, is this possible?

Postby efounco » Tue Jan 31, 2012 6:51 pm

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).
efounco
Expert
Expert
 
Posts: 122
Joined: Wed Sep 28, 2011 3:37 pm

Re: Provisioning template variables, is this possible?

Postby SY » Tue Jan 31, 2012 8:34 pm

You can post new (or vote for existing) idea to force 3CX to remove strict definition of the internal dial plan.

Thanks
Stepan
3CX Development Team

3CX News, Tips and How to's at http://www.3cx.com/blog/
Very useful links are listed on http://www.3cx.com/support/index.html
SY
3CX Support
3CX Support
 
Posts: 2363
Joined: Fri Jan 26, 2007 2:14 pm

Re: Provisioning template variables, is this possible?

Postby efounco » Wed Feb 01, 2012 12:33 am

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...
efounco
Expert
Expert
 
Posts: 122
Joined: Wed Sep 28, 2011 3:37 pm

Re: Provisioning template variables, is this possible?

Postby paul1 » Wed Feb 01, 2012 5:34 am

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
paul1
Specialist
Specialist
 
Posts: 71
Joined: Thu Jan 14, 2010 6:17 am

Re: Provisioning template variables, is this possible?

Postby efounco » Wed Feb 01, 2012 5:33 pm

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...
efounco
Expert
Expert
 
Posts: 122
Joined: Wed Sep 28, 2011 3:37 pm

Re: Provisioning template variables, is this possible?

Postby paul1 » Wed Feb 01, 2012 10:32 pm

I like your scripting idea. With that approach you can do anything you want.

Nice.
paul1
Specialist
Specialist
 
Posts: 71
Joined: Thu Jan 14, 2010 6:17 am


Return to 3CX Phone System - General (Community-led, no tech support)


Who is online

Users browsing this forum: No registered users and 0 guests

Announcements: