<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 07/21/2011 05:10 PM, Roberto Fichera wrote:
    <blockquote cite="mid:4E284154.4080207@tekno-soft.it" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      On 07/21/2011 05:00 PM, Roberto Fichera wrote:
      <blockquote cite="mid:4E283EF9.3010802@tekno-soft.it" type="cite">
        <pre wrap="">On 07/21/2011 01:55 PM, Klaus Darilion wrote:
</pre>
        <blockquote type="cite">
          <pre wrap=""><a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b39747e213e350609761d14583db3e689ad6fefc">http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b39747e213e350609761d14583db3e689ad6fefc</a>

<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=403ba772771545f4410ba4a5cf396125be353b12">http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=403ba772771545f4410ba4a5cf396125be353b12</a>

<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=460fc8bf6ad5108ff3779c85ff150e4f5145b189">http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=460fc8bf6ad5108ff3779c85ff150e4f5145b189</a>
</pre>
        </blockquote>
        <pre wrap="">I've applied all the listed patches than regenerated and installed
the rpms and set back to not null the sender constraint in the db.
After restarting kamailio I'm still getting the problem as before.</pre>
      </blockquote>
      <br>
      Mmmhhh! The sender still null, but after removing the not null
      constraint again<br>
      from the sender field, I just see another problem:<br>
      <br>
      Jul 21 17:02:37 roberto /usr/sbin/kamailio[24781]: ERROR: presence
      [subscribe.c:711]: Missing or unsupported event header field value<br>
      Jul 21 17:02:37 roberto /usr/sbin/kamailio[24781]: ERROR: presence
      [subscribe.c:714]: #011event= message-summary<br>
      Jul 21 17:02:37 roberto /usr/sbin/kamailio[24780]: ERROR:
      db_postgres [km_dbase.c:427]: invalid query, execution aborted<br>
      <b>Jul 21 17:02:37 roberto /usr/sbin/kamailio[24780]: ERROR:
        db_postgres [km_dbase.c:428]: driver error: PGRES_FATAL_ERROR,
        ERROR:&nbsp; null value in column "expires" violates not-null
        constraint#012</b><br>
      <br>
      so since the expires isn't present in the same query than the db
      trigger the <br>
      not null problem. New query is below:<br>
      <br>
      ERROR:&nbsp; null value in column "expires" violates not-null
      constraint<br>
      STATEMENT:&nbsp; insert into presentity
      (domain,username,event,etag,sender,body,received_time ) values
      ('192.168.2.92','roberto','presence','a.1311260173.24780.4.0','','&lt;?xml

      version="1.0" encoding="UTF-8" standalone="no"?&gt;&lt;presence
      xmlns="urn:ietf:params:xml:ns:pidf"
      xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"
      xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid" entity=<a
        moz-do-not-send="true" class="moz-txt-link-rfc2396E"
        href="mailto:sip:roberto@192.168.2.92">"sip:roberto@192.168.2.92"</a>&gt;&lt;dm:person

      id="p3387"&gt;&lt;rpid:activities/&gt;&lt;/dm:person&gt;&lt;tuple
id="t8698"&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-abbreviated"
        href="mailto: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;',1311260557)<br>
    </blockquote>
    <br>
    My fault, I've used cutted the n_query_cols++; before the column
    expires in the source code.<br>
    Going to rebuild and testing again!<br>
    <br>
    <blockquote cite="mid:4E284154.4080207@tekno-soft.it" type="cite"> <br>
      <blockquote cite="mid:4E283EF9.3010802@tekno-soft.it" type="cite">
        <pre wrap="">
</pre>
        <blockquote type="cite">
          <pre wrap="">
Am 21.07.2011 13:13, schrieb Roberto Fichera:
</pre>
          <blockquote type="cite">
            <pre wrap="">On 07/21/2011 08:21 AM, Daniel-Constantin Mierla wrote:
</pre>
            <blockquote type="cite">
              <pre wrap="">Hello,

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.
</pre>
            </blockquote>
            <pre wrap="">Could you please send me the diff so that I can apply it to my local v3.1.4
for rebuilding the rpms?

</pre>
            <blockquote type="cite">
              <pre wrap="">Cheers,
Daniel

On 7/20/11 7:00 PM, Bucur Marius wrote:
</pre>
              <blockquote type="cite">
                <pre wrap="">Hi,

It think there is something wrong with the sql scripts, hence the
code obviously accepts a null sender.

presentity.c:357
if( presentity-&gt;sender)
{
query_cols[n_query_cols] = &amp;str_sender_col;
query_vals[n_query_cols].type = DB1_STR;
query_vals[n_query_cols].nul = 0;
query_vals[n_query_cols].val.str_val.s = presentity-&gt;sender-&gt;s;
query_vals[n_query_cols].val.str_val.len = presentity-&gt;sender-&gt;len;
n_query_cols++;
}

&gt;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.

Regards,
Marius

------------------------------------------------------------------------
*From:* 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>
*To:* 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>
*Cc:* 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>
*Sent:* Wednesday, July 20, 2011 6:53 PM
*Subject:* Re: [SR-Users] Kamailio presence server problem with
PostgreSQL

Hello,

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.

Anyhow, missing sender value should be checked, since it is a
constraint for non-null. Interesting it was not risen with mysql.

Cheers,
Daniel

On Jul 20, 2011, at 5:46 PM, Roberto Fichera &lt;<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:kernel@tekno-soft.it">kernel@tekno-soft.it</a>
<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:kernel@tekno-soft.it">&lt;mailto:kernel@tekno-soft.it&gt;</a>&gt; wrote:

</pre>
                <blockquote type="cite">
                  <pre wrap="">On 07/20/2011 05:34 PM, Roberto Fichera wrote:
</pre>
                  <blockquote type="cite">
                    <pre wrap="">On 07/20/2011 05:18 PM, Klaus Darilion wrote:
</pre>
                    <blockquote type="cite">
                      <pre wrap="">Am 20.07.2011 17:00, schrieb Roberto Fichera:
</pre>
                      <blockquote type="cite">
                        <pre wrap="">ERROR:  null value in column "sender" violates not-null constraint
STATEMENT:  insert into presentity
(domain,username,event,etag,expires,body,received_time ) values

</pre>
                      </blockquote>
                    </blockquote>
                  </blockquote>
                </blockquote>
                <pre wrap="">('192.168.2.92','roberto','presence','a.1311173612.4970.2.0',1311177224,'&lt;?xml
</pre>
                <blockquote type="cite">
                  <blockquote type="cite">
                    <blockquote type="cite">
                      <blockquote type="cite">
                        <pre wrap="">version="1.0" encoding="UTF-8" standalone="no"?&gt;&lt;presence
xmlns="urn:ietf:params:xml:ns:pidf"
xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"
xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid"
entity=<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:sip:roberto@192.168.2.92">"sip:roberto@192.168.2.92"</a>&gt;&lt;dm:person
id="p3619"&gt;&lt;rpid:activities/&gt;&lt;/dm:person&gt;&lt;tuple

</pre>
                      </blockquote>
                    </blockquote>
                  </blockquote>
                </blockquote>
                <pre wrap="">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-abbreviated" href="mailto: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)
</pre>
                <blockquote type="cite">
                  <blockquote type="cite">
                    <blockquote type="cite">
                      <pre wrap="">Seems like the statement does not insert the "sender" although it is
mandatory. If "sender" is really mandatory, then it seems the
</pre>
                    </blockquote>
                  </blockquote>
                </blockquote>
                <pre wrap="">statement
</pre>
                <blockquote type="cite">
                  <blockquote type="cite">
                    <blockquote type="cite">
                      <pre wrap="">is buggy.
</pre>
                    </blockquote>
                    <pre wrap="">how does look the corresponding presentity mysql table, does it
</pre>
                  </blockquote>
                </blockquote>
                <pre wrap="">has the same
</pre>
                <blockquote type="cite">
                  <blockquote type="cite">
                    <pre wrap="">constraint or not?
</pre>
                  </blockquote>
                  <pre wrap="">Anyway I can confirm that removing the constraint the problem
of presence backed by postgresql seems solved.

</pre>
                  <blockquote type="cite">
                    <blockquote type="cite">
                      <pre wrap="">regards
Klaus

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users
</pre>
                    </blockquote>
                  </blockquote>
                </blockquote>
                <pre wrap="">mailing list
</pre>
                <blockquote type="cite">
                  <blockquote type="cite">
                    <blockquote type="cite">
                      <pre wrap=""><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-rfc2396E" href="mailto:sr-users@lists.sip-router.org">&lt;mailto:sr-users@lists.sip-router.org&gt;</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>
                    <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
</pre>
                  </blockquote>
                </blockquote>
                <pre wrap="">list
</pre>
                <blockquote type="cite">
                  <blockquote type="cite">
                    <pre wrap=""><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-rfc2396E" href="mailto:sr-users@lists.sip-router.org">&lt;mailto:sr-users@lists.sip-router.org&gt;</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>
                  <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-rfc2396E" href="mailto:sr-users@lists.sip-router.org">&lt;mailto:sr-users@lists.sip-router.org&gt;</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>
                <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-rfc2396E" href="mailto:sr-users@lists.sip-router.org">&lt;mailto:sr-users@lists.sip-router.org&gt;</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>




_______________________________________________
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>
              <pre wrap="">-- 
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>


_______________________________________________
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>
            <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>
          <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>
        <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>
      <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>