[OpenSIPS-Users] presence xpidf

Bogdan-Andrei Iancu bogdan at opensips.org
Mon Jan 11 10:59:47 CET 2016


Hi Stas,

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.

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:

<?xml version="1.0" encoding="UTF-8"?>
     <presence xmlns="urn:ietf:params:xml:ns:pidf" 
entity="sip:bogdan at opensips.org;transport=UDP">
         <tuple id="bogdan" >
             <status><basic>open</basic>
             </status>
             <note>Busy</note>
         </tuple>
     </presence>

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 ?

Best regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 04.01.2016 18:49, Stas Kobzar wrote:
> Hello all and Happy New Year!
>
> I have a problem with publishing application/xpidf+xml (Xpidf) 
> presence info with OpenSIPS mi (ver11).
> It seems like it is not supported.
>
> The xpidf xml body is something like this:
>
> <?xml version="1.0"?>
> <!DOCTYPE presence PUBLIC "-//IETF//DTD RFCxxxx XPIDF 1.0//EN" 
> "xpidf.dtd">
> <presence>
>   <presentity uri="sip:244 at 199.182.134.149 
> <mailto:sip%3A244 at 199.182.134.149>;method=SUBSCRIBE" />
>   <atom id="*45244*600">
>     <address uri="sip:*45244*600 at 199.182.134.149 
> <mailto:600 at 199.182.134.149>;user=ip" priority="0.800000">
>       <status status="open" />
>       <msnsubstatus substatus="online" />
>     </address>
>   </atom>
> </presence>
>
> After browsing around the source I think there are two problems:
> 1. (in modules/pua/add_events.c:pres_process_body) function from 
> libxml2 xmlParseMemory returns NULL when finds the line <!DOCTYPE 
> presence PUBLIC "-//IETF//DTD RFCxxxx XPIDF 1.0//EN" "xpidf.dtd">
>
> 2. Another problem: when I remove the line above from body there is a 
> call to another function that is looking for "<tuple>" node in xml (in 
> modules/pua/add_events.c:pres_process_body):
> node= xmlDocGetNodeByName(doc, "tuple", NULL);
>
> But there is no "tuple" in xpidf document. So it returns error.
>
> 3. As an experiment, I added "<tuple>" inside my presence body and it 
> crashed OpenSIPS with:
> CRITICAL:core:receive_fd: EOF on 18
>
> Question:
> Is there a way to make xpidf presence content type work with pua_mi 
> module?
>
> Thank you,
>
> -- 
>
> Stas Kobzar
>
> Developeur VoIP / VoIP Developer
>
>
> Modulis­.ca Inc.
>
> # Bureau / Office: 514-284-2020 x 246
>
> Email: s <http://firstname.lastname>tas.kobzar at modulis.ca
>
> https://www.modulis.com <https://www.modulis.com/>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160111/b4e86765/attachment.htm>


More information about the Users mailing list