Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
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.

#!/usr/local/bin/perl

use LWP::UserAgent;

use URI;

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

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

$xml3="<query>\n<appInfo>\n<appID>administrator</appID>\n<appCertificate>####</appCertificate>\n</appInfo>\n<userDevicesQuery>\n<userID>shyamalb</userID>\n</userDevicesQuery>\n</query>";

$xml=$xml1.$xml2.$xml3;

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);

$request->content("xml=$xml");

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.

</error>

can anyone tell me where my script is going wrong?

Any help will be highly appreciated.

Thanks and regards

Shyamal

  • Other Collaboration Voice and Video Subjects
2 REPLIES
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

192
Views
0
Helpful
2
Replies