locked
c3p Sip Request RRS feed

  • Question

  •  

    I am trying to get the list of conferences from OCS 2007 using UCMA in my ASPNET application. I am receiving response code and response text as 200 OK. But i am getting empty MessageBody.

     

    Here is the code

     

    //Form the c3p request xml

    MemoryStream st = new MemoryStream();

    XmlTextWriter writer = new XmlTextWriter(st, System.Text.Encoding.UTF8);
    writer.WriteStartElement("request", "urn:ietfStick out tonguearams:xml:ns:cccp");
    writer.WriteAttributeString("to", "sip:adminuser@testdomain.com;gruu;opaque=app:conf:focusfactory");
    writer.WriteAttributeString("from", "sip:adminuser@testdomain.com");
    writer.WriteAttributeString("C3PVersion", "1");
    writer.WriteAttributeString("requestId", "7");
    writer.WriteStartElement("getConferences");
    writer.WriteEndElement();
    writer.WriteEndElement();
    writer.Flush();
               
    st.Position = 0;

    StreamReader sr = new StreamReader(st);

    string strOutput = sr.ReadToEnd();

     

    //make a sip service request

    SipServiceRequest sipRequest = new SipServiceRequest(endpoint, new ContentType("application/cccp+xml"), Encoding.UTF8.GetBytes(strOuput));

     

    SipResponseData sipResponse = sipRequest.Service(null, null);

     

    sipResponse gives empty for GetMessageBodyString()

     

    Has anyone tried using c3p sip request with OCS 2007?

     

    Cheers,

    chan-syn

    Monday, September 1, 2008 6:37 AM