Thanks Klaus,
After change the LAST_LINE in the kamctlrc, the tail error is going, but it still says user "xxxx" already exists.
# tail tool LAST_LINE="tail -1"
I find the script below returns "false" which makes the kamctl exit.
# params: user # output: false if exists, true otherwise is_user() { set_user $1 QUERY="select count(*) from $SUB_TABLE where \ $SUBSCRIBER_COLUMN='$OSERUSER' and $REALM_COLUMN='$OSERDOMAIN';" CNT=`$DBROCMD "$QUERY" "$DBRAWPARAMS" | $EGREP -v ERROR | $LAST_LINE` mdbg "is_user: user counter=$CNT" if [ "$CNT" = "0" ] ; then false else true fi }
What could be the cause?
Thanks,
Kevin
Date: Thu, 10 Jun 2010 10:11:18 +0200 From: klaus.mailinglists@pernau.at To: kevin.jzh@hotmail.com CC: sr-users@lists.sip-router.org Subject: Re: [SR-Users] Fail to add user account
Am 10.06.2010 03:12, schrieb JinKevin:
AppSer01:root@/usr/local/kamailio-3.0/sbin$ kamctl add 2000 2000 usage: tail [+/-[n][lbc][f]] [file] tail [+/-[n][l][r|f]] [file] INFO: user '2000' already exists
between your kamctl command and the error message (user '2000' already exists) is an error produced by the tail command.
Looks like kamctl uses tail in a way which is not supported on your OS.
regards klaus
_________________________________________________________________ 约会说不清地方?来试试微软地图最新msn互动功能! http://ditu.live.com/?form=TL&swm=1