Hi Dears,
I'm trying to configure Kamailio as SBC in multi home mode for
Asterisk by authenticating the inbound SIP registration
requests,i'm following this tutorial
http://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb
to achieve this goal. i have modified the necessary changes
like the Asterisk DB URL and the SIP table name and Username
and password column and verified the Mysql connection.
My topology like this Asterisk (192.168.100.10)
<----Internal:192.168.100.1---->Kamailio<---External:192.168.50.1----->
SIP Phone (192.168.50.2)
But when trying to register a SIP phone Kamailio generates
these error messages
Nov 22 17:19:20 debian /usr/local/sbin/kamailio[6434]: ERROR:
db_mysql [km_dbase.c:122]: db_mysql_submit_query(): driver
error on query: Unknown column 'secret' in 'field list'
Nov 22 17:19:20 debian /usr/local/sbin/kamailio[6434]: ERROR:
<core> [db_query.c:132]: db_do_query_internal(): error
while submitting query
Nov 22 17:19:20 debian /usr/local/sbin/kamailio[6434]: ERROR:
auth_db [authorize.c:175]: get_ha1(): failed to query database
The Auth_DB Params in the configuration file is as follows.
# ----- auth_db params -----
#!ifdef WITH_AUTH
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "load_credentials", "")
#!ifdef WITH_ASTERISK
modparam("auth_db", "user_column", "account")
modparam("auth_db", "password_column", "secret")
modparam("auth_db", "db_url", DBASTURL)
modparam("auth_db", "version_table", 0)
#!else
modparam("auth_db", "db_url", DBURL)
modparam("auth_db", "password_column", "password")
modparam("auth_db", "use_domain", MULTIDOMAIN)
#!endif
I tried also to give the Auth_DB module all the paramaters like
this but still receiving the same error ! So any ideas about the
cause of the problem and how to solve it please ?
# ----- auth_db params -----
#!ifdef WITH_AUTH
modparam("auth_db", "user_column", "account")
modparam("auth_db", "password_column", "secret")
modparam("auth_db", "db_url", "mysql://
sipuser:sippassword@192.168.100.10/asterisk")
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "load_credentials", "")
#!ifdef WITH_ASTERISK
modparam("auth_db", "user_column", "account")
modparam("auth_db", "password_column", "secret")
modparam("auth_db", "db_url", "mysql://
sipuser:sippassword@192.168.100.10/asterisk")
modparam("auth_db", "version_table", 0)
#!else
modparam("auth_db", "db_url", "db_url","mysql://
sipuser:sippassword@192.168.100.10/asterisk")
modparam("auth_db", "password_column", "secret")
modparam("auth_db", "user_column", "account")
modparam("auth_db", "use_domain", MULTIDOMAIN)
#!endif