Does Call Manager 6.0 provide Mos Score?

Version 1
    This document was generated from CDN thread

    Created by: Meng Yao on 19-01-2009 09:56:08 PM
    Hi everyone,

    If you know something about getting mos score about a phone call from call manager, please tell me.

    Thanks,

    Meng

    Subject: Re: Does Call Manager 6.0 provide Mos Score?
    Replied by: David Staudt on 19-01-2009 10:25:39 PM
    Call quality metrics are stored in CUCM Call Media Records (CMRs) as part of the Call Details Records (CDR) system. These records can be transmitted periodically from CM to up to 3 configured hosts via FTP.

    See the 7.0(1) Cisco Unified Communication Manager Call Detail Record Analysis guide here for details on the fields available: http://developer.cisco.com/web/sxml/docs

    Subject: Re: Does Call Manager 6.0 provide Mos Score?
    Replied by: Charles Chen on 23-01-2009 12:48:03 AM
    David,

    I used soapUI to call CDRonDemand get_file_list and get_file APIs to successfully retrieve CMR records to FTP host.

    But how can I do this in my C/C++ application? I tried to follow the AXL programming guide example to wrap get_file_list in AXL requests, but I got AXL response error code 5000 (which is an unknown error according to the Cisco AXL doc). Is this API part of AXL request? Or we have to use different code architecture to call CDRonDemand APIs?

    Thanks,
    Charles

    Subject: Re: Does Call Manager 6.0 provide Mos Score?
    Replied by: David Staudt on 23-01-2009 03:43:58 PM
    The CDRonDemand web service is at a different URL on CM (check the developer guide,) make sure your code is Posting the command to the right URL.

    If that's not the problem, paste in your request/response and maybe we can spot something.

    Subject: Re: Does Call Manager 6.0 provide Mos Score?
    Replied by: Charles Chen on 23-01-2009 08:12:16 PM
    I tried the CDR On-Demand Service URL:
    https:/<server>:8443/CDRonDemandService

    The get_file_list request did go through, but I didn't get the expected response.
    I am expecting the following response (which is what I got from soapUI):
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
    <ns1:get_file_listResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://schemas.cisco.com/ast/soap/">
    <get_file_listReturn xsi:type="ns2:ArrayOfFileName" xmlns:ns2="http://ccm.cisco.com/serviceability/soap/cdrondemand">
    <FileName xsi:type="xsd:string">cdr_StandAloneCluster_01_200901222017_17</FileName>
    <FileName xsi:type="xsd:string">cdr_StandAloneCluster_01_200901222022_18</FileName>
    <FileName xsi:type="xsd:string">cmr_StandAloneCluster_01_200901222017_17</FileName>
    </get_file_listReturn>
    </ns1:get_file_listResponse>
    </soapenv:Body>
    </soapenv:Envelope>

    However, here is what I got after running my program:

    Request sent is:
    POST /CDRonDemandService/ HTTP/1.1
    Host: localhost:8443
    Accept: text/*
    Authorization: Basic YWlybWFnbmV0OjRAaXJNYWduZXQ=
    Content-type: text/xml
    SOAPAction: "CUCMB ver=6.0"
    Content-length: 581
    Connection: Keep-Alive

    <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLS
    chema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.cisco.com/ast/soap
    /"> <soapenv:Header/> <soapenv:Body> <soap:get_file_list soapenv:encodingStyle="http://schemas.xml
    soap.org/soap/encoding/"> <in0 xsi:type="xsd:string">200901222000</in0> <in1 xsi:type="xsd:s
    tring">200901222100</in1> <in2 xsi:type="xsd:boolean">true</in2> </soap:get_file_list> </soa
    penv:Body> </soapenv:Envelope>

    Response from server is:
    HTTP/1.1 200 OK
    Server: Apache-Coyote/1.1
    Set-Cookie: JSESSIONIDSSO=05FBF8CDBE2960650F45251A02B93F98; Path=/
    Set-Cookie: JSESSIONID=9C6F1F898C727EB9B6BA40ED851E0DD9; Path=/CDRonDemandService; Secure
    Content-Type: text/html;charset=ISO-8859-1
    Content-Length: 3172
    Date: Fri, 23 Jan 2009 20:00:55 GMT

    <!doctype html public "-//w3c//dtd html 4.0 transitional//en" "http://www.w3.org/TR/REC-html40/strict.dtd">

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <style type="text/css">

    span.header-title{
    font-family: arial, verdana, geneva, helvetica, sans-serif;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.4em;
    color: #FFFFFF
    }

    table.header-table{
    background-color: #336666;
    }

    a.content-grid-link{
    font-family: arial, verdana, geneva, helvetica, sans-serif;
    text-decoration: none;
    font-size: 1.0em;
    font-weight: 200;
    color:blue;
    }

    </style>
    </head>

    <body>
    <table width="100%" class="header-table" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td width="100%" nowrap colspan="4" height="35">&#38;nbspSOAP Server - Call Det
    ailed Records on Demand Service
    </td>
    </tr>
    <tr>
    <td align="center" bgcolor="#cccccc">&#38;nbsp
    </td>
    </tr>
    <tr>
    <td align="center" bgcolor="#cccccc">&#38;nbsp
    </td>
    </tr>
    <tr>
    <td align="center" bgcolor="#cccccc">&#38;nbsp
    </td>
    </tr>
    <tr>
    <td align="center" bgcolor="#cccccc">&#38;nbsp
    </td>
    </tr>
    <tr>
    <td align="center" bgcolor="#cccccc">&#38;nbsp
    </td>
    </tr>
    <tr>
    <td align="center" bgcolor="#cccccc">&#38;nbsp
    </td>
    </tr>
    <tr>
    <td align="center" bgcolor="#cccccc">&#38;nbsp
    </td>
    </tr>
    <tr>
    <td align="center" bgcolor="#cccccc">
    [1. View Deployed Web Services]
    </td>
    </tr>
    <tr>
    <td align="center" bgcolor="#cccccc">&#38;nbsp
    </td>
    </tr>
    <tr>
    <td align="center" bgcolor="#cccccc">&#38;nbsp
    </td>
    </tr>
    <tr>
    <td align="center" bgcolor="#cccccc">&#38;nb&#9568;&#9568;&#9568;&#9568;&#9568;&#9568;&#9568;&#9568;

    Here is my code snippet.

    SOCKET sock;
    if( WSAStartup( MAKEWORD( 2, 2 ), &#38;wsd ) )
    goto done;
    wsa_initialized = TRUE;
    sock = socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
    saddr.sin_family=AF_INET;
    saddr.sin_port=htons(atoi("8443"));
    saddr.sin_addr.s_addr =inet_addr("10.10.5.6");
    status=connect(sock,(struct sockaddr *)&#38;saddr,sizeof(saddr));
    SSL_library_init();
    meth=TLSv1_client_method();
    sslctx=SSL_CTX_new(meth);
    SSL_CTX_set_verify(sslctx,SSL_VERIFY_NONE,NULL);
    ssl =SSL_new(sslctx);
    status=SSL_set_fd(ssl,sock);
    SSL_set_mode(ssl,SSL_MODE_AUTO_RETRY);
    status=SSL_connect(ssl);
    server_cert = SSL_get_peer_certificate (ssl);
    str= X509_NAME_oneline(X509_get_subject_name (server_cert),0,0);
    str = X509_NAME_oneline (X509_get_issuer_name (server_cert),0,0);
    line="12";
    seqnum="1234";
    BuildDeviceNameSQL(buff,line,seqnum); /* see attached function below */
    SSL_write(ssl,buff.c_str(),buff.length());
    printf("\n");
    printf("\n");
    printf("Request sent is:\n");
    printf(buff.c_str());
    printf("\n");
    printf("\n");
    SSL_read(ssl,buffer,sizeof(buffer));


    void
    BuildDeviceNameSQL(string &#38;buf, // Buffer to build AXL
    string&#38; deviceNumber, // DN
    string&#38; seqNum )
    {
    const int BUFSIZE = 20480;
    char buff; // Temp buffer
    string strHTTPHeader; // HTTP/AXL Header
    string strAXLRequest; // AXL Request

    //////CDR get_file_list
    strAXLRequest = "<soapenv:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:soap=\"http://schemas.cisco.com/ast/soap/\"> ";
    strAXLRequest += " <soapenv:Header/> ";
    strAXLRequest += " <soapenv:Body> ";
    strAXLRequest += " <soap:get_file_list soapenv:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"> ";
    strAXLRequest += " <in0 xsi:type=\"xsd:string\">200901222000</in0> ";
    strAXLRequest += " <in1 xsi:type=\"xsd:string\">200901222100</in1> ";
    strAXLRequest += " <in2 xsi:type=\"xsd:boolean\">true</in2> ";
    strAXLRequest += " </soap:get_file_list> ";
    strAXLRequest += " </soapenv:Body> ";
    strAXLRequest += "</soapenv:Envelope> ";
    strHTTPHeader = "POST /CDRonDemandService/ HTTP/1.1\r\n";
    strHTTPHeader += "Host: localhost:8443\r\n";
    strHTTPHeader += "Accept: text/*\r\n";
    //strHTTPHeader += "Authorization: Basic YWRtaW5pc3RyYXRvcjpjaXNjbw== \r\n";
    strHTTPHeader += "Authorization: Basic ";
    strHTTPHeader += getAuthorization() + "\r\n";
    strHTTPHeader += "Content-type: text/xml\r\n";
    strHTTPHeader += "SOAPAction: \"CUCMB ver=6.0\"\r\n";
    strHTTPHeader += "Content-length: ";
    // temporarily use the buffer to store the length of the request
    sprintf( buff, "%d", strAXLRequest.length() );
    strHTTPHeader += buff;
    strHTTPHeader += "\r\nConnection: Keep-Alive";
    strHTTPHeader += "\r\n\r\n";
    // put the HTTP header and SOAP XML together
    buf = strHTTPHeader + strAXLRequest;
    return;
    }

    Please advise. I really appreciate your help.

    Thanks,
    Charles

    Subject: Re: Does Call Manager 6.0 provide Mos Score?
    Replied by: David Staudt on 28-01-2009 10:55:50 PM
    Per the AXL documentation, the CDRonDemand requests should be posted to:

    https://<server>:8443/CDRonDemandService/services/CDRonDemand

    The code snippet shows you have :

    strHTTPHeader = "POST /CDRonDemandService/ HTTP/1.1\r\n";