Dismiss Notice
We would like to remind you that we’re updating our login process for all 3CX forums whereby you will be able to login with the same credentials you use for the Partner or Customer Portal. Click here to read more.

Provisioning template variables, is this possible?

Discussion in '3CX Phone System - General' started by efounco, Jan 31, 2012.

Thread Status:
Not open for further replies.
  1. efounco

    efounco New Member

    Joined:
    Sep 28, 2011
    Messages:
    148
    Likes Received:
    4
    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.
     
  2. efounco

    efounco New Member

    Joined:
    Sep 28, 2011
    Messages:
    148
    Likes Received:
    4
    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).
     
  3. SY

    SY Well-Known Member
    3CX Support

    Joined:
    Jan 26, 2007
    Messages:
    1,825
    Likes Received:
    2
    You can post new (or vote for existing) idea to force 3CX to remove strict definition of the internal dial plan.

    Thanks
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. efounco

    efounco New Member

    Joined:
    Sep 28, 2011
    Messages:
    148
    Likes Received:
    4
    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...
     
  5. paul1

    Joined:
    Jan 14, 2010
    Messages:
    80
    Likes Received:
    0
    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
     
  6. efounco

    efounco New Member

    Joined:
    Sep 28, 2011
    Messages:
    148
    Likes Received:
    4
    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...
     
  7. paul1

    Joined:
    Jan 14, 2010
    Messages:
    80
    Likes Received:
    0
    I like your scripting idea. With that approach you can do anything you want.

    Nice.
     
Thread Status:
Not open for further replies.