Administration XML Developer Forums

« Back to Administration XML Questions

Script to Auto Associate and Disassociate IP Phones CM User

Combination View Flat View Tree View
Threads [ Previous | Next ]
Hi There
 
Is there a script that someone can share that allows us to automatically associate a bunch of IP Phones to a CUCM Application user and also allows to deassociate them?
 
Input to the Script = List of IP Phone MAC addresses
Associate/Disassociate Buttons
 
Regards
Deepak

The HTTP request to AXL would use the <updateAppUser> request:
 
POST https://10.88.131.141:8443/axl/ HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "CUCMemoticonB ver=8.0 updateAppUser"
User-Agent: Jakarta Commons-HttpClient/3.1
Content-Length: 449
Authorization: Basic QWRtaW5pc3RyYXRvcjpjaXNjbyExMjM=
Host: 10.88.131.141:8443
 
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/8.0">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:updateAppUser sequence="1">
         <userid>testAppUser</userid>
         <associatedDevices>
            <!--Zero or more repetitions:-->
            <device>SEP123456789012</device>
         </associatedDevices>
      </ns:updateAppUser>
   </soapenv:Body>
</soapenv:Envelope>
 
Note that the <associatedDevices> list must be complete - i.e. the entire list of devices for the user will be replaced by this list.

Hi David

Thanks much for the quick response.

Kindly excuse my ignorance. You wrote:
Note that the <associatedDevices> list must be complete - i.e. the entire list of devices for the user will be replaced by this list.

There are currently 1700 phones associated with the AppUser - if I want to remove 5 phones from the device association then do I have to send over just those 5 phones in the above request or do I have to send a list of all 1695 phones?

Regards
Deepak

Hy Deepak,

all the phones which should be associated with the appuser had to be within this update request.
All phone not in the request will be deassociated by the callmanger. You could trace this behaviour
on the RTMT in the Axl Log. If you put it to debug Level you can see what is done ob the cucm on
sql level if u to some request.

cheers Floh

Thanks for the clarification Florian
Thanks David for the example.

I will give it a shot and revert if there are further questions.

Cheers!
DG