<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 07/21/2011 08:21 AM, Daniel-Constantin Mierla wrote:
    <blockquote cite="mid:4E27C56A.2040707@gmail.com" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      Hello,<br>
      <br>
      indeed there was some inconsistency. I just committed a patch to
      store empty string if the sender parameter is not set. That for
      the fact that later (about line 450) there is a query and the
      sender value is taken from db and strlen used. All over, these
      checks are used for SLA/BLA case.<br>
    </blockquote>
    <br>
    Could you please send me the diff so that I can apply it to my local
    v3.1.4 <br>
    for rebuilding the rpms?<br>
    <br>
    <blockquote cite="mid:4E27C56A.2040707@gmail.com" type="cite"> <br>
      Cheers,<br>
      Daniel<br>
      <br>
      On 7/20/11 7:00 PM, Bucur Marius wrote:
      <blockquote
        cite="mid:1311181206.38507.YahooMailNeo@web29707.mail.ird.yahoo.com"
        type="cite">
        <div style="color:#000; background-color:#fff;
          font-family:arial, helvetica, sans-serif;font-size:12pt">
          <div style="font-family: arial, helvetica, sans-serif;
            font-size: 12pt; "><span>Hi,</span></div>
          <div style="font-family: arial, helvetica, sans-serif;
            font-size: 12pt; "><span><br>
            </span></div>
          <div style="font-family: arial, helvetica, sans-serif;
            font-size: 12pt; "><span>It think there is something wrong
              with the sql scripts, hence the code obviously accepts a
              null sender.</span></div>
          <div style="font-family: arial, helvetica, sans-serif;
            font-size: 12pt; "><span><br>
            </span></div>
          <div style="font-family: arial, helvetica, sans-serif;
            font-size: 12pt; "><span>presentity.c:357</span></div>
          <div><span>
              <div><span class="Apple-tab-span" style="white-space:pre">
                </span>if( presentity-&gt;sender)</div>
              <div><span class="Apple-tab-span" style="white-space:pre">
                </span>{</div>
              <div><span class="Apple-tab-span" style="white-space:pre">
                </span>query_cols[n_query_cols] = &amp;str_sender_col;</div>
              <div><span class="Apple-tab-span" style="white-space:pre">
                </span>query_vals[n_query_cols].type = DB1_STR;</div>
              <div><span class="Apple-tab-span" style="white-space:pre">
                </span>query_vals[n_query_cols].nul = 0;</div>
              <div><span class="Apple-tab-span" style="white-space:pre">
                </span>query_vals[n_query_cols].val.str_val.s =
                presentity-&gt;sender-&gt;s;</div>
              <div><span class="Apple-tab-span" style="white-space:pre">
                </span>query_vals[n_query_cols].val.str_val.len =
                presentity-&gt;sender-&gt;len;</div>
              <div><span class="Apple-tab-span" style="white-space:pre">
                </span>n_query_cols++;</div>
              <div><span class="Apple-tab-span" style="white-space: pre;
                  "> </span>}</div>
              <div><br>
              </div>
              <div>From a logical point of view, I believe the sender
                should not be mandatory hence it could be generated by a
                machine - whose identity/location is not needed.</div>
              <div><br>
              </div>
              <div>Regards,</div>
              <div>Marius</div>
            </span></div>
          <div style="font-family: arial, helvetica, sans-serif;
            font-size: 12pt; "><br>
          </div>
          <div style="font-size: 12pt; font-family: arial, helvetica,
            sans-serif; ">
            <div style="font-size: 12pt; font-family: 'times new roman',
              'new york', times, serif; "><font face="Arial" size="2">
                <hr size="1"><b><span style="font-weight:bold;">From:</span></b>
                Daniel-Constantine Mierla <a moz-do-not-send="true"
                  class="moz-txt-link-rfc2396E"
                  href="mailto:miconda@gmail.com">&lt;miconda@gmail.com&gt;</a><br>
                <b><span style="font-weight: bold;">To:</span></b> SIP
                Router - Kamailio (OpenSER) and SIP Express Router (SER)
                -Users Mailing List <a moz-do-not-send="true"
                  class="moz-txt-link-rfc2396E"
                  href="mailto:sr-users@lists.sip-router.org">&lt;sr-users@lists.sip-router.org&gt;</a><br>
                <b><span style="font-weight: bold;">Cc:</span></b> SIP
                Router - Kamailio (OpenSER) and SIP Express Router (SER)
                - UsersMailing List <a moz-do-not-send="true"
                  class="moz-txt-link-rfc2396E"
                  href="mailto:sr-users@lists.sip-router.org">&lt;sr-users@lists.sip-router.org&gt;</a><br>
                <b><span style="font-weight: bold;">Sent:</span></b>
                Wednesday, July 20, 2011 6:53 PM<br>
                <b><span style="font-weight: bold;">Subject:</span></b>
                Re: [SR-Users] Kamailio presence server problem with
                PostgreSQL<br>
              </font><br>
              Hello,<br>
              <br>
              Thanks for troubleshooting further. What intrigues me is
              that the error message from syslog is printed from store
              result function, which is used after doing a select query.
              So something else might have to be reviewed as well.<br>
              <br>
              Anyhow, missing sender value should be checked, since it
              is a constraint for non-null. Interesting it was not risen
              with mysql.<br>
              <br>
              Cheers,<br>
              Daniel<br>
              <br>
              On Jul 20, 2011, at 5:46 PM, Roberto Fichera &lt;<a
                moz-do-not-send="true"
                ymailto="mailto:kernel@tekno-soft.it"
                href="mailto:kernel@tekno-soft.it">kernel@tekno-soft.it</a>&gt;

              wrote:<br>
              <br>
              &gt; On 07/20/2011 05:34 PM, Roberto Fichera wrote:<br>
              &gt;&gt; On 07/20/2011 05:18 PM, Klaus Darilion wrote:<br>
              &gt;&gt;&gt; Am 20.07.2011 17:00, schrieb Roberto Fichera:<br>
              &gt;&gt;&gt;&gt; ERROR:&nbsp; null value in column "sender"
              violates not-null constraint<br>
              &gt;&gt;&gt;&gt; STATEMENT:&nbsp; insert into presentity<br>
              &gt;&gt;&gt;&gt;
              (domain,username,event,etag,expires,body,received_time )
              values<br>
              &gt;&gt;&gt;&gt;
('192.168.2.92','roberto','presence','a.1311173612.4970.2.0',1311177224,'&lt;?xml<br>
              &gt;&gt;&gt;&gt; version="1.0" encoding="UTF-8"
              standalone="no"?&gt;&lt;presence<br>
              &gt;&gt;&gt;&gt; xmlns="urn:ietf:params:xml:ns:pidf"<br>
              &gt;&gt;&gt;&gt;
              xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"<br>
              &gt;&gt;&gt;&gt;
              xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid"<br>
              &gt;&gt;&gt;&gt; entity=<a moz-do-not-send="true"
                class="moz-txt-link-rfc2396E"
                href="sip:roberto@192.168.2.92">"sip:roberto@192.168.2.92"</a>&gt;&lt;dm:person<br>
              &gt;&gt;&gt;&gt;
              id="p3619"&gt;&lt;rpid:activities/&gt;&lt;/dm:person&gt;&lt;tuple<br>
              &gt;&gt;&gt;&gt;
id="t9285"&gt;&lt;status&gt;&lt;basic&gt;open&lt;/basic&gt;&lt;/status&gt;&lt;contact&gt;<a
                moz-do-not-send="true" class="moz-txt-link-freetext"
                href="sip:roberto@192.168.2.92">sip:roberto@192.168.2.92</a>&lt;/contact&gt;&lt;note&gt;Online&lt;/note&gt;&lt;/tuple&gt;&lt;/presence&gt;',1311173624)<br>
              &gt;&gt;&gt; Seems like the statement does not insert the
              "sender" although it is<br>
              &gt;&gt;&gt; mandatory. If "sender" is really mandatory,
              then it seems the statement<br>
              &gt;&gt;&gt; is buggy.<br>
              &gt;&gt; how does look the corresponding presentity mysql
              table, does it has the same<br>
              &gt;&gt; constraint or not?<br>
              &gt; <br>
              &gt; Anyway I can confirm that removing the constraint the
              problem<br>
              &gt; of presence backed by postgresql seems solved.<br>
              &gt; <br>
              &gt;&gt; <br>
              &gt;&gt;&gt; regards<br>
              &gt;&gt;&gt; Klaus<br>
              &gt;&gt;&gt; <br>
              &gt;&gt;&gt;
              _______________________________________________<br>
              &gt;&gt;&gt; SIP Express Router (SER) and Kamailio
              (OpenSER) - sr-users mailing list<br>
              &gt;&gt;&gt; <a moz-do-not-send="true"
                ymailto="mailto:sr-users@lists.sip-router.org"
                href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
              &gt;&gt;&gt; <a moz-do-not-send="true"
                href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
                target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
              &gt;&gt;&gt; <br>
              &gt;&gt; <br>
              &gt;&gt; _______________________________________________<br>
              &gt;&gt; SIP Express Router (SER) and Kamailio (OpenSER) -
              sr-users mailing list<br>
              &gt;&gt; <a moz-do-not-send="true"
                ymailto="mailto:sr-users@lists.sip-router.org"
                href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
              &gt;&gt; <a moz-do-not-send="true"
                href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
                target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
              &gt;&gt; <br>
              &gt; <br>
              &gt; <br>
              &gt; _______________________________________________<br>
              &gt; SIP Express Router (SER) and Kamailio (OpenSER) -
              sr-users mailing list<br>
              &gt; <a moz-do-not-send="true"
                ymailto="mailto:sr-users@lists.sip-router.org"
                href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
              &gt; <a moz-do-not-send="true"
                href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
                target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
              <br>
              _______________________________________________<br>
              SIP Express Router (SER) and Kamailio (OpenSER) - sr-users
              mailing list<br>
              <a moz-do-not-send="true"
                ymailto="mailto:sr-users@lists.sip-router.org"
                href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
              <a moz-do-not-send="true"
                href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
                target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
              <br>
              <br>
            </div>
          </div>
        </div>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" 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" cols="72">-- 
Daniel-Constantin Mierla -- <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
Kamailio Advanced Training, Oct 10-13, Berlin: <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://asipto.com/u/kat">http://asipto.com/u/kat</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://linkedin.com/in/miconda">http://linkedin.com/in/miconda</a> -- <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://twitter.com/miconda">http://twitter.com/miconda</a></pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" 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>
  </body>
</html>