03-27-2014 05:11 AM - edited 03-18-2019 02:48 AM
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
03-27-2014 12:50 PM
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
05-06-2014 05:50 PM
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
05-06-2014 10:28 PM
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.
Please remember to mark helpful responses and to set your question as answered if appropriate.
05-07-2014 12:03 AM
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.
05-14-2014 07:29 PM
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.
Please remember to mark helpful responses and to set your question as answered if appropriate.
06-05-2014 04:56 PM
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
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