Hi, in order to use chat rooms I'd like to manage them just from a web interface that handles imc_rooms and imc_members table, but sincerely I don't know how to use them, I don't see doc about hot to use the tables.
What I'd like is to have "fixed" chat rooms without the need of creating them with commands, but via web.
Could anyone explain me how to use those tables?
Please, explain me with this example:
- I want a chat room for domain "domain1.org" and name "chat1". - I want three members for that room: - user1@domain1.org - user2@domain1.org - other_user@other_domain.org
Could you fill the tables please?
** imc_rooms table ** name domain flag
** imc_members table ** username domain room flag
What is flag for? I suppose it's for features as private/public tables and so.
Maybe it's not possible to manage those tables and the only way is using chat commands?
Thanks for any help and best regards.
El Viernes, 19 de Octubre de 2007, Iñaki Baz Castillo escribió:
Could anyone explain me how to use those tables?
Ok, now I see that the data about rooms and member exist in tables but is lost after OpenSer restart. :(
In fact I have debugged MySQL and see:
21190 Query insert into imc_rooms (name,domain,flag ) values ('chat1','domain1.org',0) 21190 Query insert into imc_members (username,domain,flag,room ) values ('ibc','domain1.org',1,'sip:chat1@domain1.org') 21190 Query insert into imc_members (username,domain,flag,room ) values ('800','domain2.org',1,'sip:chat1@domain1.org')
During that I get those errors when restarting OpenSer:
0(31176) submit_query: Duplicate entry 'chat1-domain1.org' for key 2 0(31176) db_insert: Error while submitting query 0(31176) imc:destroy: ERROR while inserting into table imc_rooms
And continuing with MySQL debug:
21190 Query select name,domain,flag from imc_rooms 21199 Query select username,domain,flag from imc_members where room='sip:chat1@domain1.org' 21199 Query delete from imc_members 21199 Query delete from imc_room
It seems that OpenSer saves in MySQL the rooms info when OpenSer is stopped and empty tables when starting and loading into memory rooms info.
Is this? This makes impossible to manage room chats via web interface :(
Any explanation please?
On 10/20/07 00:08, Iñaki Baz Castillo wrote:
El Viernes, 19 de Octubre de 2007, Iñaki Baz Castillo escribió:
Could anyone explain me how to use those tables?
Ok, now I see that the data about rooms and member exist in tables but is lost after OpenSer restart. :(
In fact I have debugged MySQL and see:
21190 Query insert into imc_rooms (name,domain,flag ) values ('chat1','domain1.org',0) 21190 Query insert into imc_members (username,domain,flag,room ) values ('ibc','domain1.org',1,'sip:chat1@domain1.org') 21190 Query insert into imc_members (username,domain,flag,room ) values ('800','domain2.org',1,'sip:chat1@domain1.org')
During that I get those errors when restarting OpenSer:
0(31176) submit_query: Duplicate entry 'chat1-domain1.org' for key 2 0(31176) db_insert: Error while submitting query 0(31176) imc:destroy: ERROR while inserting into table imc_rooms
And continuing with MySQL debug:
21190 Query select name,domain,flag from imc_rooms 21199 Query select username,domain,flag from imc_members where room='sip:chat1@domain1.org' 21199 Query delete from imc_members 21199 Query delete from imc_room
It seems that OpenSer saves in MySQL the rooms info when OpenSer is stopped and empty tables when starting and loading into memory rooms info.
Is this? This makes impossible to manage room chats via web interface :(
Any explanation please?
the data afferent to the rooms is saved for recovery upon restart. There are MI commands where you can interact more real-time with the imc module. If you want to have imc sync'ing database more often, add a feature request, maybe someone will implement it for 1.4.
Daniel