Hello,

thanks for report and troubleshooting.

Can you make a pull request with the patch that you think is fixing the issue? It will be easier to review and merge if allok. Use the github for that:

- https://github.com/kamailio/kamailio/pulls

Cheers,
Daniel

On 17/10/15 02:32, Pavlo Karbovnyk wrote:
Good Day All.

I run into following problem:
(It may be helpful for other people how have similar problem)

kamctl add 1000 password
database engine 'PGSQL' loaded
Control engine 'FIFO' loaded
is_user: user counter=0                   <--- showing counter=0
check_db_alias: alias counter=            <--- showing counter= nothing
INFO: user '1000' already exists as alias

============================================================
how to fix it :

in kamctl locate a function

check_db_alias() {
.....
      CNT=`$DBROCMD "$QUERY" | $EGREP -v ERROR | $LAST_LINE`
.....
}

replace with CNT command with following:

check_db_alias() {
.....
      CNT=`$DBROCMD "$QUERY" "$DBRAWPARAMS" | $EGREP -v ERROR | $LAST_LINE`
.....
}

============================================================
after this

kamctl add 1000 password
database engine 'PGSQL' loaded
Control engine 'FIFO' loaded
is_user: user counter=0
check_db_alias: alias counter=0
pgsql_query: /usr/bin/psql  -A -q -t -P fieldsep=' ' -h localhost -U kamailio kamailio -c 'insert into subscriber (username, domain,ha1,ha1b,password)  values ('1000','127.0.0.1','6fda0594de6ea94b03a12fdd998758ae','31e118ac5b09f071858740d6125d901d','');'
new user '1000' added

Regards Pavlo.


_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com