<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->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] = &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->sender->s;</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>query_vals[n_query_cols].val.str_val.len = presentity->sender->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 <miconda@gmail.com><br><b><span style="font-weight: bold;">To:</span></b> SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -Users Mailing List <sr-users@lists.sip-router.org><br><b><span style="font-weight: bold;">Cc:</span></b> SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - UsersMailing List <sr-users@lists.sip-router.org><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 <<a ymailto="mailto:kernel@tekno-soft.it" href="mailto:kernel@tekno-soft.it">kernel@tekno-soft.it</a>> wrote:<br><br>> On 07/20/2011 05:34 PM, Roberto Fichera wrote:<br>>> On 07/20/2011 05:18 PM, Klaus Darilion wrote:<br>>>> Am 20.07.2011 17:00, schrieb Roberto Fichera:<br>>>>> ERROR: null value in column "sender" violates not-null constraint<br>>>>> STATEMENT: insert into
presentity<br>>>>> (domain,username,event,etag,expires,body,received_time ) values<br>>>>> ('192.168.2.92','roberto','presence','a.1311173612.4970.2.0',1311177224,'<?xml<br>>>>> version="1.0" encoding="UTF-8" standalone="no"?><presence<br>>>>> xmlns="urn:ietf:params:xml:ns:pidf"<br>>>>> xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"<br>>>>> xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid"<br>>>>> entity="sip:roberto@192.168.2.92"><dm:person<br>>>>> id="p3619"><rpid:activities/></dm:person><tuple<br>>>>> id="t9285"><status><basic>open</basic></status><contact>sip:roberto@192.168.2.92</contact><note>Online</note></tuple></presence>',1311173624)<br>>>> Seems like the statement does not insert the "sender" although it is<br>>>> mandatory.
If "sender" is really mandatory, then it seems the statement<br>>>> is buggy.<br>>> how does look the corresponding presentity mysql table, does it has the same<br>>> constraint or not?<br>> <br>> Anyway I can confirm that removing the constraint the problem<br>> of presence backed by postgresql seems solved.<br>> <br>>> <br>>>> regards<br>>>> Klaus<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>>>
_______________________________________________<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>> <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>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>