AnsweredAssumed Answered

Using the clish for setting the Local Directory on LifeSize Icons

Question asked by on Jul 20, 2015
Latest reply on Jul 23, 2015 by srankin



Our first post in this community will be a question..


For easy use we want to automate the setting of all the Local Directory entries on our LifeSize Icon 400 en 600 systems. To do so we write the next the script:





echo "

Take care that resty and jq are installed:





if [ $# -ne 2 ]; then

        echo -e `basename $0`" IPADDRESS ADMIN_PASS\n"




. resty


resty "https://$1/rest/" -u admin:"$2" -k || {

        echo "Error connecting to icon rest interface"

        exit 1



RESULT=$(PUT /new) || {

        echo "Error getting new session"

        exit 1



# Parse out the session id

session=$(echo "${RESULT}" | jq -e -r .session 2> /dev/null ) || {

        echo "Error retrieving session number."

  exit 1



#Removing all entries in the local directory

echo "Remving all entires in the local directory of the LifeSize system on ip address "$IPADDRESS

RESULT=$(PUT /request/"${session}" '{ "call": "Local_Directory_clearAllEntries" }') || {

        echo "Error removing all entries in the local directory"

        exit 1



echo "


Now login into the shell of this LifeSize Icon system using:


# ssh admin@$1


Using password: $2


After successful login change into the 'clish' command to enter the “legacy command line interface shell”:


rbsh> clish



Now we can add the initial items to the local directory executing the following commands, using copy and past:


set local entry '{ \"firstname\":\"**\", \"lastname\":\"Mediaroom\", \"number\":\"\", \"system\":\"** mediaroom\", \"protocol\":\"h323\", \"type\":\"video\" }'

set local entry '{ \"firstname\":\"**\", \"lastname\":\"Big meetingroom\", \"number\":\"\", \"system\":\"** big meetingroom\", \"protocol\":\"h323\", \"type\":\"video\" }'

set local entry '{ \"firstname\":\"Jack\", \"lastname\":\"One\", \"number\":\"\", \"system\":\"** room Jack\", \"protocol\":\"h323\", \"type\":\"video\" }'

set local entry '{ \"firstname\":\"Bruce\", \"lastname\":\"Two\", \"number\":\"\", \"system\":\"** room Bruce\", \"protocol\":\"h323\", \"type\":\"video\" }'

set local entry '{ \"firstname\":\"RO A\", \"lastname\":\"Boardroom\", \"number\":\"\", \"system\":\"RO A boardroom\", \"protocol\":\"h323\", \"type\":\"video\" }'

set local entry '{ \"firstname\":\"RO B\", \"lastname\":\"Boardroom\", \"number\":\"\", \"system\":\"RO B boardroom\", \"protocol\":\"h323\", \"type\":\"video\" }'

set local entry '{ \"firstname\":\"LO C", \"lastname\":\"Boardroom\", \"number\":\"\", \"system\":\"LO C boardroom\", \"protocol\":\"h323\", \"type\":\"video\" }'

set local entry '{ \"firstname\":\"RO D\", \"lastname\":\"Boardroom\", \"number\":\"\", \"system\":\"RO D boardroom\", \"protocol\":\"h323\", \"type\":\"video\" }'

set local entry '{ \"firstname\":\"RO E", \"lastname\":\"Boardroom\", \"number\":\"\", \"system\":\"RO E boardroom\", \"protocol\":\"h323\", \"type\":\"video\" }'

set local entry '{ \"firstname\":\"RO F", \"lastname\":\"Boardroom\", \"number\":\"\", \"system\":\"RO F boardroom\", \"protocol\":\"h323\", \"type\":\"video\" }'



But this script doesn't deliver the expected result. Because the call "Local_Directory_clearAllEntries" deletes all previous items from the local directory because although the "set local entry" calls do not add the new entries, although they did before the "Local_Directory_clearAllEntries" call..




1. what do you think of this method?

2. does anybody have an idea what is causing this problem?




Ferry Bodijn

Hivos, The Netherlands