Hello again,
I got through the problem of adding new user, by writing these two lines
to ser.cfg:
lookup("aliases");
setflag(1);
Its strange, because it seems that if this isn't done, the serctl command
doesn't allow adding new users.
Nevertheless, here's the debugging of the serctl command when I still had
the problem:
[root@klingon sbin]# serctl add user1 user1 user1(a)klingon.av.it.pt
+ PID_FILE=/var/run/ser.pid
+ SYSLOG=1
+ STARTOPTIONS=
++ dirname /usr/local/sbin/serctl
+ DIR=/usr/local/sbin
+ SERBIN=/usr/local/sbin/ser
+ '[' -z '' ']'
+ SER_FIFO=/tmp/ser_fifo
+ '[' -z '' ']'
+ WATCH_PERIOD=2
+ '[' -z '' ']'
+ SQL_DB=ser
+ '[' -z '' ']'
+ SQL_HOST=localhost
+ '[' -z '' ']'
+ SQL_USER=ser
+ '[' -z '' ']'
+ RO_USER=serro
+ '[' -z '' ']'
+ RO_PW=47serro11
+ GENHA1=gen_ha1
+ MYSQL=mysql
+ SER=sr
+ LAST_LINE=tail -1
+ VERIFY_ACL=1
+ ACL_GROUPS=local ld int voicemail free-pstn
+ FOREVER=2020-05-28 21:32:15
+ FOREVER_REL=1073741823
+ VERSION=$Revision: 1.76 $
+ '[' -z '' ']'
+ UL_TABLE=location
+ USER_COLUMN=username
+ CALLID_COLUMN=callid
+ '[' -z '' ']'
+ SUB_TABLE=subscriber
+ REALM_COLUMN=domain
+ HA1_COLUMN=HA1
+ HA1B_COLUMN=HA1B
+ PASSWORD_COLUMN=password
+ RPID_COLUMN=rpid
+ SUBSCRIBER_COLUMN=username
+ EMAIL_COLUMN=email_address
+ SUB_CREATED_COLUMN=datetime_created
+ SUB_MODIFIED_COLUMN=datetime_modified
+ PHP_LIB_COLUMN=phplib_id
+ '[' -z '' ']'
+ ACL_TABLE=grp
+ ACL_USER_COLUMN=username
+ ACL_DOMAIN_COLUMN=domain
+ ACL_GROUP_COLUMN=grp
+ ACL_MODIFIED_COLUMN=last_modified
+ ACL_DOMAIN_COLUMN=domain
+ '[' -z '' ']'
+ ALS_TABLE=aliases
+ A_USER_COLUMN=username
+ A_CONTACT_COLUMN=contact
+ A_EXPIRES_COLUMN=expires
+ A_Q_COLUMN=q
+ A_CALLID_COLUMN=callid
+ A_CSEQ_COLUMN=cseq
+ A_LAST_MODIFIED_COLUMN=last_modified
+ DOMAIN_TABLE=domain
+ '[' -z '' ']'
+ URI_TABLE=uri
+ URIUSER_COLUMN=uri_user
+ MODIFIED_COLUMN=last_modified
+ FIFO_DBG=0
+ EGREP=egrep
+ export PW
+ '[' 4 -ne 4 ']'
+ shift
+ credentials user1 user1
+ set_user user1
++ echo user1
++ awk -F @ '{print $1}'
+ SERUSER=user1
++ echo user1
++ awk -F @ '{print $2}'
+ SERDOMAIN=
+ '[' -z '' ']'
+ SERDOMAIN=klingon.av.it.pt
+ '[' -z klingon.av.it.pt ']'
++ gen_ha1 user1 klingon.av.it.pt user1
+ HA1=b2b56ee9986b1d259d12a8babf993634
+ '[' 0 -ne 0 ']'
++ gen_ha1 user1(a)klingon.av.it.pt klingon.av.it.pt user1
+ HA1B=08f6a51d434cad750f7190b8152c19a4
+ '[' 0 -ne 0 ']'
+ prompt_pw
+ '[' -z '' ']'
++ stty -g
+
savetty=500:5:bf:8a3b:3:1c:7f:15:4:0:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0
:0:0:0:0:0:0:0:0:0
+ printf 'MySql password: '
MySql password: + stty -echo
+ read PW
+ stty
500:5:bf:8a3b:3:1c:7f:15:4:0:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0
:0:0:0:0:0
+ echo
+ is_user user1
+ QUERY=select count(*) from subscriber where
username='user1' and domain='klingon.av.it.pt';
++ sql_ro_query 'select count(*) from subscriber where
username='\''user1'\'' and
domain='\''klingon.av.it.pt'\'';'
++ mysql -h localhost -u serro -p47serro11 -e 'select count(*) from
subscriber where username='\''user1'\'' and
domain='\''klingon.av.it.pt'\''; ;' ser
++ grep -v ERROR
++ tail -1
+ CNT=0
+ '[' 00 -eq 0 ']'
+ false
+ '[' 1 -eq 0 ']'
+ grep 404
+ fifo_cmd ul_show_contact aliases user1(a)klingon.av.it.pt
+ '[' 00 -eq 1 ']'
+ '[' 3 -lt 1 ']'
+ name=ser_receiver_3472
+ path=/tmp/ser_receiver_3472
+ '[' '!' -w /tmp/ser_fifo ']'
+ mkfifo /tmp/ser_receiver_3472
+ '[' 0 -ne 0 ']'
+ chmod a+w /tmp/ser_receiver_3472
+ CMD=:ul_show_contact:ser_receiver_3472\n
+ shift
+ '[' -n aliases ']'
+ CMD=:ul_show_contact:ser_receiver_3472\naliases\n
+ shift
+ '[' -n user1(a)klingon.av.it.pt ']'
+
CMD=:ul_show_contact:ser_receiver_3472\naliases\nuser1@klingon.av.it.pt\n
+ shift
+ '[' -n '' ']'
+
CMD=:ul_show_contact:ser_receiver_3472\naliases\nuser1@klingon.av.it.pt\n\n
+ trap 'rm -f /tmp/ser_receiver_3472; kill 0' 2
+ cat
+ filter_fl
+ awk 'BEGIN {line=0;IGNORECASE=1;}
{line++}
line==1 && /^200 ok/ { next }
{ print }'
+ printf
':ul_show_contact:ser_receiver_3472\naliases\nuser1@klingon.av.it.pt\n\n'
+ wait
+ rm /tmp/ser_receiver_3472
+ '[' 00 -eq 1 ']'
+ '[' 1 -ne 0 ']'
+ echo error: overlap with an existing alias
error: overlap with an existing alias
+ exit 1