check again the same query see if you have any duplicates
 
select count(*) from subscriber;
 
ram

On Thu, Aug 28, 2008 at 7:11 PM, Alex R. S. M <alex_rsm@hotmail.com> wrote:
Hi,

Ijust added mysql module to my openser 1.2 and tried to test it by adding a couple of SIP users to the database.
I can verified there is only one default sub in the database:

mysql> select count(*) from subscriber;
+----------+
| count(*) |
+----------+
|        1 |
+----------+
1 row in set (0.00 sec)

mysql> show tables;


I can add the first subscriber:

# openserctl add 100 100 100@localhost
-e database engine 'MYSQL' loaded
-e Control engine 'FIFO' loaded
-e is_user: user counter=0
-e check_db_alias: alias counter=0
-e mysql_query
-e insert
-e 0
-e new user '100' added

Howver, When I try to add the second subscriber I am getting the following error:

# openserctl add 101 101 101@localhost
-e database engine 'MYSQL' loaded
-e Control engine 'FIFO' loaded
-e is_user: user counter=0
-e check_db_alias: alias counter=0
ERROR 1062 (23000) at line 1: Duplicate entry '' for key 3
-e mysql_query
-e insert
-e 0
-e \E[37;31mERROR: introducing the new user '101' to the database failed
root@bling1:/etc/openser#

What might be the problem?

Thanks,
Alex


See what people are saying about Windows Live. Check out featured posts. Check It Out!

_______________________________________________
Users mailing list
Users@lists.kamailio.org
http://lists.kamailio.org/cgi-bin/mailman/listinfo/users