Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 
You may experience some slow load times, errors, and slight inconsistencies. We ask for your patience as we finalize the launch. Thank you.

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

Help Needed--Extension Mobility API

I have written a small perl script to make a query to the Call Manager for finding out the MAC address using User-Device Query to find out the Device to which the user is currently logged in.


use LWP::UserAgent;

use URI;

$xml1=qq(<?xml version="1.0"?>\n);

$xml2=qq(<!DOCTYPE query SYSTEM "http://<serverip>/LoginService/LoginQuery.dtd">\n);



print $xml,"\n";

$ua = LWP::UserAgent->new;

$POSTURL = "http://<serverip>/LoginService/query.asp";

# Translate non-alpha chars into hex

$xml = URI::Escape::uri_escape("$xml");

my $request = new HTTP::Request POST => "$POSTURL";

#$request->authorization_basic($USER, $PASSWORD);


my $response = $ua->request($request); # Send the POST

print $response->content;

When i run this script it gives an error as follows

<error code="0">SAX Parsing Error: The markup in the document preceding the root

element must be well-formed.


can anyone tell me where my script is going wrong?

Any help will be highly appreciated.

Thanks and regards


  • Other Collaboration Voice and Video Subjects
New Member

Re: Help Needed--Extension Mobility API

What version of callmanager are you developing against?

New Member

Re: Help Needed--Extension Mobility API

Call Manager version 3.2