osipconsole uses the wrong quote character in it's SQL statements. osipconsole uses double quotes to enclose parameters. However, Postgres needs string parameters to be enclosed in single quotes. Double quotes, to postgres, indicate a colum name.
A simple add subscriber in osipconsole:
OpenSIPS$:add 1234@blah 1234
Used database is PostgreSQL
1234 blah
Entry could not be retrieved from tableERROR: column "1234" does not exist
Retrieving user 1234@blah from dbaliases failedERROR: column "1234" does not exist
Alias 1234@blah does not exist!
Introducing the new user 1234@blah to subscriber table failedERROR: column "1234" does not exist
This problem does not exist in opensipctl.That uses single quotes and works fine with Postgres.
# /usr/local/sbin/opensipsctl add 2345@blah 1234
pgsql_query: /usr/bin/psql -A -q -t -P fieldsep=' ' -h localhost -U opensips opensips -c 'insert into subscriber (username, domain,ha1,ha1b,password) values ('2345','blah','6bc52aec50b4af97f338b0d406234afa','5cb004acd453ef4e8548dfb19ab23ae4','1234');'
new user '2345@blah' added
Hi,
I have fixed this a couple of days ago, when another error was reported. It has been fixed on 1.5 and also on trunk. Please check if it works for you now.
Regards,
Iulia
Works fine in trunk now,
Thanks.