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 is http://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 of text/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 a multipart/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.
No comments found.
You can leave a response, or trackback from your own site.