[SR-Users] Kamailio presence server problem with PostgreSQL

Bucur Marius bucur_marius_ovidiu at yahoo.com
Wed Jul 20 19:00:06 CEST 2011


Hi,

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

presentity.c:357
if( presentity->sender)
{
query_cols[n_query_cols] = &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->sender->s;
query_vals[n_query_cols].val.str_val.len = presentity->sender->len;
n_query_cols++;
}

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 <miconda at gmail.com>
To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -Users Mailing List <sr-users at lists.sip-router.org>
Cc: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - UsersMailing List <sr-users at lists.sip-router.org>
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 <kernel at tekno-soft.it> wrote:

> On 07/20/2011 05:34 PM, Roberto Fichera wrote:
>> On 07/20/2011 05:18 PM, Klaus Darilion wrote:
>>> Am 20.07.2011 17:00, schrieb Roberto Fichera:
>>>> ERROR:  null value in column "sender" violates not-null constraint
>>>> STATEMENT:  insert into presentity
>>>> (domain,username,event,etag,expires,body,received_time ) values
>>>> ('192.168.2.92','roberto','presence','a.1311173612.4970.2.0',1311177224,'<?xml
>>>> version="1.0" encoding="UTF-8" standalone="no"?><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="sip:roberto at 192.168.2.92"><dm:person
>>>> id="p3619"><rpid:activities/></dm:person><tuple
>>>> id="t9285"><status><basic>open</basic></status><contact>sip:roberto at 192.168.2.92</contact><note>Online</note></tuple></presence>',1311173624)
>>> Seems like the statement does not insert the "sender" although it is
>>> mandatory. If "sender" is really mandatory, then it seems the statement
>>> is buggy.
>> how does look the corresponding presentity mysql table, does it has the same
>> constraint or not?
> 
> Anyway I can confirm that removing the constraint the problem
> of presence backed by postgresql seems solved.
> 
>> 
>>> regards
>>> Klaus
>>> 
>>> _______________________________________________
>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>> sr-users at lists.sip-router.org
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>> 
>> 
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>> 
> 
> 
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users at lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20110720/da04e57c/attachment.htm>


More information about the sr-users mailing list