02-05-2020 04:26 AM
Hi All,
Does anyone know a way or point me in the right direction to achieve the following please:
Internal Call comes into UCCX IVR for a helpdesk and the Caller CLI is presented in E164 format
I would like to do a lookup in CUCM (or AD) using an API call from UCCX to extract the userid associated with the phone number.
Then populate end user info into fields that can be used within the script
Sounds possible to me but I am new to Developer stuff.
Thanks!
02-05-2020 08:10 AM
You would certainly want to explore the CUCM AXL API for querying/retrieving CUCM data: https://developer.cisco.com/site/axl/, if needed.
However, the initial consideration would be how is the incoming caller ID associated to the user, precisely, and in which system (CUCM/AD) is that relationship stored? For example, it could simply be an E164 string in AD, it could be a CUCM DN associated to a phone device associated to a user, it could be a DN associated directly to a user via 'primary line' in CUCM, etc.
If the 'source of truth' is AD, I would suggest using AD APIs to query/retrieve the data. If it's in CUCM via some line/user/field then we can further help recommend the AXL query to use...
02-06-2020 01:38 AM
Thanks for the swift response!
The source of truth is AD which populates the telephone Number field in CUCM via the ipPhone field in AD. I want to cross reference the telephone number and retrieve the associated userid (SAMAccountName), Firstname, Lastname and MailID.
So do you think that querying AD would be the best option via a UCCX Script?
I found some info on running an SQL Query via AXL on CUCM which might work.
Thanks
02-06-2020 02:57 AM
Do you have any AXL Experience?
Do you have any SQL Experience?
Well it would be easy to query your CUCM and "ask" which user has the following DN.
In the CUCM User Information is the Phone Number like in the format the calling Number is presented?
If yes you could just do the following:
select userid from enduser where telephonenumber = incoming_dn
You can try this and see the result if you login to CUCM CLI and run
run sql select userid from enduser where telephonenumber = incoming_dn
The "Problem" is who and how you add the AXL part to your Scipt
02-06-2020 11:07 AM
Good info, though keep in mind that this query likely involves a full, unindexed table scan of the user table in the CUCM DB, and may have a bigger performance impact than you might expect - would be worth some testing.
If using Python, some samples here can help with executing a SQL query via AXL: https://github.com/CiscoDevNet/axl-python-zeep-samples
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide