Przeglądaj źródła

imc README updates. Configuration files works with 4.0.0 now.

Olle E. Johansson 12 lat temu
rodzic
commit
f38eaeda81
3 zmienionych plików z 58 dodań i 59 usunięć
  1. 10 10
      modules/imc/README
  2. 45 46
      modules/imc/doc/imc.cfg
  3. 3 3
      modules/imc/doc/imc_admin.xml

+ 10 - 10
modules/imc/README

@@ -105,8 +105,8 @@ Chapter 1. Admin Guide
 
 
    This module offers support for instant message conference. It follows
    This module offers support for instant message conference. It follows
    the architecture of IRC channels, you can send commands embedded in
    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.
+   MESSAGE body, because there are just a few SIP UA clients which have
+   GUI for IM conferencing.
 
 
    You have to define an URI corresponding to im conferencing manager,
    You have to define an URI corresponding to im conferencing manager,
    where user can send commands to create a new conference room. Once the
    where user can send commands to create a new conference room. Once the
@@ -114,8 +114,8 @@ Chapter 1. Admin Guide
    conferece's URI.
    conferece's URI.
 
 
    To ease the integration in the configuration file, the interpreter of
    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
+   the IMC commands are embeded in the module. From a configuration point
+   of view, there is only one function which has to be executed for both
    messages and commands.
    messages and commands.
 
 
 2. Dependencies
 2. Dependencies
@@ -126,7 +126,7 @@ Chapter 1. Admin Guide
 2.1. Kamailio Modules
 2.1. Kamailio Modules
 
 
    The following modules must be loaded before this module:
    The following modules must be loaded before this module:
-     * mysql.
+     * db_mysql.
      * tm.
      * tm.
 
 
 2.2. External Libraries or Applications
 2.2. External Libraries or Applications
@@ -149,7 +149,7 @@ Chapter 1. Admin Guide
 
 
    The database url.
    The database url.
 
 
-   The default value is "mysql://openser:openserrw@localhost/openser".
+   The default value is "mysql://kamailio:kamailiorw@localhost/kamailio".
 
 
    Example 1.1. Set db_url parameter
    Example 1.1. Set db_url parameter
 ...
 ...
@@ -232,7 +232,7 @@ modparam("imc", "extra_hdrs", "P-Flags: 3\r\n")
 
 
    4.1. imc_manager()
    4.1. imc_manager()
 
 
-4.1. imc_manager()
+4.1.  imc_manager()
 
 
    Handles Message method.It detects if the body of the message is a
    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
    conference command.If so it executes it, otherwise it sends the message
@@ -261,7 +261,7 @@ if(is_method("MESSAGE)
    5.1. imc_list_rooms
    5.1. imc_list_rooms
    5.2. imc_list_members
    5.2. imc_list_members
 
 
-5.1. imc_list_rooms
+5.1.  imc_list_rooms
 
 
    Lists of the IM Conferencing rooms.
    Lists of the IM Conferencing rooms.
 
 
@@ -273,7 +273,7 @@ if(is_method("MESSAGE)
                 :imc_list_rooms:_reply_fifo_file_
                 :imc_list_rooms:_reply_fifo_file_
                 _empty_line_
                 _empty_line_
 
 
-5.2. imc_list_members
+5.2.  imc_list_members
 
 
    Listing of the members in IM Conferencing rooms.
    Listing of the members in IM Conferencing rooms.
 
 
@@ -291,7 +291,7 @@ if(is_method("MESSAGE)
 
 
    6.1. active_rooms
    6.1. active_rooms
 
 
-6.1. active_rooms
+6.1.  active_rooms
 
 
    Number of active IM Conferencing rooms.
    Number of active IM Conferencing rooms.
 
 

+ 45 - 46
modules/imc/doc/imc.cfg

@@ -4,7 +4,7 @@
 #
 #
 
 
 
 
-debug=5           # debug level (cmd line: -dddddddddd)
+debug=2           # debug level (cmd line: -dddddddddd)
 fork=no           # don't fork
 fork=no           # don't fork
 log_stderror=yes  # log to stderr (cmd line: -E)
 log_stderror=yes  # log to stderr (cmd line: -E)
 
 
@@ -15,29 +15,29 @@ dns=off           # (cmd. line: -r)
 rev_dns=off       # (cmd. line: -R)
 rev_dns=off       # (cmd. line: -R)
 port=5060
 port=5060
 
 
-listen=192.168.2.132
 alias="stefan.lo"
 alias="stefan.lo"
 
 
 # ------------------ module loading ----------------------------------
 # ------------------ module loading ----------------------------------
+mpath="/usr/local/lib64/kamailio/modules"
 
 
-loadmodule "modules/mysql/mysql.so"
+loadmodule "db_mysql.so"
 
 
-loadmodule "modules/textops/textops.so"
+loadmodule "textops.so"
 
 
-loadmodule "modules/sl/sl.so"
-loadmodule "modules/maxfwd/maxfwd.so"
-loadmodule "modules/imc/imc.so"
-loadmodule "modules/tm/tm.so"
-loadmodule "modules/xlog/xlog.so"
-loadmodule "modules/registrar/registrar.so"
-loadmodule "modules/usrloc/usrloc.so"
-loadmodule "modules/mi_fifo/mi_fifo.so"
+loadmodule "sl.so"
+loadmodule "maxfwd.so"
+loadmodule "imc.so"
+loadmodule "tm.so"
+loadmodule "xlog.so"
+loadmodule "registrar.so"
+loadmodule "usrloc.so"
+loadmodule "mi_fifo.so"
 
 
 # ----------------- setting module-specific parameters ---------------
 # ----------------- setting module-specific parameters ---------------
 
 
 # -- mi_fifo params --
 # -- mi_fifo params --
 
 
-modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")
+modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
 
 
 # -- usrloc params --
 # -- usrloc params --
 
 
@@ -53,7 +53,7 @@ modparam("usrloc", "db_mode", 0)
 
 
 # -- imc params --
 # -- imc params --
 modparam("imc", "imc_cmd_start_char", "#")
 modparam("imc", "imc_cmd_start_char", "#")
-modparam("imc|usrloc", "db_url", "mysql://openser:openser[email protected]/openser")
+modparam("imc|usrloc", "db_url", "mysql://kamailio:kamaili[email protected]/kamailio")
 
 
 # -- tm params --
 # -- tm params --
 
 
@@ -63,41 +63,40 @@ modparam("tm", "wt_timer", 10 )
 
 
 
 
 route{
 route{
-    if ( !mf_process_maxfwd_header("10") )
-    {
-        sl_send_reply("483","To Many Hops");
-        drop();
-    };
+    	if ( !mf_process_maxfwd_header("10") )
+    	{
+        	sl_send_reply("483","To Many Hops");
+        	drop();
+    	};
 
 
         # registrations -
         # registrations -
-		if(is_method("REGISTER")) {
-			save("location");
-			exit;
-		}
+	if(is_method("REGISTER")) {
+		save("location");
+		exit;
+	}
         
         
-		if(uri=~"sip:q.*@")
-		{
+	if(uri=~"sip:q.*@")
+	{
 	        # IMC - message
 	        # IMC - message
-			xdbg("script: message from [$fu] r-uri [$ru] msg [$rb]\n");
-			if(is_method("MESSAGE"))
-			{
-				log("MESSAGE received -> processing with imc\n");
-				sl_send_reply("200", "ok");
-				imc_manager();			
-				exit;
-			} else {
-				sl_send_reply("404", "not found");
-				exit;
-			};
-   		} else {
-			xdbg("script: message not for room, from [$fu] r-uri [$ru] msg [$rb]\n");
-			if(!lookup("location"))
-			{
-				sl_send_reply("404", "not found");
-				exit;
-			}
-			t_relay();
-			#sl_send_reply("200", "ok");
-			exit();
+		xdbg("script: message from [$fu] r-uri [$ru] msg [$rb]\n");
+		if(is_method("MESSAGE"))
+		{
+			log("MESSAGE received -> processing with imc\n");
+			sl_send_reply("200", "ok");
+			imc_manager();			
+			exit;
+		} else {
+			sl_send_reply("404", "not found");
+			exit;
 		};
 		};
+   	} else {
+		xdbg("script: message not for room, from [$fu] r-uri [$ru] msg [$rb]\n");
+		if(!lookup("location"))
+		{
+			sl_send_reply("404", "not found");
+			exit;
+		}
+		t_relay();
+		exit();
+	};
 }
 }

+ 3 - 3
modules/imc/doc/imc_admin.xml

@@ -18,7 +18,7 @@
 	<para>
 	<para>
 		This module offers support for instant message conference. It
 		This module offers support for instant message conference. It
 		follows the architecture of IRC channels, you can send commands
 		follows the architecture of IRC channels, you can send commands
-		embedded in MESSAGE body, because there are no SIP UA clients
+		embedded in MESSAGE body, because there are just a few SIP UA clients
 		which have GUI for IM conferencing.
 		which have GUI for IM conferencing.
 	</para>
 	</para>
 	<para>
 	<para>
@@ -28,7 +28,7 @@
 	</para>
 	</para>
 	<para>
 	<para>
 	To ease the integration in the configuration file, the interpreter of
 	To ease the integration in the configuration file, the interpreter of
-	the IMC commands are embeded in the module, from configuration poin of
+	the IMC commands are embeded in the module. From a configuration point of
 	view, there is only one function which has to be executed for both
 	view, there is only one function which has to be executed for both
 	messages and commands.
 	messages and commands.
 	</para>
 	</para>
@@ -42,7 +42,7 @@
 			<itemizedlist>
 			<itemizedlist>
 			<listitem>
 			<listitem>
 			<para>
 			<para>
-				<emphasis>mysql</emphasis>.
+				<emphasis>db_mysql</emphasis>.
 			</para>
 			</para>
 			</listitem>
 			</listitem>
 			<listitem>
 			<listitem>