<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Hi Stas,<br>
      <br>
      I checked with couple of SIP UACs and I found none using the
      "DOCTYPE" line the published presence XML. So, I guess you should
      simply drop such a line in your testing.<br>
      <br>
      The "tuple" node is replacing your "atom" node (at least this is
      what I noticed while trying other UACs). Here is an example of a
      PUBLISH xml generated by Zoiper:<br>
      <br>
      &lt;?xml version="1.0" encoding="UTF-8"?&gt;<br>
          &lt;presence xmlns="urn:ietf:params:xml:ns:pidf"
      entity=<a class="moz-txt-link-rfc2396E" href="mailto:sip:bogdan@opensips.org;transport=UDP">"sip:bogdan@opensips.org;transport=UDP"</a>&gt;<br>
              &lt;tuple id="bogdan" &gt;<br>
                  &lt;status&gt;&lt;basic&gt;open&lt;/basic&gt;<br>
                  &lt;/status&gt;<br>
                  &lt;note&gt;Busy&lt;/note&gt;<br>
              &lt;/tuple&gt;<br>
          &lt;/presence&gt;<br>
      <br>
      In regards to the crash, even if the XML is not properly formated,
      it should not crash - can you send me the actual MI command +
      content to try to reproduce the crash and have it fixed ?<br>
      <br>
      Best regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
    <div class="moz-cite-prefix">On 04.01.2016 18:49, Stas Kobzar wrote:<br>
    </div>
    <blockquote
cite="mid:CAMYcjooW_EC1Zx9BvDmOBFE3DKFa9OmdbnkAcN0tbzvFuen4xQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hello all and Happy New Year!<br>
        <br>
        I have a problem with publishing application/xpidf+xml (Xpidf)
        presence info with OpenSIPS mi (ver11). <br>
        It seems like it is not supported.<br>
        <br>
        The xpidf xml body is something like this:<br>
        <br>
        &lt;?xml version="1.0"?&gt;<br>
        &lt;!DOCTYPE presence PUBLIC "-//IETF//DTD RFCxxxx XPIDF
        1.0//EN" "xpidf.dtd"&gt;<br>
        &lt;presence&gt;<br>
          &lt;presentity uri="<a moz-do-not-send="true"
          href="mailto:sip%3A244@199.182.134.149">sip:244@199.182.134.149</a>;method=SUBSCRIBE"
        /&gt;  <br>
          &lt;atom id="*45244*600"&gt;<br>
            &lt;address uri="sip:*45244*<a moz-do-not-send="true"
          href="mailto:600@199.182.134.149">600@199.182.134.149</a>;user=ip"
        priority="0.800000"&gt;<br>
              &lt;status status="open" /&gt;  <br>
              &lt;msnsubstatus substatus="online" /&gt;<br>
            &lt;/address&gt;<br>
          &lt;/atom&gt;<br>
        &lt;/presence&gt;<br>
        <div><br>
        </div>
        <div>After browsing around the source I think there are two
          problems:</div>
        <div>1. (in modules/pua/add_events.c:pres_process_body) function
          from libxml2 xmlParseMemory returns NULL when finds the
          line &lt;!DOCTYPE presence PUBLIC "-//IETF//DTD RFCxxxx XPIDF
          1.0//EN" "xpidf.dtd"&gt;</div>
        <div><br>
        </div>
        <div>2. Another problem: when I remove the line above from body
          there is a call to another function that is looking for
          "&lt;tuple&gt;" node in xml (in
          modules/pua/add_events.c:pres_process_body):</div>
        <div>
          <div>node= xmlDocGetNodeByName(doc, "tuple", NULL);</div>
          <div><br>
          </div>
        </div>
        <div>But there is no "tuple" in xpidf document. So it returns
          error.</div>
        <div><br>
        </div>
        <div>3. As an experiment, I added "&lt;tuple&gt;" inside my
          presence body and it crashed OpenSIPS with:</div>
        <div>CRITICAL:core:receive_fd: EOF on 18<br>
        </div>
        <div><br>
        </div>
        <div>Question:<br>
        </div>
        <div>Is there a way to make xpidf presence content type work
          with pua_mi module?<br>
        </div>
        <div><br>
        </div>
        <div>Thank you, </div>
        <div>
          <div><br>
          </div>
          -- <br>
          <div class="gmail_signature">
            <div dir="ltr">
              <div>
                <div dir="ltr">
                  <div dir="ltr">
                    <div dir="ltr">
                      <div dir="ltr">
                        <div dir="ltr">
                          <div dir="ltr"><span>
                              <p dir="ltr"
                                style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:15px;font-family:Arial;color:rgb(0,112,192);font-weight:bold;vertical-align:baseline;white-space:pre-wrap;background-color:transparent">Stas Kobzar</span></p>
                              <p dir="ltr"
                                style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:Arial;color:rgb(166,166,166);vertical-align:baseline;white-space:pre-wrap;background-color:transparent">Developeur VoIP / VoIP Developer</span></p>
                              <p dir="ltr"
                                style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><br>
                              </p>
                            </span>
                            <p dir="ltr"
                              style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Arial;color:rgb(0,112,192);font-weight:bold;vertical-align:baseline;white-space:pre-wrap;background-color:transparent">Modulis­.ca Inc.</span></p>
                            <p dir="ltr"
                              style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:Arial;color:rgb(0,0,0);font-weight:bold;vertical-align:baseline;white-space:pre-wrap;background-color:transparent"># Bureau / Office: 514-284-2020 x 246</span></p>
                            <p dir="ltr"
                              style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11px;font-family:Arial;color:rgb(0,0,0);font-weight:bold;vertical-align:baseline;white-space:pre-wrap;background-color:transparent">Email</span><span style="font-size:11px;font-family:Arial;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent">: </span><span style="text-decoration:underline;font-size:11px;font-family:Arial;color:rgb(17,85,204);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><a moz-do-not-send="true" href="http://firstname.lastname" style="text-decoration:none" target="_blank">s</a>tas.kobzar</span><a
                                moz-do-not-send="true"
                                style="text-decoration:none"><span style="font-size:11px;font-family:Arial;color:rgb(17,85,204);text-decoration:underline;vertical-align:baseline;white-space:pre-wrap;background-color:transparent">@modulis.ca</span></a></p>
                            <p dir="ltr"
                              style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Arial;color:rgb(0,0,0);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"> </span></p>
                            <p dir="ltr"
                              style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="text-decoration:underline;font-size:11px;font-family:Arial;color:rgb(17,85,204);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><a moz-do-not-send="true" href="https://www.modulis.com/" style="text-decoration:none" target="_blank">https://www.modulis.com</a></span></p>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>