<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: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 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 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 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 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 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>
    <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++;
}