cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
741
Views
0
Helpful
6
Replies

Recursive search of SX20 corporate phonebook

AndriesDormehl
Level 1
Level 1

Hi,

I noticed there is a 'Recursive' parameter one can set when searching the phonebook via the API. In the documentation it says that this parameter can only be used when searching the local phonebook.

Is there any reason this is the case and is there a trick to applying Recursiveness to a search of the corporate phonebook as well?

It would be a nice feature as I could populate a large array with one command rather than having to write a routine that has to crawl through each folder to pull out all the contacts contained.

Thanks,

Sam

6 Replies 6

Martin Koch
VIP Alumni
VIP Alumni

Hello Sam!

 

 

I never really looked into it but that seems to work for me:

 

 

xcom Phonebook Search Limit: "50" Offset: "0" SearchField: "Name" SearchString: "martin" FolderId: "" Recursive: "True" PhonebookType: "Corporate"

 

OK
*r PhonebookSearchResult ResultSet ResultInfo Offset: 0
*r PhonebookSearchResult ResultSet ResultInfo Limit: 50
*r PhonebookSearchResult ResultSet ResultInfo TotalRows: 16

*r ...

 

 

 

 

There is the developer forum for integrators, maybe thats a nice question there:

https://communities.cisco.com/community/developer/collaboration/telepresence

Please remember to rate helpful responses and identify

Hi Martin,

Thanks for your response.

I tried using the Recursive parameter on a corporate phonebook with folders at the root and unfortunately the result set only returned those root level folders and not everything (root and contacts inside folders) as recursive does with the local phonebook.

I'll post the same question on the developer forum.

Thanks for your help,

Sam

Hi Sam,

I tried Martin's search on the phonebooks we have here (multiple sub folders off the root as well as root entries) and it showed the results from all the subfolders.

xcom Phonebook Search Limit: "50" Offset: "0" SearchField: "Name" SearchString: "Adel" FolderId: "" Recursive: "True" PhonebookType: "Corporate"

OK
*r ResultSet ResultInfo Offset: 0
*r ResultSet ResultInfo Limit: 50
*r ResultSet ResultInfo TotalRows: 17
*r ResultSet Contact 1 Name: "Adelaide <removed>"
*r ResultSet Contact 1 ContactId: "s_1"
*r ResultSet Contact 1 ContactMethod 1 ContactMethodId: "1"
*r ResultSet Contact 1 ContactMethod 1 Number: "H323:<removed>"
*r ResultSet Contact 1 ContactMethod 1 Protocol: H323
*r ResultSet Contact 2 Name: "Adelaide <removed>"
*r ResultSet Contact 2 ContactId: "s_2"
*r ResultSet Contact 2 ContactMethod 1 ContactMethodId: "1"
*r ResultSet Contact 2 ContactMethod 1 Number: "H323:<removed>"
*r ResultSet Contact 2 ContactMethod 1 Protocol: H323
...
...
...
*r ResultSet Contact 17 Name: "Port Adelaide <removed>"
*r ResultSet Contact 17 ContactId: "s_17"
*r ResultSet Contact 17 ContactMethod 1 ContactMethodId: "1"
*r ResultSet Contact 17 ContactMethod 1 Number: "H323:<removed>"
*r ResultSet Contact 17 ContactMethod 1 Protocol: H323
** end

Note: the phonebook that it searches is the one that's published to the codec by TMS, and not "everything" that TMS has...  If I do the same search on a different device, with a different phonebook assigned to it - I get a different number of results.

Wayne
--
Please remember to rate responses and to mark your question as answered if appropriate.

Wayne

Please remember to mark helpful responses and to set your question as answered if appropriate.

Thanks for the response Wayne.

It seems to work in the way expected when searching for a particular searchstring however if I wanted to pull back every entry in the phonebook I would not need to specify a searchstring parameter i.e.

xcommand Phonebook Search Limit: "50" Offset: "0" FolderId: "" Recursive: "True" PhonebookType: "Corporate"

Notice I've removed the searchString and searchField parameters as I want to extract the entire phonebook at once.

If using the above command for the local phonebook it would return the entire phonebook but doing the same with the corporate phonebook only returns the contacts and folders at the root.

I'm not sure what you'd want to grab the whole thing via the codec... paerhaps you can explain your usage scenario to us to give us a better understanding of what you're trying to achieve.

You may be able to achieve a similar result through different means - ie, have you considered a phonebook export/extract out of TMS rather than from the endpoint?

Wayne
--
Please remember to rate responses and to mark your question as answered if appropriate.

Wayne

Please remember to mark helpful responses and to set your question as answered if appropriate.

I'm trying to improve my parsing and phonebook display on an AMX system. Currently I only pull down the current page/folder that is being navigated in. E.g. they press folder x and then I pull down folder x and display it.

It can sometimes be slow to parse this data when selecting a folder with a large number of contacts and this is noticeable when the user presses a folder in real time.

My idea to improve this would be to pull down the entire directory once a day and avoid the parsing delay issues. I understand that I could extract this data out of TMS (although I have not tried it or am not familiar with it), but what if the codec in question only contains a subset of the full corporate directory?

Getting back to my original question though, it seems as though the recursive parameter is not quite working as advertised for the corporate directory. Can you confirm this?

Sam