Get Userid for Primary Extension

Version 1
    This document was generated from CDN thread

    Created by: Kamran Khan on 25-11-2013 06:46:24 AM
    Hi all,

    I am trying to get the find the userid that matches a "Primary Extension" that i provide. I dont think "GetUserRes" would do this because we have to provide a uuid or userid?

    Any idea what Soap request to use for this?

    Thanks,
    Kamran

    Subject: RE: Get Userid for Primary Extension
    Replied by: Kamran Khan on 26-11-2013 08:07:03 AM
    Kamran Khan:
    Hi all,

    I am trying to get the find the userid that matches a "Primary Extension" that i provide. I dont think "GetUserRes" would do this because we have to provide a uuid or userid?

    Any idea what Soap request to use for this?

    Thanks,
    Kamran

    Any advice would be much appreciated!

    Subject: RE: Get Userid for Primary Extension
    Replied by: Thomas Ellis on 27-11-2013 10:03:35 AM
    Kamran,
    what are you providing as "Primary Extension"? 

    Subject: RE: Get Userid for Primary Extension
    Replied by: Kamran Khan on 28-11-2013 12:44:53 PM
    That will be the DN configured for the End User and selected as "Primary Extension" under the End User configuration page.

    Subject: RE: Get Userid for Primary Extension
    Replied by: Thomas Ellis on 04-12-2013 10:39:07 AM
    Hi Kamran,
    you should be able to use the executeSQLQuery method and issue the following query to that method:

    SELECT userid FROM enduser WHERE telephonenumber = 'primaryextension'

    Just replace the 'primaryextension' with the actual extension you are looking for (but keep it in single quotes).  Let me know if that works for you.