[SR-Users] XCap Server + Postgre

Asgaroth 00asgaroth00 at gmail.com
Wed Aug 12 18:17:53 CEST 2015


Hi Igor,

 

I personally don’t use the xcap module, but looking at that error message, it seems to me that Kamailio cannot find the subscriber table which it will use to lookup the authentication details.

Are you sure you have your Kamailio database and Kamailio database related settings setup properly?

 

Cheers

 

From: sr-users [mailto:sr-users-bounces at lists.sip-router.org] On Behalf Of Igor Olhovskiy
Sent: Wednesday 12 August 2015 11:37
To: sr-users at lists.sip-router.org
Subject: [SR-Users] XCap Server + Postgre

 

Hi!

I'm experience really strange behavior of Kamailio.

Right now it's using postgre database

When trying to implement XCAP server capabilities, according to http://kamailio.org/docs/modules/4.3.x/modules/xcap_server.html#idp76784

on a block

    if (!www_authorize("xcap", "subscriber"))
    {
        www_challenge("xcap", "0");
        exit;
    }

While trying to test it via browser (user test, pass test)

I've got these errors in log

Aug 12 12:34:57 sip01 /usr/sbin/kamailio[7655]: WARNING: db_postgres [km_dbase.c:235]: db_postgres_submit_query(): postgres result check failed with code 7 (PGRES_FATAL_ERROR)

Aug 12 12:34:57 sip01 /usr/sbin/kamailio[7655]: WARNING: db_postgres [km_dbase.c:239]: db_postgres_submit_query(): postgres query command failed, connection status 0, error [ERROR:  relation "subscriber" does not exist#012LINE 1: select password from subscriber where extension='test' AND u...#012                             ^#012]

Aug 12 12:34:57 sip01 /usr/sbin/kamailio[7655]: WARNING: db_postgres [km_dbase.c:235]: db_postgres_submit_query(): postgres result check failed with code 7 (PGRES_FATAL_ERROR)

Aug 12 12:34:57 sip01 /usr/sbin/kamailio[7655]: WARNING: db_postgres [km_dbase.c:239]: db_postgres_submit_query(): postgres query command failed, connection status 0, error [ERROR:  relation "subscriber" does not exist#012LINE 1: select password from subscriber where extension='test' AND u...#012                             ^#012]

Aug 12 12:34:57 sip01 /usr/sbin/kamailio[7655]: WARNING: db_postgres [km_dbase.c:235]: db_postgres_submit_query(): postgres result check failed with code 7 (PGRES_FATAL_ERROR)

Aug 12 12:34:57 sip01 /usr/sbin/kamailio[7655]: WARNING: db_postgres [km_dbase.c:239]: db_postgres_submit_query(): postgres query command failed, connection status 0, error [ERROR:  relation "subscriber" does not exist#012LINE 1: select password from subscriber where extension='test' AND u...#012                             ^#012]

Aug 12 12:34:57 sip01 /usr/sbin/kamailio[7655]: ERROR: db_postgres [km_dbase.c:247]: db_postgres_submit_query(): 0x7f3fb0660b10 PQsendQuery Error: ERROR:  relation "subscriber" does not exist#012LINE 1: select password from subscriber where extension='test' AND u...#012                             ^#012 Query: select password from subscriber where extension='test' AND user_context='xcap'

Aug 12 12:34:57 sip01 /usr/sbin/kamailio[7655]: ERROR: <core> [db_query.c:132]: db_do_query_internal(): error while submitting query

Aug 12 12:34:57 sip01 /usr/sbin/kamailio[7655]: ERROR: auth_db [authorize.c:175]: get_ha1(): failed to query database

 

Without this block, I don't get user auth.

Is it a bug or it's mine misconfiguration?

-- 

Best regards,

Igor

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150812/dad6d8b8/attachment.html>


More information about the sr-users mailing list