cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1573
Views
1
Helpful
2
Comments
cdnadmin
Level 11
Level 11
This document was generated from CDN thread

Created by: Kamran Khan on 15-11-2013 05:53:47 PM
Hi all,

I am currently working on createing a EM proxy service to allow our users to use extensions to log in rather than have to enter the email address on the phone which is the userid in the cucm end user table (synced via LDAP). I am new to this and I ask you to accomodate my newbie questions please and point me in the right direction.

From what I can understand, this would broadly require the following steps:

  • STEP 1 - Read the standard EM login HTTP query
Sample http request to be captured:
http://<<CUCM IP>>/emapp/EMAppServlet?device=<<DEVICENAME>>&userid=<<USERID>>&seq=<<PIN>>
 
Variables to be interested in:
<<CUCM IP>> This technically needs to be the CUCM IP address but we will engineer the phone config to instead use our Proxy Server IP
<<DEVICENAME>> This is the Phone MAC that we will need to tell CUCM to log the user into
<<USERID>> This is the called USERID but will actually be the users extension that we will need to lookup on the CUCM to find the real Userid.
<<PIN>>  We wont need this to log the user in since we will be using a SOAP request from the application rather than a http request.
 
  • STEP 2 - Read the “username” that is part of that query
We have that from the <<USERID>> variable in Step 1.

We need to create an sql show query via an AXL service to retrieve the emailuserid  for this username.
We can use the following SOAP request to get the UserID from the CUCM:
 
        POST :8443/axl/
        Host: axl.myhost.com:8443
        Accept: text/*
        Authorization: Basic bGFycnk6Y3VybHkgYW5kIG1vZQ==
        Content-type: text/xml
        SOAPAction: "CUCMB ver=7.0"
        Content-length: 613
        <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
            <SOAP-ENV:Body>   
                <axlapi:executeSQLQuery sequence="1"
        xmlns:axlapi="http://www.cisco.com/AXL/API/7.0"
        xmlns:axl="http://www.cisco.com/AXL/API/7.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.cisco.com/AXL/API/7.0 axlsoap.xsd">
                    <sql>SELECT * from numplan</sql>
              </axlapi:executeSQLQuery>
            </SOAP-ENV:Body>
        </SOAP-ENV:Envelope>
 
We will need another request to get us the with this as well.
 
  • STEP 3 - Submit another AXL request to the CUCM with that username to log in the phone
The AXL SOAP Request to log in the phone would be the following format:

The following example logs in userID "john" to device SEP003094C25B15 using the User Device Profile UserDevProf:
 
<request>
        <appInfo>
                <appID>appid</appID>
                <appCertificate>apppasswd</appCertificate>
        </appInfo>
        <login>
                <deviceName>SEP003094C25B15</deviceName>
                <userID>john</userID>
                <deviceProfile>UserDevProf</deviceProfile>
                <exclusiveDuration>
                          <time>60</time>
                </exclusiveDuration>
        </login>
</request>

Now for the questions:

1) Does this look like the right way of doing this?
2) Can you please point me to the tables, field which where the CCMEnduser Primary Extension is stored? So that we can retrieve it via the SQL to use for the EM log in. Or is there a more efficient way of retreiving it e.g some AXL request?
3) Can you please advise what this password is that needs to be specified in the EM login XML? the appCertificate. Where exactly is this needed to be configured on the CUCM so that its validated?
4) The XML for the EM looks different vs the AXL for SQLExecute. Does this need to be encapsulated in the normal SOAP headers etc?

Thanks in advance for your help!

Regards,
Kamran
Comments
Simon Machielse
Level 1
Level 1

There are already a lot of solutions out there which will do this for you.

try this

Google

Jon Snipes
Level 1
Level 1

I know this is a little late, but if you use the enduser telephone field as the extension, you can lookup the userid from the enduser table.  If you pull it from the actual phone you'll have to get pretty complex - joining dnorpattern with devices and then joining devices with enduser controlled devices which may contain more than a single match etc.

<sql>

select userid,mailid from enduser where telephonenumber='3955'

</sql>

If you are using the same format of the normal EM login then you have the PIN already and can just use the original style get request (http://<<CUCM IP>>/emapp/EMAppServlet?device=<<DEVICENAME>>&userid=<<USERID>>&seq=<<PIN>>) to call to CM using that same format, but replacing the extension for the username.   I'm looking at a customer right now with similar needs.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links