cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1558
Views
10
Helpful
4
Replies

Extracting Pickup group members using AXL and python

Shesh
Level 1
Level 1

I am trying to extract members of pick up group using python and AXL API. However I can't locate the exact call that can provide the list. "getCallPickupGroup" is returning blank members, even when members are present in that pick up group.

 

Any advice, on which call should I be using?

 

Thanks in advance.

 

I am using CUCM 11.5 (Schema Ref :https://developer.cisco.com/docs/axl/#!archived-references)

1 Accepted Solution

Accepted Solutions

dstaudt
Cisco Employee
Cisco Employee

I believe in order to get this 'reverse' view of DNs to pickup groups (where the 'forward' view is 'what pickup group does this specific line belong to') efficiently you will need to use <executeSqlQuery> to join some CUCM tables, e.g.:

SQL:

select numplan.dnorpattern from numplan, pickupgrouplinemap, pickupgroup where
    numplan.pkid = pickupgrouplinemap.fknumplan_line and
    pickupgrouplinemap.fkpickupgroup = pickupgroup.pkid and
    pickupgroup.name = "testCallPickupGroup"

I've added a sample script demonstrating this in Python to the repo here: https://github.com/CiscoDevNet/axl-python-zeep-samples

View solution in original post

4 Replies 4

dstaudt
Cisco Employee
Cisco Employee

I believe in order to get this 'reverse' view of DNs to pickup groups (where the 'forward' view is 'what pickup group does this specific line belong to') efficiently you will need to use <executeSqlQuery> to join some CUCM tables, e.g.:

SQL:

select numplan.dnorpattern from numplan, pickupgrouplinemap, pickupgroup where
    numplan.pkid = pickupgrouplinemap.fknumplan_line and
    pickupgrouplinemap.fkpickupgroup = pickupgroup.pkid and
    pickupgroup.name = "testCallPickupGroup"

I've added a sample script demonstrating this in Python to the repo here: https://github.com/CiscoDevNet/axl-python-zeep-samples

Hi dstaudt,

 

Thank you for replying and the script. I haven't yet implemented the script but will update here once I do.

 

The script uses SQL, which I am sure will work fine.

However I was wondering if any of the AXL functions can do this? as in the "get****" or "list****" ones.

 

Thanks again.

dstaudt
Cisco Employee
Cisco Employee

Unfortunately AXL requests don't always offer the exact view need of the data...in this case, the only way to use regular AXL requests would be to perform <getLine> on each DN in the system to compile which DNs belong to which pickup groups, then aggregate the data and report.  The SQL options allows complete freedom ti query the data any way you need, but comes with a steeper learning curve (understanding the database tables/fields and relationships) and a small risk of backward-compatibility impact (the underlying DB schema could theoretically be changed on any release, though this is exceedingly rare in practice...)

This solved my problem...thanks.