Username/primary extension query

Version 1
    This document was generated from CDN thread

    Created by: James Milne on 27-06-2011 03:50:53 PM
    Hey guys, I just need somehow to query and return all usernames and their extensions. How would i go about this?

    Subject: RE: Username/primary extension query
    Replied by: RICO HESSELLUND on 28-06-2011 03:39:58 AM
    What exactly do you mean.

    find all enduser's
    for each enduser find the assoicated phone(s)
    for each phone find the line(s)
    for each line find the directory number.

    i would do this with executesqlquery

    you need to read the database dictonary for callmanager.

    the tables you need to look at is


    there must be a table more connecting endusers to devices, i havent looked for that one.

    devicenumplanmap.fkdevice points to device.pkid
    devicenumplanmap.fknumplan points to numplan.pkid is mac address (the one you associate to your users)
    numplan.dnorpatten is your directory number.

    test your query with run sql from the command prompt on the callmanager or in the axl toolkit.

    When you have this working, i can help you do this via soap. (in php)

    // Rico