[sr-dev] git:master: imc README updates. Configuration files works with 4.0.0 now.

Olle E. Johansson oej at edvina.net
Fri Feb 8 22:13:50 CET 2013


Module: sip-router
Branch: master
Commit: f38eaeda810730a10a0b67ee42ae629642cdebc2
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f38eaeda810730a10a0b67ee42ae629642cdebc2

Author: Olle E. Johansson <oej at edvina.net>
Committer: Olle E. Johansson <oej at edvina.net>
Date:   Fri Feb  8 22:13:17 2013 +0100

imc README updates. Configuration files works with 4.0.0 now.

---

 modules/imc/README            |   20 +++++-----
 modules/imc/doc/imc.cfg       |   91 ++++++++++++++++++++---------------------
 modules/imc/doc/imc_admin.xml |    6 +-
 3 files changed, 58 insertions(+), 59 deletions(-)

diff --git a/modules/imc/README b/modules/imc/README
index 003cd75..c6220be 100644
--- a/modules/imc/README
+++ b/modules/imc/README
@@ -105,8 +105,8 @@ Chapter 1. Admin Guide
 
    This 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.
+   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,
    where user can send commands to create a new conference room. Once the
@@ -114,8 +114,8 @@ Chapter 1. Admin Guide
    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
+   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.
 
 2. Dependencies
@@ -126,7 +126,7 @@ Chapter 1. Admin Guide
 2.1. Kamailio Modules
 
    The following modules must be loaded before this module:
-     * mysql.
+     * db_mysql.
      * tm.
 
 2.2. External Libraries or Applications
@@ -149,7 +149,7 @@ Chapter 1. Admin Guide
 
    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
 ...
@@ -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()
 
    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
@@ -261,7 +261,7 @@ if(is_method("MESSAGE)
    5.1. imc_list_rooms
    5.2. imc_list_members
 
-5.1. imc_list_rooms
+5.1.  imc_list_rooms
 
    Lists of the IM Conferencing rooms.
 
@@ -273,7 +273,7 @@ if(is_method("MESSAGE)
                 :imc_list_rooms:_reply_fifo_file_
                 _empty_line_
 
-5.2. imc_list_members
+5.2.  imc_list_members
 
    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
 
    Number of active IM Conferencing rooms.
 
diff --git a/modules/imc/doc/imc.cfg b/modules/imc/doc/imc.cfg
index f1ae07f..d156812 100644
--- a/modules/imc/doc/imc.cfg
+++ b/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
 log_stderror=yes  # log to stderr (cmd line: -E)
 
@@ -15,29 +15,29 @@ dns=off           # (cmd. line: -r)
 rev_dns=off       # (cmd. line: -R)
 port=5060
 
-listen=192.168.2.132
 alias="stefan.lo"
 
 # ------------------ 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 ---------------
 
 # -- mi_fifo params --
 
-modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")
+modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
 
 # -- usrloc params --
 
@@ -53,7 +53,7 @@ modparam("usrloc", "db_mode", 0)
 
 # -- imc params --
 modparam("imc", "imc_cmd_start_char", "#")
-modparam("imc|usrloc", "db_url", "mysql://openser:openserrw@192.168.2.132/openser")
+modparam("imc|usrloc", "db_url", "mysql://kamailio:kamailiorw@192.168.2.132/kamailio")
 
 # -- tm params --
 
@@ -63,41 +63,40 @@ modparam("tm", "wt_timer", 10 )
 
 
 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 -
-		if(is_method("REGISTER")) {
-			save("location");
-			exit;
-		}
+	if(is_method("REGISTER")) {
+		save("location");
+		exit;
+	}
         
-		if(uri=~"sip:q.*@")
-		{
+	if(uri=~"sip:q.*@")
+	{
 	        # 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();
+	};
 }
diff --git a/modules/imc/doc/imc_admin.xml b/modules/imc/doc/imc_admin.xml
index aeecfa4..d3f7477 100644
--- a/modules/imc/doc/imc_admin.xml
+++ b/modules/imc/doc/imc_admin.xml
@@ -18,7 +18,7 @@
 	<para>
 		This 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
+		embedded in MESSAGE body, because there are just a few SIP UA clients
 		which have GUI for IM conferencing.
 	</para>
 	<para>
@@ -28,7 +28,7 @@
 	</para>
 	<para>
 	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
 	messages and commands.
 	</para>
@@ -42,7 +42,7 @@
 			<itemizedlist>
 			<listitem>
 			<para>
-				<emphasis>mysql</emphasis>.
+				<emphasis>db_mysql</emphasis>.
 			</para>
 			</listitem>
 			<listitem>




More information about the sr-dev mailing list