Extension Mobility – Remotely Login User to Phone

When EM is enabled on the phone, the Owner ID of the phone is greyed out. The EM profile will need to be logged out from the device, then uncheck the enable EM, then set the owner ID. CUCM Admin > Device > Phone

There are four ways to remotely login/logout EM profile

  • via direct URL

http://CUCM_PUB:8080/emapp/EMAppServlet?device=#DEVICE#&&userid=USERID&seq=PIN

  • via sampleloginapp.jsp

https://CUCM_PUB/emservice/jsp/Tools/sampleloginapp.jsp

  • via XML Post

https://CUCM_PUB/emservice/jsp/Tools/XMLFormRequest.html

  • via XML Post and Powershell script. Create an application user and assign Standard EM Authentication Proxy Rights

http://CUCM_PUB:8080/emservice/EMServiceServlet

$device="SEPE88888888888"
$udp="user"
$appUser="appUser"
$appPw="appPassword"
$uri = "http://CUCM_PUB:8080/emservice/EMServiceServlet"

$parameters = "xml=<request>"
$parameters += "<appInfo><appID>"+$appUser+"</appID><appCertificate>"+$appPw+"</appCertificate></appInfo>"
#$parameters += "<logout><deviceName>"+$device+"</deviceName></logout>"
$parameters += "<login><deviceName>"+$device+"</deviceName><userID>"+$udp+"</userID></login>"
$parameters += "</request>"
$r = [System.Net.WebRequest]::Create($uri)
$r.ContentType = "application/x-www-form-urlencoded";
$r.Method = "POST";
$query = $r.GetRequestStream();
$encoding = [system.text.encoding]::GetEncoding("ASCII")
$query.Write($encoding.GetBytes($parameters),0,$parameters.Length);
$query.Close();
$resp = $r.GetResponse()
$reqstream = $resp.GetResponseStream()
$sr = new-object System.IO.StreamReader $reqstream
$result = $sr.ReadToEnd()
write-host $result
Advertisements

3 thoughts on “Extension Mobility – Remotely Login User to Phone

  1. randle 2016-12-29 / 07:05

    Awesome! how would you log out of the device or log out all devices for a user with the direct url method? thanks!

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s