<div dir="ltr">Hello Daniel,<div><br></div><div><span class="" id=":2iy.1" tabindex="-1">Ok</span> my problem is that there is several entries for the same contact in the <span class="" id=":2iy.2" tabindex="-1">presentity</span> table.</div><div>Thus <span class="" id=":2iy.3" tabindex="-1">kamailio</span> sends a lot of NOTIFY.</div><div><br></div><div>For example, i use <span class="" id=":2iy.4" tabindex="-1">jitsi</span> software and my sip account is <a href="mailto:124@192.168.0.186">124@192.168.0.186</a></div><div>Since i added the <span class="" id=":2iy.5" tabindex="-1">folowing</span> settings in my <span class="" id=":2iy.6" tabindex="-1">kamailio</span>.<span class="" id=":2iy.7" tabindex="-1">cfg</span> <span class="" id=":2iy.8" tabindex="-1">config</span> file : </div><div><br></div><div><div style="font-size:12.8px"><div><i>     if(is_method("REGISTER")  ) {</i></div><div><i>                <span class="" id=":2iy.9" tabindex="-1">xlog</span>("L_INFO", "<span class="" id=":2iy.10" tabindex="-1">LBO</span> - <span class="" id=":2iy.11" tabindex="-1">pua</span>_set_publish() call for  $rm from $<span class="" id=":2iy.12" tabindex="-1">fu</span>  (<span class="" id=":2iy.13" tabindex="-1">IP</span>:$<span class="" id=":2iy.14" tabindex="-1">si</span>:$<span class="" id=":2iy.15" tabindex="-1">sp</span>)  \n");</i></div><div><i>                if(!<span class="" id=":2iy.16" tabindex="-1">pua</span>_set_publish())</i></div><div><i>                    <span class="" id=":2iy.17" tabindex="-1">xlog</span>("L_INFO", "<span class="" id=":2iy.18" tabindex="-1">LBO</span> - set publish failed\n");</i></div></div><div style="font-size:12.8px"><i>     }</i></div></div><div><br></div><div>I see at least 2 entries for 124 in the <span class="" id=":2iy.19" tabindex="-1">presentity</span> table:</div><div><br></div><div><div><i>| 1246 | 124      | 192.168.0.186 | presence | a.1450269471.610.326.0  | 1450281200 |    1450281080 | <?<span class="" id=":2iy.20" tabindex="-1">xml</span> version="1.0"?></i></div><div><i><presence <span class="" id=":2iy.21" tabindex="-1">xmlns</span>="urn:<span class="" id=":2iy.22" tabindex="-1">ietf</span>:<span class="" id=":2iy.23" tabindex="-1">params</span>:<span class="" id=":2iy.24" tabindex="-1">xml</span>:<span class="" id=":2iy.25" tabindex="-1">ns</span>:<span class="" id=":2iy.26" tabindex="-1">pidf</span>" <span class="" id=":2iy.27" tabindex="-1">xmlns</span>:<span class="" id=":2iy.28" tabindex="-1">dm</span>="urn:<span class="" id=":2iy.29" tabindex="-1">ietf</span>:<span class="" id=":2iy.30" tabindex="-1">params</span>:<span class="" id=":2iy.31" tabindex="-1">xml</span>:<span class="" id=":2iy.32" tabindex="-1">ns</span>:<span class="" id=":2iy.33" tabindex="-1">pidf</span>:data-model" <span class="" id=":2iy.34" tabindex="-1">xmlns</span>:<span class="" id=":2iy.35" tabindex="-1">rpid</span>="urn:<span class="" id=":2iy.36" tabindex="-1">ietf</span>:<span class="" id=":2iy.37" tabindex="-1">params</span>:<span class="" id=":2iy.38" tabindex="-1">xml</span>:<span class="" id=":2iy.39" tabindex="-1">ns</span>:<span class="" id=":2iy.40" tabindex="-1">pidf</span>:<span class="" id=":2iy.41" tabindex="-1">rpid</span>" <span class="" id=":2iy.42" tabindex="-1">xmlns</span>:c="urn:<span class="" id=":2iy.43" tabindex="-1">ietf</span>:<span class="" id=":2iy.44" tabindex="-1">params</span>:<span class="" id=":2iy.45" tabindex="-1">xml</span>:<span class="" id=":2iy.46" tabindex="-1">ns</span>:<span class="" id=":2iy.47" tabindex="-1">pidf</span>:<span class="" id=":2iy.48" tabindex="-1">cipid</span>" entity="<a href="mailto:124@192.168.0.186">124@192.168.0.186</a>"></i></div><div><i>  <<span class="" id=":2iy.49" tabindex="-1">tuple</span> id="0x7f57cfdb9570"></i></div><div><i>    <status></i></div><div><i>      <basic>open</basic></i></div><div><i>    </status></i></div><div><i>  </<span class="" id=":2iy.50" tabindex="-1">tuple</span>></i></div><div><i></presence></i></div><div><i>                                                                                                                                                                                                                                                                                                                                                                                                                      |        |        0 |</i></div><div><i>| 1247 | 124      | 192.168.0.186 | presence | a.1450269471.609.402.0  | 1450281200 |    1450281080 | <?<span class="" id=":2iy.51" tabindex="-1">xml</span> version="1.0" encoding="<span class="" id=":2iy.52" tabindex="-1">UTF</span>-8" standalone="no"?><presence <span class="" id=":2iy.53" tabindex="-1">xmlns</span>="urn:<span class="" id=":2iy.54" tabindex="-1">ietf</span>:<span class="" id=":2iy.55" tabindex="-1">params</span>:<span class="" id=":2iy.56" tabindex="-1">xml</span>:<span class="" id=":2iy.57" tabindex="-1">ns</span>:<span class="" id=":2iy.58" tabindex="-1">pidf</span>" <span class="" id=":2iy.59" tabindex="-1">xmlns</span>:<span class="" id=":2iy.60" tabindex="-1">dm</span>="urn:<span class="" id=":2iy.61" tabindex="-1">ietf</span>:<span class="" id=":2iy.62" tabindex="-1">params</span>:<span class="" id=":2iy.63" tabindex="-1">xml</span>:<span class="" id=":2iy.64" tabindex="-1">ns</span>:<span class="" id=":2iy.65" tabindex="-1">pidf</span>:data-model" <span class="" id=":2iy.66" tabindex="-1">xmlns</span>:<span class="" id=":2iy.67" tabindex="-1">rpid</span>="urn:<span class="" id=":2iy.68" tabindex="-1">ietf</span>:<span class="" id=":2iy.69" tabindex="-1">params</span>:<span class="" id=":2iy.70" tabindex="-1">xml</span>:<span class="" id=":2iy.71" tabindex="-1">ns</span>:<span class="" id=":2iy.72" tabindex="-1">pidf</span>:<span class="" id=":2iy.73" tabindex="-1">rpid</span>" entity="<a href="mailto:sip%3A124@192.168.0.186">sip:124@192.168.0.186</a>"><<span class="" id=":2iy.74" tabindex="-1">dm</span>:person id="p4404"><<span class="" id=":2iy.75" tabindex="-1">rpid</span>:activities/></<span class="" id=":2iy.76" tabindex="-1">dm</span>:person><<span class="" id=":2iy.77" tabindex="-1">tuple</span> id="t7423"><status><basic>open</basic></status><contact><a href="mailto:sip%3A124@192.168.0.186">sip:124@192.168.0.186</a></contact><note>Online</note></<span class="" id=":2iy.78" tabindex="-1">tuple</span>></presence>  </i>  </div></div><div><br></div><div><br></div><div>Is it possible to use <span class="" id=":2iy.79" tabindex="-1">pua</span> module only if the sip contact does not provide presence <span class="" id=":2iy.80" tabindex="-1">infos</span>?</div><div>Best regards</div><div>Loic</div><div> </div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-12-16 9:31 GMT+01:00 Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    the pua_usrloc sends PUBLISH requests via the network. To
    troubleshoot properly, run kamailio with debug=3 in config and watch
    the network traffic on all interfaces (loopback as well).<br>
    <br>
    Cheers,<br>
    Daniel<div><div class="h5"><br>
    <br>
    <div>On 15/12/15 18:05, Loïc Boissy wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">Hello Daniel,
        <div>Thank you for your help.</div>
        <div><br>
        </div>
        <div>Ok pua_usrloc modules seems good for me.</div>
        <div>I try to use it : </div>
        <div>I add these routing in route[REGISTAR]</div>
        <div>
          <div>     if(is_method("REGISTER") && from_uri=="<a href="mailto:sip%3A122@192.168.0.186" target="_blank"></a><a>sip:122@192.168.0.186</a>" )
            {</div>
          <div>                xlog("L_INFO", "LBO - pua_set_publish()
            call for  $rm from $fu  (IP:$si:$sp)  \n");</div>
          <div>                if(!pua_set_publish())</div>
          <div>                    xlog("L_INFO", "LBO - set publish
            failed\n");</div>
        </div>
        <div>     }</div>
        <div><br>
        </div>
        <div>When sip122 regsiters to my server (192.168.0.186), i can
          see it one entry for <a>sip:122</a> in the pua table and one entry in
          presentity table.</div>
        <div>If i wait for a register period, i can see 2 entries in
          presentity table (only 1 entry in the pua table).</div>
        <div>If i wait for another register period, i can see 3 entries
          in presentity table (only 1 entry in the pua table)<br>
        </div>
        <div>...</div>
        <div><br>
        </div>
        <div>Since the second register period, i can see this error in
          the log file:</div>
        <div>
          <div>ERROR: pua [send_publish.c:580]: send_publish(): New
            PUBLISH and no body found- invalid request</div>
          <div>ERROR: pua_usrloc [ul_publish.c:326]: ul_publish(): while
            sending publish for ul event 2</div>
          <div>ERROR: pua_usrloc [ul_publish.c:337]: ul_publish():
            UPDATE action generated a PUBLISH without body ->
            invoking INSERT action</div>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>Is it normal that pua modules write entries in the
          presentity table?</div>
        <div>Is there an solution to have only one entry per user in the
          presentity table?</div>
        <div><br>
        </div>
        <div>Best regards</div>
        <div>Loïc</div>
        <div><br>
          <div>
            <div class="gmail_extra"><br>
              <div class="gmail_quote">2015-12-15 15:08 GMT+01:00
                Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank"></a><a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span>:<br>
                <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hello,<br>
                  <span><br>
                    On 15/12/15 14:16, Loïc Boissy wrote:<br>
                    > Hello,<br>
                    ><br>
                    > I use kamailio 4.3.2 with the presence module.<br>
                    > When the contact is able to manage its
                    presence, No problem for me.<br>
                    > But when a contact doesn't manage it presence,
                    i would like to know if<br>
                    > it is possible to generate a sip message (like
                    as a simple presence<br>
                    > message) with kamailio?<br>
                    ><br>
                    > The goal of that is to prevent my watcher when
                    a "simple" contact<br>
                    > (without presence option) is registered and
                    unregistered on my<br>
                    > kamailio server.<br>
                  </span>see pua_usrloc modules -- sounds like what you
                  are looking for.<br>
                  <br>
                  Cheers,<br>
                  Daniel<br>
                  <span><font color="#888888"><br>
                      --<br>
                      Daniel-Constantin Mierla<br>
                      <a href="http://twitter.com/#%21/miconda" rel="noreferrer" target="_blank">http://twitter.com/#!/miconda</a>
                      - <a href="http://www.linkedin.com/in/miconda" rel="noreferrer" target="_blank">http://www.linkedin.com/in/miconda</a><br>
                      Book: SIP Routing With Kamailio - <a href="http://www.asipto.com" rel="noreferrer" target="_blank"></a><a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a><br>
                      <a href="http://miconda.eu" rel="noreferrer" target="_blank">http://miconda.eu</a><br>
                      <br>
                      <br>
                      _______________________________________________<br>
                      SIP Express Router (SER) and Kamailio (OpenSER) -
                      sr-users mailing list<br>
                      <a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
                      <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a></font></span></blockquote>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    <pre cols="72">-- 
Daniel-Constantin Mierla
<a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a>
Book: SIP Routing With Kamailio - <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a href="http://miconda.eu" target="_blank">http://miconda.eu</a></pre>
  </div></div></div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div style="color:rgb(136,136,136)"><div style="color:rgb(34,34,34);font-size:12.8000001907349px"><br></div><div style="color:rgb(34,34,34);font-size:12.8000001907349px"><table style="font-family:Arial"><tbody><tr><td rowspan="7"><a href="http://www.digigram.com/" style="color:rgb(17,85,204)" target="_blank"><img width="129" height="100" border="0" src="http://www.digigram.com/show/img1.png"></a></td></tr><tr><td colspan="5"><b>Loïc BOISSY</b></td></tr><tr><td colspan="5"><i>R&D software engineer</i><i style="font-size:12.8000001907349px"> & Project manager</i><br></td></tr><tr><td colspan="5"><span style="color:rgb(111,185,217);font-weight:bold">office:</span> +33 (0)4 76 52 53 16</td></tr><tr><td colspan="5"><span style="color:rgb(111,185,217);font-weight:bold">cell:</span> +33 (0)6 81 54 63 19</td></tr><tr><td colspan="5"><span style="color:rgb(111,185,217);font-weight:bold">fax:</span> +33 (0)4 76 52 18 44</td></tr><tr><td><a href="http://www.digigram.com/company/pressroom.php" style="color:rgb(17,85,204)" target="_blank"><img width="23" height="22" border="0" src="http://www.digigram.com/show/img2.png" style="vertical-align:middle"></a> <a href="https://www.facebook.com/Digigram.Official?ref=hl" style="color:rgb(17,85,204)" target="_blank"><img width="25" height="22" border="0" src="http://www.digigram.com/show/img3.png" style="vertical-align:middle"></a> <a href="https://plus.google.com/+Digigram" style="color:rgb(17,85,204)" target="_blank"><img width="24" height="22" border="0" src="http://www.digigram.com/show/img4.png" style="vertical-align:middle"></a> <a href="https://www.linkedin.com/company/digigram" style="color:rgb(17,85,204)" target="_blank"><img width="25" height="25" border="0" src="http://www.digigram.com/show/img5.png" style="vertical-align:middle"></a> <a href="https://twitter.com/digigram" style="color:rgb(17,85,204)" target="_blank"><img width="24" height="26" border="0" src="http://www.digigram.com/show/img6.png" style="vertical-align:middle"></a></td></tr></tbody></table></div></div></div></div></div></div></div></div></div></div></div>
</div>