Mobility API for Cisco Call Manager
For a project, I’m doing a bunch of integration with Cisco’s Call Manager and automatic remapping of handsets. It’s a pretty simple process really, except for one fact: Cisco’s documentation on this sucks. It’s also a rather broken approach. Since others might run into this, I thought I’d post a summary of what actually works.
First, you need the following bits of information:
- Device name (e.g., the handset name like
SEP00175A52EE7C) - Mobility manager user ID and password
- Target user
- Target profile (optional)
One of the catches is that, at least in the v4.2 documentation for the release I’m working with, Cisco sometimes says password, sometimes PIN and even calls it a certificate in places. This is confusing if you don’t know that it needs to actually be a password.
So let’s say you want to remotely login a handset (
SEP00175A52EE7C) for a user (JDOE) with a profile (JDOEMOBILE). You’d need to create an XML tree that looks like this:<request> <appinfo> <appid>MobilityManagerUser</appid> <appcertificate>supersquirrel</appcertificate> </appinfo> <login> <devicename>SEP00175A52EE7C</devicename> <userid>JDOE</userid> <deviceprofile>JDOEMOBILE</deviceprofile> </login> </request>Simple enough, on the surface. Here’s where the trick comes in. Cisco is unclear on how you might deliver this. If you’re call manager is at
ccm.acme.com, then the URL for your API ishttp://ccm.acme.com/emservice/EMServiceServlet. Cisco says “use POST”, but that’s not quite what they mean. If you just POST the XML to that URL with a Content Type oftext/xml, you’ll get all sorts of useless server errors.What you actually have to do is pretend that you’re actually posting a
FORM. To do this, I use amultipart/form-data. Then, you pass the XML document above inside a part labeled “xml”. Once you figure that out, it’s not complicated.Logout is similar, with the following XML document:
<request> <appinfo> <appid>MobilityManagerUser</appid> <appcertificate>supersquirrel</appcertificate> </appinfo> <logout> <devicename>SEP00175A52EE7C</devicename> </logout> </request>So if you ever need to work with a Cisco Call Manager to do station mobility, there’s a bit of insight. This might have changed in later releases, but the client I’m working with is intent on staying on v4.2.
N.B. For some reason, Wordpress is converting all the XML tags to lower case, which they are not. They are sorta camel case. Make sure you get that right, as Cisco seems to care very deeply about it.
This entry was posted at 4:13 pm on 16 April 2008 and is filed under Technology. You can follow any responses to this entry through the post-specific RSS 2.0 feed.
Thanks a lot for the help!
I just have a few question more:
1) How did you solve the problem to POST the request? With a javascript using the HTTP Request object? Can you please post the example of your form-data?2) As you mentioned, userID and Password are meant those who I enter in the Login’s service script of the phone? (userID and PIN)
Bye
You just take the XML mentioned (customized for your situation) and stuff it in a field called
xmlin the form POSTed. It’s really that simple. The userID/password is for a user in the Call Manager which has Extension Mobility proxy available.Both comments and pings are currently closed.
This was very usefull.
thanks for the hint on the querystring that they want is xml
strxml = “”
strxml = strxml & “”
strxml = strxml & “” & strAppID & “”
strxml = strxml & “” & strPassword & “”
strxml = strxml & “”
strxml = strxml & “”
strxml = strxml & “” & strDeviceName & “”
strxml = strxml & “” & strUserID & “”
strxml = strxml & “”
strxml = strxml & “”
strURL = “http://callmgr1/emservice/EMServiceServlet?xml=” & strxml