<html><body><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 size="2" face="Arial"><hr size="1"><b><span style="font-weight:bold;">From:</span></b> Daniel-Constantine Mierla &lt;miconda@gmail.com&gt;<br><b><span style="font-weight: bold;">To:</span></b> SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -Users Mailing List &lt;sr-users@lists.sip-router.org&gt;<br><b><span style="font-weight: bold;">Cc:</span></b> SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - UsersMailing List &lt;sr-users@lists.sip-router.org&gt;<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 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="sip:roberto@192.168.2.92"&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;sip:roberto@192.168.2.92&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 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 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 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 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 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 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 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 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></body></html>