<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
 </head><body style="">
 
 
  <div>
   Hi Daniel,
  </div> 
  <div>
    
  </div> 
  <div>
   thx for you hint. I´m currently working on extending DBG output on several places / files.
  </div> 
  <div>
    
  </div> 
  <div>
   In the meantime I´ve found that the presence_dialoginfo module is still able to aggregate XML bodies. But - and that´s what I wonder about - only when the XML bodies were "delivered" to the server in individual PUBLISH requests with single dialog elements only. As soon as the same information is sent to the server in form of a single PUBLISH request with two dialog elements, only one element is returned to the active_watchers.
  </div> 
  <div>
    
  </div> 
  <div>
   Until now debug output delivered following information:
  </div> 
  <div>
   (1) the DB is storing correct content of the PUBLISH request in the presentity table, which looks like this:
  </div> 
  <div>
   <?xml version="1.0"?>
   <br/><dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="00000000004" state="full" entity="sip:117103@172.31.60.87">
   <br/><dialog id="CBE263FF-CEAE11E3-80E8CCBC-52135ACA@172.31.60.13" call-id="CBE263FF-CEAE11E3-80E8CCBC-52135ACA@172.31.60.13" direction="recipient">
   <br/><state>terminated</state>
   <br/><remote>
   <br/><identity>sip:1101015004@172.31.60.13</identity>
   <br/><target uri="sip:1101015004@172.31.60.13"/>
   <br/></remote>
   <br/><local>
   <br/><identity>sip:117103@172.31.60.87</identity>
   <br/><target uri="sip:117103@172.31.60.87"/>
   <br/></local>
   <br/></dialog>
   <br/><dialog id="1041054395-29684904-1398759995534@172.31.60.53" call-id="1041054395-29684904-1398759995534@172.31.60.53" direction="initiator">
   <br/><state>confirmed</state>
   <br/><remote>
   <br/><identity>sip:117101@172.31.60.87</identity>
   <br/><target uri="sip:117101@172.31.60.87"/>
   <br/></remote>
   <br/><local>
   <br/><identity>sip:117103@172.31.60.87</identity>
   <br/><target uri="sip:117103@172.31.60.87"/>
   <br/></local>
   <br/></dialog>
   <br/></dialog-info>
  </div> 
  <div>
    
  </div> 
  <div>
   (2) according output of the DBG code line 'LM_DBG("KLAUS - body = %.*s \n", STR_FMT(body));', which is inserted before 'return body' in the 'agregate_xml' function, the return value of the agregate_xml function looks like this:
  </div> 
  <div>
    
  </div> 
  <div>
   <dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="00000000000" state="full" entity="116001@10.16.48.44">#012<dialog id="CBE263FF-CEAE11E3-80E8CCBC-52135ACA@172.31.60.13" call-id="CBE263FF-CEAE11E3-80E8CCBC-52135ACA@172.31.60.13" direction="recipient">#012<state>terminated</state>#012<remote>#012<identity>sip:1101015004@172.31.60.13</identity>#012<target uri="sip:1101015004@172.31.60.13"/>#012</remote>#012<local>#012<identity>sip:117103@172.31.60.87</identity>#012<target uri="sip:117103@172.31.60.87"/>#012</local>#012</dialog>#012<dialog id="CBE263FF-CEAE11E3-80E8CCBC-52135ACA@172.31.60.13" call-id="CBE263FF-CEAE11E3-80E8CCBC-52135ACA@172.31.60.13" direction="recipient">#012<state>terminated</state>#012<remote>#012<identity>sip:1101015004@172.31.60.13</identity>#012<target uri="sip:1101015004@172.31.60.13"/>#012</remote>#012<local>#012<identity>sip:117103@172.31.60.87</identity>#012<target uri="sip:117103@172.31.60.87"/>#012</local>#012</dialog>#012</dialog-info>#012
  </div> 
  <div>
    
  </div> 
  <div>
   It seems that the first dialog element of the DB entry above is returned twice and the second dialog element is missing here! Does anybody have a hint, why the function is returning such a malformed result??? Double entries are not supported and that´s why the NOTIFY message is including only one dialog element.
  </div> 
  <div>
    
  </div> 
  <div>
   Thanks for any hint!
  </div> 
  <div>
    
  </div> 
  <div>
   br
  </div> 
  <div>
   Klaus
  </div> 
  <blockquote style="position: relative; margin-left: 0px; padding-left: 10px; border-left: solid 1px blue;" type="cite">
   Daniel-Constantin Mierla <miconda@gmail.com> hat am 29. April 2014 um 21:23 geschrieben:
   <br/>
   <br/> Hello,
   <br/> 
   <br/> a quick look in the code seems to use all xml nodes. Mybe you can add some debug messages in presence_dialoginfo/notify_body.c in agregate_xmls() functions and see what is not executing.
   <br/> 
   <br/> Daniel
   <br/> 
   <br/> 
   <div class="moz-cite-prefix">
    On 29/04/14 20:39, Klaus Feichtinger wrote:
   </div> 
   <blockquote type="cite">
    Hi, 
    <div class="moz-forward-container"> 
     <div class="WordSection1"> 
      <p class="MsoNormal">I have a question regarding the presence + presence_dialoginfo modules of Kamailio (tested with version 3.2.x and 3.3.x).</p> 
      <p class="MsoNormal">My SIP user agents are generating SIP PUBLISH requests for the event “dialog” and some of these PUBLISH requests contain multiple dialog elements in the message body. Kamailio is accepting content of these messages and storing that information in the “presentity” table of the corresponding DB. Taking a look into the presentity table is confirming that both dialog elements of the PUBLISH request are stored (as body content).</p> 
      <p class="MsoNormal">However, why does the SIP NOTIFY request, which is sent to the "active_watchers" of this event, contain only one of these dialog entries – even that the modparam “force_single_dialog” is set to “0” or (for comparison) unset (using default value "0")? Are multiple dialog entries not / no longer supported by the Kamailio “presence_dialoginfo” module? The README of this module (through all versions incl. 4.1.x) is explaining the opposite:<br/> [...]<br/> This module by default does body aggregation. [...] e.g. if the entity has multiple dialogs the pua_dialoginfo will send multiple PUBLISH), the module will parse all the received (and still valid, depending on the Expires header in the PUBLISH request) XML documents and generate a single XML document with multiple "dialog" elements.<br/> [...]<br/> </p> 
      <p class="MsoNormal">Exemplary content of a PUBLISH request looks like this:</p> 
      <p class="MsoNormal">PUBLISH <a href="mailto:sip:117104@172.31.60.87">sip:117104@172.31.60.87</a> SIP/2.0<br/> Via: SIP/2.0/UDP 172.31.60.54:5060;rport;branch=z9hG4bK1118069411<br/> From: <a href="mailto:sip:117104@172.31.60.87"><sip:117104@172.31.60.87></a>;tag=4024173055-29882384-1398422652889<br/> To: <a href="mailto:sip:117104@172.31.60.87"><sip:117104@172.31.60.87></a><br/> Call-ID: <a href="mailto:4044398119-29882384-1398422652889@172.31.60.54">4044398119-29882384-1398422652889@172.31.60.54</a><br/> CSeq: 21 PUBLISH<br/> Max-Forwards: 70<br/> Content-Disposition: render;handling=required<br/> Expires: 600<br/> Event: dialog<br/> Content-Type: application/dialog-info+xml<br/> Content-Length:  1053<br/>  <br/> <?xml version="1.0"?><br/> <dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="00000000004" state="full" entity=<a href="mailto:sip:117104@172.31.60.87">"sip:117104@172.31.60.87"</a>><br/>   <dialog id=<a href="mailto:4044468572-29882384-1398422652855@172.31.60.54">"4044468572-29882384-1398422652855@172.31.60.54"</a> call-id=<a href="mailto:4044468572-29882384-1398422652855@172.31.60.54">"4044468572-29882384-1398422652855@172.31.60.54"</a> direction="initiator"><br/>     <state>terminated</state><br/>     <remote><br/>       <identity><a href="mailto:sip:1101015004@172.31.60.13">sip:1101015004@172.31.60.13</a></identity><br/>       <target uri=<a href="mailto:sip:1101015004@172.31.60.13">"sip:1101015004@172.31.60.13"</a>/><br/>     </remote><br/>     <local><br/>       <identity><a href="mailto:sip:117104@172.31.60.87">sip:117104@172.31.60.87</a></identity><br/>       <target uri=<a href="mailto:sip:117104@172.31.60.87">"sip:117104@172.31.60.87"</a>/><br/>     </local><br/>   </dialog><br/>   <dialog id=<a href="mailto:2310720239-29882384-1398422648572@172.31.60.54">"2310720239-29882384-1398422648572@172.31.60.54"</a> call-id=<a href="mailto:2310720239-29882384-1398422648572@172.31.60.54">"2310720239-29882384-1398422648572@172.31.60.54"</a> direction="initiator"><br/>     <state>confirmed</state><br/>     <remote><br/>       <identity><a href="mailto:sip:117103@172.31.60.87">sip:117103@172.31.60.87</a></identity><br/>       <target uri=<a href="mailto:sip:117103@172.31.60.87">"sip:117103@172.31.60.87"</a>/><br/>     </remote><br/>     <local><br/>       <identity><a href="mailto:sip:117104@172.31.60.87">sip:117104@172.31.60.87</a></identity><br/>       <target uri=<a href="mailto:sip:117104@172.31.60.87">"sip:117104@172.31.60.87"</a>/><br/>    </local><br/>   </dialog><br/> </dialog-info><br/> </p> Exemplary content of the NOTIFY request looks like this:
      <br/> 
      <br/> NOTIFY 
      <a href="mailto:sip:117101@172.31.60.54:5060">sip:117101@172.31.60.54:5060</a> SIP/2.0
      <br/> Via: SIP/2.0/UDP 172.31.60.87;branch=z9hG4bKaeb3.066c77d0000000000000000000000000.0
      <br/> To: 
      <a href="mailto:sip:117101@172.31.60.87;tag=827287863-29882384-1398420840764">sip:117101@172.31.60.87;tag=827287863-29882384-1398420840764</a>
      <br/> From: 
      <a href="mailto:sip:117104@172.31.60.87;tag=1f98950b7b1f526eff73c08f9ffc96bd-947a">sip:117104@172.31.60.87;tag=1f98950b7b1f526eff73c08f9ffc96bd-947a</a>
      <br/> CSeq: 152 NOTIFY
      <br/> Call-ID: 
      <a href="mailto:1176683682-29882384-1398420840764@172.31.60.54">1176683682-29882384-1398420840764@172.31.60.54</a>
      <br/> Content-Length: 600
      <br/> User-Agent: kamailio (3.2.4 (i386/linux))
      <br/> Max-Forwards: 70
      <br/> Event: dialog
      <br/> Contact: 
      <a href="sip:172.31.60.87:5060"><sip:172.31.60.87:5060></a>
      <br/> Subscription-State: active;expires=1370
      <br/> Content-Type: application/dialog-info+xml
      <br/>  
      <br/> <dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="00000000004" state="full" entity=
      <a href="mailto:sip:117104@172.31.60.87">"sip:117104@172.31.60.87"</a>>
      <br/>   <dialog id=
      <a href="mailto:4044468572-29882384-1398422652855@172.31.60.54">"4044468572-29882384-1398422652855@172.31.60.54"</a> call-id=
      <a href="mailto:4044468572-29882384-1398422652855@172.31.60.54">"4044468572-29882384-1398422652855@172.31.60.54"</a> direction="initiator">
      <br/>     <state>terminated</state>
      <br/>     <remote>
      <br/>       <identity>
      <a href="mailto:sip:1101015004@172.31.60.13">sip:1101015004@172.31.60.13</a></identity>
      <br/>       <target uri=
      <a href="mailto:sip:1101015004@172.31.60.13">"sip:1101015004@172.31.60.13"</a>/>
      <br/>     </remote>
      <br/>     <local>
      <br/>       <identity>
      <a href="mailto:sip:117104@172.31.60.87">sip:117104@172.31.60.87</a></identity>
      <br/>       <target uri=
      <a href="mailto:sip:117104@172.31.60.87">"sip:117104@172.31.60.87"</a>/>
      <br/>     </local>
      <br/>   </dialog>
      <br/> </dialog-info>
      <br/> 
      <br/>In other words: it is not inserting all (stored) dialog elements into the notification request. Please give me a hint, what there could be wrong. Maybe it is just a misunderstanding of the description..... 
      <p class="MsoNormal">Br<br/> Klaus</p> 
     </div> 
    </div> 
    <br/> 
    <br/> 
    <br/> 
    <pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre> 
   </blockquote> 
   <br/> 
   <pre class="moz-signature">-- 
Daniel-Constantin Mierla - <a href="http://www.asipto.com">http://www.asipto.com</a>
<a href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a></pre> 
  </blockquote> 
  <div>
   <br/> 
  </div>
 
</body></html>