Copyright © 2006 voice-system.ro
db_url
(str)rooms_table
(str)members_table
(str)hash_size
(integer)imc_cmd_start_char
(str)imc_manager()
imc_list_rooms
imc_list_members
active_rooms
db_url
parameterrooms_table
parametermembers_table
parameterhash_size
parameterimc_cmd_start_char
parameterimc_manager()
functionThis module offers support for instant message conference. It follows the architecture of IRC channels, you can send commands embedded in MESSAGE body, because there are no SIP UA clients which have GUI for IM conferencing.
You have to define an URI corresponding to im conferencing manager, where user can send commands to create a new conference room. Once the conference room is created, users can send commands directly to conferece's URI.
To ease the integration in the configuration file, the interpreter of the IMC commands are embeded in the module, from configuration poin of view, there is only one function which has to be executed for both messages and commands.
The following libraries or applications must be installed before running OpenSER with this module loaded:
None.
db_url
(str)The database url.
The default value is "mysql://openser:openserrw@localhost/openser".
members_table
(str)The name of the table storing IMC members.
The default value is "imc_members".
hash_size
(integer)The power of 2 to get the size of the hash table used for storing members and rooms.
The default value is 4 (resultimg in hash size 16).
imc_cmd_start_char
(str)The character which indicates that the body of the message is a command.
The default value is "#".
imc_manager()
Handles Message method.It detects if the body of the message is a conference command.If so it executes it, otherwise it sends the message to all the members in the room.
This function can be used from REQUEST_ROUTE.
imc_list_rooms
Lists of the IM Conferencing rooms.
Name: imc_list_rooms
Parameters: none
MI FIFO Command Format:
:imc_list_rooms:_reply_fifo_file_ _empty_line_
imc_list_members
Listing of the members in IM Conferencing rooms.
Name: imc_list_members
Parameters:
_room_ : the room for which you want to list the members
MI FIFO Command Format:
:imc_list_members:_reply_fifo_file_ _room_ _empty_line_
A command is identified by the starting character. A command must be written in one line. By default, the starting character is '#'. You can change it via "imc_cmd_start_char" parameter.
Next picture presents the list of commands and their parameters.
Example 1-7. List of commands
... 1.create -creates a conference room -takes 2 parameters: 1) the name of the room 2)optional- "private" -if present the created room is private and new members can be added only though invitations -the user is added as the first member and owner of the room -eg: #create chat-000 private 2.join -makes the user member of a room -takes one optional parameter - the address of the room -if not present it will be considered to be the address in the To header of the message -if the room does not exist the command is treated as create -eg:join sip:chat-000@openser.org, or just, #join, sent to sip:chat-000@openser.org 3.invite -invites a user to become a member of a room -takes 2 parameters: 1)the complete address of the user 2)the address of the room -if not present it will be considered to be the address in the To header of the message -only certain users have the right to invite other user: the owner and the administrators -eg: #invite sip:john@openser.org sip:chat-000@openser.org or #invite john@openser.org sent to sip:chat-000@openser.org 4.accept -accepting an invitation -takes one optional parameter - the address of the room - if not present it will be considered to be the address in the To header of the message -eg: #accept sip:john@openser.org 5.deny -rejects an invitation -the parameter is the same as for accept 6.remove -deletes a member from a room -takes 2 parameters: 1)the complete address of the member 2)the address of the room -if not present it will be considered to be the address in the To header of the message -only certain members have the right to remove other members -eg: #remove sip:john@openser.org, sent to sip:chat-000@openser.org 7.exit -leaving a room -takes one optional parameter - the address of the room - if not present it will be considered to be the address in the To header of the message -if the user is the owner of the room, the room will be destroyed 8.destroy -removing a room -the parameter is the same as for exit -only the owner of a room has the right to destroy it 9.list -list members in a room ...
Before running OpenSER with IMC, you have to setup the database tables where the module will store the data. For that, if the tables were not created by the installation script or you choose to install everything by yourself you can use the imc-create.sql SQL script in the database directories in the openser/scripts folder as template. You can also find the complete database documentation on the project webpage, http://www.openser-project.org/docs/db-tables/openser-db-devel.html.
Take a look at http://www.openser-project.org/.
First at all check if your question was already answered on one of our mailing lists:
User Mailing List - http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
Developer Mailing List - http://lists.openser-project.org/cgi-bin/mailman/listinfo/devel
E-mails regarding any stable OpenSER release should be sent to
<users@lists.openser-project.org>
and e-mails regarding development versions
should be sent to <devel@lists.openser-project.org>
.
If you want to keep the mail private, send it to
<team@lists.openser-project.org>
.
Please follow the guidelines provided at: http://sourceforge.net/tracker/?group_id=139143.