tag:blogger.com,1999:blog-4318225933209246694.post3059165845231469842..comments2023-10-14T17:34:24.867+08:00Comments on PandaeatsBamboo: Shell script to update device user association in batchAnonymoushttp://www.blogger.com/profile/18050357045948600527noreply@blogger.comBlogger13125tag:blogger.com,1999:blog-4318225933209246694.post-25422999975326928822015-07-02T05:20:35.699+08:002015-07-02T05:20:35.699+08:00So would there be a way to associate the device wi...So would there be a way to associate the device with the user and line to user this way also?<br /><br />Thanks,Anonymoushttps://www.blogger.com/profile/06115996746046208162noreply@blogger.comtag:blogger.com,1999:blog-4318225933209246694.post-88203574763468005242015-07-02T05:20:19.731+08:002015-07-02T05:20:19.731+08:00So would there be a way to associate the device wi...So would there be a way to associate the device with the user and line to user this way also?<br /><br />Thanks,Anonymoushttps://www.blogger.com/profile/06115996746046208162noreply@blogger.comtag:blogger.com,1999:blog-4318225933209246694.post-58217131506116255372015-04-08T00:44:58.737+08:002015-04-08T00:44:58.737+08:00I use a very similar approach. Unless you want to...I use a very similar approach. Unless you want to keep the xml files for reference you can try running the XML as a variable. I know its saved me a lot of trouble with tmp files.<br /><br />XML="<br /><br /> <br /> <br /> <br /><br />update Device set fkenduser = ( select pkid from EndUser where userid = \"$username\") where name = \"$devicename\"<br /><br /> <br /> <br /><br />"<br /><br /> curl -k -u administrator:ccievoice -H "Content-type: text/xml;" -H "SOAPAction: CUCM:DB ver=8.5" -d "$XML" https://10.1.90.11:8443/axl/<br /> <br /><br />For Device Association you can also run the other way to associate Devices with Enduser for JabberJonhttp://mycollablab.orgnoreply@blogger.comtag:blogger.com,1999:blog-4318225933209246694.post-78143265354677122962015-02-22T04:16:29.915+08:002015-02-22T04:16:29.915+08:00I was unable to get the script working. I am new t...I was unable to get the script working. I am new to shell scripts. I received an alert the a few issues occurred. <br /><br />\r was missing<br />EOF was missing <br /><br />Please helpAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-4318225933209246694.post-85416078328500359952014-05-12T00:32:07.302+08:002014-05-12T00:32:07.302+08:00Instead of using the UpdatePhone object, my way is...Instead of using the UpdatePhone object, my way is to use SQL statement directly. I can't compare them as I haven't tried his way before, but for me I am more comfortable to use SQL statement directly as I know better what the end result should be, comparing with using a AXL method provided which abstract what it will do. My 2 cents.Danny Wonghttps://www.blogger.com/profile/07139938198363212021noreply@blogger.comtag:blogger.com,1999:blog-4318225933209246694.post-15166155224174875182014-05-11T23:08:16.477+08:002014-05-11T23:08:16.477+08:00I'm very fresh to AXL but I saw over at the Ci...I'm very fresh to AXL but I saw over at the Cisco Dev community someone was trying to accomplish the same thing:<br /><br />https://communities.cisco.com/docs/DOC-49071<br /><br />It looks like he did it through a more complicated method and ran into some issues. Are you able to comment on this (I apologise for my ignorance).Tim Tnoreply@blogger.comtag:blogger.com,1999:blog-4318225933209246694.post-2216947778301976892014-05-11T22:58:37.581+08:002014-05-11T22:58:37.581+08:00I only tested it in lab and my friend did run it i...I only tested it in lab and my friend did run it in his production environment with a couple thousands of phone and it works OK. Good luckDanny Wonghttps://www.blogger.com/profile/07139938198363212021noreply@blogger.comtag:blogger.com,1999:blog-4318225933209246694.post-15427125240018350982014-05-11T18:10:10.903+08:002014-05-11T18:10:10.903+08:00Tim Bassett, how did you go with running this on a...Tim Bassett, how did you go with running this on all the phones? We're in a similar situation but have 7000 phones to update. I gave this a test on our test/dev CUCM with only a few phones and it worked great. I wanted to know if you ran into any issues when scaled up to the thousands.Tim Tnoreply@blogger.comtag:blogger.com,1999:blog-4318225933209246694.post-63315583309682833342014-03-25T12:57:24.824+08:002014-03-25T12:57:24.824+08:00Good luck manGood luck manDanny Wonghttps://www.blogger.com/profile/07139938198363212021noreply@blogger.comtag:blogger.com,1999:blog-4318225933209246694.post-636275550215520902014-03-24T23:35:02.784+08:002014-03-24T23:35:02.784+08:00Just ran a test and this looks like it works great...Just ran a test and this looks like it works great. Will be running it to update ~3500 users tonight. Thanks, you saved me a ton of time!!!<br /><br />Anonymoushttps://www.blogger.com/profile/16710851230084617338noreply@blogger.comtag:blogger.com,1999:blog-4318225933209246694.post-83051767820494576722014-01-10T22:38:48.994+08:002014-01-10T22:38:48.994+08:00Thanks Kevin, useful one.Thanks Kevin, useful one.Danny Wonghttps://www.blogger.com/profile/07139938198363212021noreply@blogger.comtag:blogger.com,1999:blog-4318225933209246694.post-69273602854254333302014-01-07T17:32:58.637+08:002014-01-07T17:32:58.637+08:00Hi Danny,
You can ignore my last reaction, I just...Hi Danny,<br /><br />You can ignore my last reaction, I just scrolled down your blog and obviously I missed the previous post you made about using the SQL statement with extension mobility. My bad!! <br /><br />KevinAnonymoushttps://www.blogger.com/profile/08637804656821837536noreply@blogger.comtag:blogger.com,1999:blog-4318225933209246694.post-4807596058071797352014-01-07T17:31:19.678+08:002014-01-07T17:31:19.678+08:00Hi Danny,
Thanks, that can come in handy.
Just ...Hi Danny,<br /><br />Thanks, that can come in handy. <br /><br />Just to let you know there is an even easier way if you are using extension mobility. If so you can use the following SQL statement from CLI to set the owner ID to correspond to the user ID that is logged in at the phone.<br /><br />run sql update device set fkenduser=(select fkenduser from extensionmobilitydynamic where fkdevice=device.pkid) where name like 'SEP%' and fkenduser IS NULL<br /><br />Kind Regards,<br />KevinAnonymoushttps://www.blogger.com/profile/08637804656821837536noreply@blogger.com