[CUCM 8.1] Next available phone number

Version 1
    This document was generated from CDN thread

    Created by: Derick Cassidy on 12-02-2013 02:10:13 AM
    Hello

    We are automating the provisioning of our infrastructure by using AXL. We'd like to know if its possible to get a list of available phone numbers to assign to a user, or, is it possible to have the AXL/CUCM service auto assign the next available number?

    If its possible to auto assign, is there a policy setting that indicates that numbers should be placed on hold for a certain amount of time before being reassigned?

    Thanks,
    D.

    Subject: RE: [CUCM 8.1] Next available phone number
    Replied by: Michael Piskun on 12-02-2013 04:00:42 PM
    Hi Derick,
     
    Unfortunately, CallManager has no concept of determining the DID number ranges you have available. I have built a similar application, however, using PHP, MySQL and a couple weeks of sleepless nights.
     
    Depending on what application or language you are using for your provisioning engine, I have found the best way is to store those DID ranges in your application, and import the currently used number range from the CallManager. With these two peices of data, you can determine 'Available' and 'Assigned' ranges, and assign new numbers accurately.
     
    A query like the following, for example, can be used to determine already used numbers within a given number range, and provide some info on who it is assigned to, if you care to know.
     
    run sql SELECT dnorpattern,description FROM numplan WHERE dnorpattern BETWEEN 60600 AND 60699
     
    From here, you can determine your available numbers. Additionally to this, if your application does provisioning, you should be able to build in some sort of reservarvation or hold policy, as you have described.
     
    If you need more information in the query, such as assigned device(s), etc, you can build the SQL query alot furthe with JOINs to the device and devicenumplanmap tables.
     
    Good luck!
     
    Regards,
    Michael