瀏覽代碼

Merge branch 'master' of ssh://git.sip-router.org/sip-router

* 'master' of ssh://git.sip-router.org/sip-router:
  all: OPENSER_MOD_INTERFACE replaced with KAMAILIO_MOD_INTERFACE
  all: fixed matrix doc generation and updates for &defaultdb;
  all: replaced db_url static value with &defaultrodb; in docs
  all: replaced openser with kamailio in license and comments
  dialog(k): run event route after setting cfg dlg vars
  rtpproxy: regenerated readme for flags x and 3
  rtpproxy: documented flag 3
  rtpproxy: propage flags from rtpproxy_manage() to unforce_rtp_proxy()
  pkg/gentoo: Added ebuild for v3.3.2
  Makefile: added uninstall target
  modules_k/db_sqlite: fix memory leak in sqlops query
  kamailio.cfg: handle UPDATE through nat traversal logic
  auth_db(k): new function is_subscriber(uri, dbtable, flags)
Olle E. Johansson 13 年之前
父節點
當前提交
12d95216e1
共有 100 個文件被更改,包括 709 次插入346 次删除
  1. 45 0
      Makefile
  2. 1 1
      Makefile.modules
  3. 2 1
      config.h
  4. 6 4
      etc/kamailio.cfg
  5. 2 2
      lib/kcore/faked_msg.c
  6. 4 4
      lib/kcore/statistics.c
  7. 2 2
      lib/kcore/statistics.h
  8. 1 1
      modules/app_lua/Makefile
  9. 1 1
      modules/app_mono/Makefile
  10. 1 1
      modules/app_python/Makefile
  11. 1 1
      modules/async/Makefile
  12. 1 1
      modules/avpops/Makefile
  13. 25 24
      modules/avpops/README
  14. 1 1
      modules/carrierroute/Makefile
  15. 1 1
      modules/carrierroute/doc/carrierroute_db.xml
  16. 1 1
      modules/corex/Makefile
  17. 6 6
      modules/counters/README
  18. 1 1
      modules/ctl/README
  19. 4 4
      modules/db_berkeley/bdb_lib.c
  20. 4 4
      modules/db_berkeley/km_bdb_lib.c
  21. 1 1
      modules/db_cassandra/Makefile
  22. 1 1
      modules/db_flatstore/README
  23. 3 3
      modules/db_mysql/README
  24. 1 1
      modules/db_mysql/km_dbase.c
  25. 1 1
      modules/debugger/Makefile
  26. 12 12
      modules/debugger/README
  27. 1 1
      modules/dialplan/Makefile
  28. 1 1
      modules/dialplan/doc/dialplan_admin.xml
  29. 1 1
      modules/enum/Makefile
  30. 13 13
      modules/enum/README
  31. 1 1
      modules/geoip/Makefile
  32. 1 1
      modules/ipops/Makefile
  33. 24 24
      modules/ipops/README
  34. 1 1
      modules/json/Makefile
  35. 1 1
      modules/jsonrpc-c/Makefile
  36. 1 1
      modules/lcr/Makefile
  37. 4 4
      modules/malloc_test/README
  38. 1 1
      modules/matrix/Makefile
  39. 10 10
      modules/matrix/README
  40. 2 2
      modules/matrix/doc/matrix_admin.xml
  41. 11 1
      modules/matrix/doc/matrix_db.xml
  42. 1 1
      modules/mediaproxy/Makefile
  43. 8 8
      modules/mediaproxy/README
  44. 2 2
      modules/mi_rpc/README
  45. 1 1
      modules/mqueue/Makefile
  46. 26 5
      modules/mqueue/README
  47. 1 1
      modules/msrp/Makefile
  48. 8 8
      modules/msrp/README
  49. 1 1
      modules/mtree/Makefile
  50. 15 15
      modules/mtree/README
  51. 1 1
      modules/ndb_redis/Makefile
  52. 1 1
      modules/pdb/Makefile
  53. 6 6
      modules/pdb/README
  54. 1 1
      modules/peering/Makefile
  55. 1 1
      modules/pipelimit/Makefile
  56. 9 9
      modules/pipelimit/README
  57. 1 1
      modules/ratelimit/Makefile
  58. 13 13
      modules/ratelimit/README
  59. 1 1
      modules/ratelimit/ratelimit.c
  60. 1 1
      modules/rtpproxy/Makefile
  61. 14 0
      modules/rtpproxy/README
  62. 4 1
      modules/rtpproxy/doc/rtpproxy_admin.xml
  63. 44 5
      modules/rtpproxy/rtpproxy.c
  64. 1 1
      modules/sdpops/Makefile
  65. 1 1
      modules/sipcapture/Makefile
  66. 4 4
      modules/sipcapture/README
  67. 4 4
      modules/sms/README
  68. 1 1
      modules/tls/Makefile
  69. 1 1
      modules/tmrec/Makefile
  70. 45 45
      modules/tmrec/README
  71. 1 1
      modules/topoh/Makefile
  72. 1 1
      modules/topoh/README
  73. 1 1
      modules/utils/Makefile
  74. 1 1
      modules/websocket/Makefile
  75. 1 1
      modules/xhttp/Makefile
  76. 2 2
      modules/xhttp/README
  77. 1 1
      modules/xhttp_rpc/Makefile
  78. 2 2
      modules/xhttp_rpc/README
  79. 1 1
      modules/xmlops/Makefile
  80. 2 2
      modules/xmlops/pv_xml.c
  81. 2 2
      modules/xmlops/pv_xml.h
  82. 2 2
      modules/xmlops/xmlops_mod.c
  83. 1 1
      modules_k/acc/Makefile
  84. 1 1
      modules_k/acc_radius/Makefile
  85. 1 1
      modules_k/alias_db/Makefile
  86. 11 11
      modules_k/alias_db/README
  87. 1 1
      modules_k/auth_db/Makefile
  88. 35 0
      modules_k/auth_db/README
  89. 63 0
      modules_k/auth_db/authdb_mod.c
  90. 72 0
      modules_k/auth_db/authorize.c
  91. 5 0
      modules_k/auth_db/authorize.h
  92. 52 0
      modules_k/auth_db/doc/auth_db_admin.xml
  93. 1 1
      modules_k/auth_diameter/Makefile
  94. 10 10
      modules_k/auth_diameter/README
  95. 1 1
      modules_k/auth_radius/Makefile
  96. 1 1
      modules_k/benchmark/Makefile
  97. 12 12
      modules_k/benchmark/README
  98. 2 2
      modules_k/benchmark/benchmark.c
  99. 1 1
      modules_k/call_control/Makefile
  100. 3 3
      modules_k/call_control/README

+ 45 - 0
Makefile

@@ -1210,3 +1210,48 @@ printvar:
 	@echo "Content of <$(v)> is:"
 	@echo -n $($(v))
 	@echo
+
+.PHONY: uninstall
+uninstall:
+	@echo "-Installation details:"
+	@echo " *PREFIX Path is: ${PREFIX}"
+	@echo " *BINDIR Path is: ${bin_prefix}/${bin_dir}"
+	@echo " *CFGDIR Path is: ${cfg_prefix}/${cfg_dir}"
+	@echo " *DOCDIR Path is: ${doc_prefix}/${doc_dir}"
+	@echo " *LIBDIR Path is: ${lib_prefix}/${lib_dir}"
+	@echo " *MANDIR Path is: ${man_prefix}/${man_dir}"
+	@echo " *SHRDIR Path is: ${share_prefix}/${share_dir}"
+	@if [ "${PREFIX}" != "/usr/local" ] ; then \
+		echo "-Custom PREFIX Path" ; \
+		if [ "${PREFIX}" = "/" -o "${PREFIX}" = "/usr" ] ; then \
+			echo "-Custom installation in a system folder" ; \
+			echo "-This is advanced installation" ; \
+			echo "-You seem to be in control of what files were deployed" ; \
+			echo "-Folders listed above should give hints about what to delete" ; \
+		else \
+			echo "-Uninstall should be just removal of the folder: ${PREFIX}" ; \
+			echo "-WARNING: before deleting, be sure ${PREFIX} is not a system directory" ; \
+		fi ; \
+	else \
+		echo "-Run following commands to uninstall:" ; \
+		echo ; \
+		echo "rm ${bin_prefix}/${bin_dir}${MAIN_NAME}" ; \
+		if [ "${FLAVOUR}" = "kamailio" ] ; then \
+			echo "rm ${bin_prefix}/${bin_dir}kamctl" ; \
+			echo "rm ${bin_prefix}/${bin_dir}kamdbctl" ; \
+		fi ; \
+		echo "rm ${bin_prefix}/${bin_dir}sercmd" ; \
+		echo "rm ${man_prefix}/${man_dir}man5/$(MAIN_NAME).cfg.5" ; \
+		echo "rm ${man_prefix}/${man_dir}man8/$(MAIN_NAME).8" ; \
+		if [ "${FLAVOUR}" = "kamailio" ] ; then \
+			echo "rm ${man_prefix}/${man_dir}kamctl.8" ; \
+			echo "rm ${man_prefix}/${man_dir}kamdbctl.8" ; \
+		fi ; \
+		echo "rm -rf ${cfg_prefix}/${cfg_dir}" ; \
+		echo "rm -rf ${doc_prefix}/${doc_dir}" ; \
+		echo "rm -rf ${lib_prefix}/${lib_dir}" ; \
+		echo "rm -rf ${share_prefix}/${share_dir}" ; \
+		echo ; \
+		echo "-WARNING: before running the commands, be sure they don't delete any system directory or file" ; \
+	fi ;
+	@echo

+ 1 - 1
Makefile.modules

@@ -77,7 +77,7 @@ DEFS += -DMOD_NAME='"$(MOD_NAME)"'
 
 
 ifeq (,$(findstring -DSER_MOD_INTERFACE, $(DEFS)))
-	MODIFACE=-DOPENSER_MOD_INTERFACE
+	MODIFACE=-DKAMAILIO_MOD_INTERFACE
 else
 	MODIFACE=-DSER_MOD_INTERFACE
 endif

+ 2 - 1
config.h

@@ -190,7 +190,8 @@
 
 #define PATH_MAX_GUESS	1024		/*!< maximum path length */
 
-#ifdef OPENSER_MOD_INTERFACE
+#if defined KAMAILIO_MOD_INTERFACE || defined OPENSER_MOD_INTERFACE || \
+		defined MOD_INTERFACE_V1
 	#define DEFAULT_DB_URL "mysql://openser:openserrw@localhost/openser"
 	#define DEFAULT_DB_URL_LEN (sizeof(DEFAULT_DB_URL) - 1)
 	#define DEFAULT_RODB_URL "mysql://openserro:openserro@localhost/openser"

+ 6 - 4
etc/kamailio.cfg

@@ -520,12 +520,14 @@ route[RELAY] {
 
 	# enable additional event routes for forwarded requests
 	# - serial forking, RTP relaying handling, a.s.o.
-	if (is_method("INVITE|SUBSCRIBE")) {
-		t_on_branch("MANAGE_BRANCH");
-		t_on_reply("MANAGE_REPLY");
+	if (is_method("INVITE|BYE|SUBSCRIBE|UPDATE")) {
+		if(!t_is_set("branch_route")) t_on_branch("MANAGE_BRANCH");
+	}
+	if (is_method("INVITE|SUBSCRIBE|UPDATE")) {
+		if(!t_is_set("onreply_route")) t_on_reply("MANAGE_REPLY");
 	}
 	if (is_method("INVITE")) {
-		t_on_failure("MANAGE_FAILURE");
+		if(!t_is_set("failure_route")) t_on_failure("MANAGE_FAILURE");
 	}
 
 	if (!t_relay()) {

+ 2 - 2
lib/kcore/faked_msg.c

@@ -5,12 +5,12 @@
  *
  * This file is part of kamailio, a free SIP server.
  *
- * openser is free software; you can redistribute it and/or modify
+ * Kamailio is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version
  *
- * openser is distributed in the hope that it will be useful,
+ * Kamailio is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  * GNU General Public License for more details.

+ 4 - 4
lib/kcore/statistics.c

@@ -82,7 +82,7 @@ stat_var *get_stat_var_from_num_code(unsigned int numerical_code, int out_codes)
 #define MAX_PROC_BUFFER 256
 
 /*!
- * This function will retrieve a list of all ip addresses and ports that OpenSER
+ * This function will retrieve a list of all ip addresses and ports that Kamailio
  * is listening on, with respect to the transport protocol specified with
  * 'protocol'. 
  *
@@ -357,7 +357,7 @@ static int get_used_waiting_queue(
 	fp = fopen(fileToOpen, "r");
 
 	if (fp == NULL) {
-		LM_ERR("Could not open %s. openserMsgQueu eDepth and its related"
+		LM_ERR("Could not open %s. kamailioMsgQueueDepth and its related"
 				" alarms will not be available.\n", fileToOpen);
 		return 0;
 	}
@@ -373,7 +373,7 @@ static int get_used_waiting_queue(
 			/* Only add rx_queue if the line just parsed corresponds 
 			 * to an interface we are listening on.  We do this
 			 * check because it is possible that this system has
-			 * other network interfaces that OpenSER has been told
+			 * other network interfaces that Kamailio has been told
 			 * to ignore. */
 			if (match_ip_and_port(ipAddress, interfaceList, listSize)) {
 				waitingQueueSize += rx_queue;
@@ -388,7 +388,7 @@ static int get_used_waiting_queue(
 
 /*!
  * Returns the sum of the number of bytes waiting to be consumed on all network
- * interfaces and transports that OpenSER is listening on. 
+ * interfaces and transports that Kamailio is listening on. 
  *
  * Note: This currently only works on systems supporting the /proc/net/[tcp|udp]
  *       interface.  On other systems, zero will always be returned.  To change

+ 2 - 2
lib/kcore/statistics.h

@@ -61,7 +61,7 @@ stat_var *get_stat_var_from_num_code(unsigned int numerical_code, int in_codes);
 
 
 /*!
- * This function will retrieve a list of all ip addresses and ports that OpenSER
+ * This function will retrieve a list of all ip addresses and ports that Kamailio
  * is listening on, with respect to the transport protocol specified with
  * 'protocol'. 
  *
@@ -96,7 +96,7 @@ int get_socket_list_from_proto(int **ipList, int protocol);
 
 /*!
  * Returns the sum of the number of bytes waiting to be consumed on all network
- * interfaces and transports that OpenSER is listening on. 
+ * interfaces and transports that Kamailio is listening on. 
  *
  * Note: This currently only works on systems supporting the /proc/net/[tcp|udp]
  *       interface.  On other systems, zero will always be returned.  Details of

+ 1 - 1
modules/app_lua/Makefile

@@ -54,7 +54,7 @@ else
 	LIBS = $(shell lua-config --libs)
 endif
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/kcore/kcore

+ 1 - 1
modules/app_mono/Makefile

@@ -14,7 +14,7 @@ else
 	LIBS = $(shell pkg-config --libs mono-2)
 endif
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/kcore/kcore

+ 1 - 1
modules/app_python/Makefile

@@ -25,7 +25,7 @@ LIBS+=-pthread
 endif
 
 DEFS+=-I${PYTHON_INCDIR}
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 include ../../Makefile.modules
 

+ 1 - 1
modules/async/Makefile

@@ -7,6 +7,6 @@ auto_gen=
 NAME=async.so
 LIBS=
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 include ../../Makefile.modules

+ 1 - 1
modules/avpops/Makefile

@@ -10,7 +10,7 @@ auto_gen=
 NAME=avpops.so
 LIBS= 
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/srdb1/srdb1

+ 25 - 24
modules/avpops/README

@@ -10,7 +10,7 @@ Ramona-Elena Modroiu
 
    <[email protected]>
 
-   Copyright © 2004, 2005 Voice Sistem SRL
+   Copyright © 2004, 2005 Voice Sistem SRL
      __________________________________________________________________
 
    Table of Contents
@@ -239,7 +239,7 @@ modparam("avpops","use_domain",1)
 
    Name of column containing the uuid (unique user id).
 
-   Default value is “uuid�.
+   Default value is "uuid".
 
    Example 1.5. Set uuid_column parameter
 ...
@@ -250,7 +250,7 @@ modparam("avpops","uuid_column","uuid")
 
    Name of column containing the username.
 
-   Default value is “username�.
+   Default value is "username".
 
    Example 1.6. Set username_column parameter
 ...
@@ -261,7 +261,7 @@ modparam("avpops","username_column","username")
 
    Name of column containing the domain name.
 
-   Default value is “domain�.
+   Default value is "domain".
 
    Example 1.7. Set domain_column parameter
 ...
@@ -272,7 +272,7 @@ modparam("avpops","domain_column","domain")
 
    Name of column containing the attribute name (AVP name).
 
-   Default value is “attribute�.
+   Default value is "attribute".
 
    Example 1.8. Set attribute_column parameter
 ...
@@ -283,7 +283,7 @@ modparam("avpops","attribute_column","attribute")
 
    Name of column containing the AVP value.
 
-   Default value is “value�.
+   Default value is "value".
 
    Example 1.9. Set value_column parameter
 ...
@@ -294,7 +294,7 @@ modparam("avpops","value_column","value")
 
    Name of integer column containing the AVP type.
 
-   Default value is “type�.
+   Default value is "type".
 
    Possible column values are
      * 0 - AVP with string name and string value
@@ -322,7 +322,7 @@ modparam("avpops","type_column","type")
           + 'value_type='('integer'|'string')
           + 'table='string
 
-   Default value is “NULL�.
+   Default value is "NULL".
 
    Example 1.11. Set db_scheme parameter
 ...
@@ -346,7 +346,7 @@ modparam("avpops","db_scheme",
    5.12. is_avp_set(name)
    5.13. avp_print()
 
-5.1.  avp_db_load(source,name)
+5.1. avp_db_load(source,name)
 
    Loads from DB into memory the AVPs corresponding to the given source.
    If given, it sets the script flags for loaded AVPs. It returns true if
@@ -384,7 +384,7 @@ avp_db_load("$uuid","$avp(s:404fwd)/fwd_table");
 avp_db_load("$ru","$avp(i1:123)/$some_scheme");
 ...
 
-5.2.  avp_db_store(source,name)
+5.2. avp_db_store(source,name)
 
    Stores to DB the AVPs corresponding to the given source.
 
@@ -400,7 +400,7 @@ avp_db_store("$tu","$avp(i:678)");
 avp_db_store("$ru/username","$avp(email)");
 ...
 
-5.3.  avp_db_delete(source,name)
+5.3. avp_db_delete(source,name)
 
    Deletes from DB the AVPs corresponding to the given source.
 
@@ -417,7 +417,7 @@ avp_db_delete("$ru/username","$avp(email)");
 avp_db_delete("$uuid","$avp(s:404fwd)/fwd_table");
 ...
 
-5.4.  avp_db_query(query[,dest])
+5.4. avp_db_query(query[,dest])
 
    Make a database query and store the result in AVPs.
 
@@ -431,8 +431,8 @@ avp_db_delete("$uuid","$avp(s:404fwd)/fwd_table");
        used in the query makes you vulnerable to SQL injection, e.g. make
        it possible for an outside attacker to alter your database content.
      * dest - a list with AVP names where to store the result. The format
-       is “$avp(name1);$avp(name2);...�. If this parameter is ommited, the
-       result is stored in “$avp(i:1);$avp(i:2);...�. If the result gives
+       is "$avp(name1);$avp(name2);...". If this parameter is ommited, the
+       result is stored in "$avp(i:1);$avp(i:2);...". If the result gives
        many rows, then multiple AVPs with corresponding name will be
        added. The value type of the AVP (string or integer) will be
        derived from the type of the columns. Please note that only this
@@ -455,7 +455,7 @@ avp_db_query("select password, ha1 from subscriber where username='$tu'",
 avp_db_query("delete from subscriber");
 ...
 
-5.5.  avp_delete(name)
+5.5. avp_delete(name)
 
    Deletes from memory the AVPs with name or, if empty, all AVPs.
 
@@ -463,7 +463,8 @@ avp_db_query("delete from subscriber");
      * name - which AVPs will be deleted from memory. Parameter syntax is:
           + name = (matching_flags|avp_name|avp_alias)['/'flag]
           + matching_flags = please refer to avp_db_load() function
-          + flag = 'g'|'G'
+          + flag = 'g'|'G' = deletes not only the last value but the
+            complete AVP.
 
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
    BRANCH_ROUTE, LOCAL_ROUTE and ONREPLY_ROUTE.
@@ -476,7 +477,7 @@ avp_delete("i");
 avp_delete("a3");
 ...
 
-5.6.  avp_pushto(destination,name)
+5.6. avp_pushto(destination,name)
 
    Pushes the value of AVP(s) into the SIP message.
 
@@ -506,7 +507,7 @@ avp_pushto("$du","$avp(i:679)");
 avp_pushto("$br","$avp(i:680)");
 ...
 
-5.7.  avp_check(name,op_value)
+5.7. avp_check(name,op_value)
 
    Checks the value of the AVP(s) against an operator and value.
 
@@ -548,7 +549,7 @@ avp_check("$avp(s:foo)","re/sip:.*@bar.net/g");
 avp_check("$avp(s:foo)","fm/$avp(fm_avp)/g");
 ...
 
-5.8.  avp_copy(old_name,new_name)
+5.8. avp_copy(old_name,new_name)
 
    Copy / move an avp under a new name.
 
@@ -569,7 +570,7 @@ avp_copy("$avp(i:678)", "$avp(s:345)/g");
 avp_copy("$avp(old)","$avp(new)/gd");
 ...
 
-5.9.  avp_printf(dest, format)
+5.9. avp_printf(dest, format)
 
    NOTE: since Kamailio 1.3.0 the function has been moved to core and it
    is an alias to pv_printf().
@@ -593,7 +594,7 @@ avp_copy("$avp(old)","$avp(new)/gd");
 avp_printf("$avp(i:20)", "This is a $rm request with call-id $hdr(call-id)");
 ...
 
-5.10.  avp_subst(avps, subst)
+5.10. avp_subst(avps, subst)
 
    Perl/sed-like subst applied to AVPs having string value.
 
@@ -635,7 +636,7 @@ avp_subst("$avp(i:678)/$avp(i:679)/g", "/(.*)@(.*)/\1@$rd/");
    after the first src_avp is processed, it will be added in avp list and
    next processing will use it.
 
-5.11.  avp_op(name,op_value)
+5.11. avp_op(name,op_value)
 
    Different integer operations with avps.
 
@@ -667,7 +668,7 @@ avp_op("$avp(i:678)", "add/i:345/g");
 avp_op("$avp(number)","sub/$avp(number2)/d");
 ...
 
-5.12.  is_avp_set(name)
+5.12. is_avp_set(name)
 
    Check if any AVP with name is set.
 
@@ -686,7 +687,7 @@ if(is_avp_set("$avp(i:678)"))
     log("AVP with integer id 678 exists\n");
 ...
 
-5.13.  avp_print()
+5.13. avp_print()
 
    Prints the list with all the AVPs from memory. This is only a
    helper/debug function.

+ 1 - 1
modules/carrierroute/Makefile

@@ -30,7 +30,7 @@ endif
 DEFS+=$(CONFUSEDEFS)
 LIBS=$(CONFUSELIBS)
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/trie/trie $(SERLIBPATH)/srdb1/srdb1 $(SERLIBPATH)/kmi/kmi $(SERLIBPATH)/kcore/kcore

+ 1 - 1
modules/carrierroute/doc/carrierroute_db.xml

@@ -23,7 +23,7 @@ ALL CHANGES DONE HERE WILL BE LOST IF THE FILE IS REGENERATED
     <title><varname>db_url</varname> (String)</title>
     <para>URL to the database containing the data.</para>
     <para>
-      <emphasis>Default value is <quote>mysql://openserro:openserro@localhost/openser</quote>.</emphasis>
+      <emphasis>Default value is <quote>&defaultrodb;</quote>.</emphasis>
     </para>
     <example>
       <title>Set <varname>db_url</varname> parameter</title>

+ 1 - 1
modules/corex/Makefile

@@ -7,6 +7,6 @@ auto_gen=
 NAME=corex.so
 LIBS=
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 include ../../Makefile.modules

+ 6 - 6
modules/counters/README

@@ -4,7 +4,7 @@ Andrei Pelinescu-Onciul
 
    iptelorg GmbH
 
-   Copyright © 2010 iptelorg GmbH
+   Copyright © 2010 iptelorg GmbH
      __________________________________________________________________
 
    1.1. Overview
@@ -46,7 +46,7 @@ Andrei Pelinescu-Onciul
    is "custom script counter". The format of the declaration is:
    [group.]name[( |:)description].
 
-   Example 1.  Create a new script_counter
+   Example 1. Create a new script_counter
 modparam("counters", "script_counter", "foo")  # script.foo
 modparam("counters", "script_counter", "test.bar")  # test.bar
 modparam("counters", "script_counter", "baz example counter")  # script.baz
@@ -59,12 +59,12 @@ modparam("counters", "script_counter", "test.x:another example") # test.x
 
    Default: "script".
 
-   Example 2.  Set script_cnt_grp_name in the config file
+   Example 2. Set script_cnt_grp_name in the config file
 modparam("counters", "script_cnt_grp_name", "my_counters")
 
 1.3. Functions
 
-1.3.1.  cnt_inc([group.]name)
+1.3.1. cnt_inc([group.]name)
 
    Increments the counter group.name. The counter must be defined using
    the script_counter module parameter. If the group name is missing, the
@@ -82,7 +82,7 @@ route {
 ...
 }
 
-1.3.2.  cnt_add([group.]name, number)
+1.3.2. cnt_add([group.]name, number)
 
    Adds number the counter group.name. The counter must be defined using
    the script_counter module parameter. If the group name is missing, the
@@ -97,7 +97,7 @@ route {
 ...
 }
 
-1.3.3.  cnt_reset([group.]name)
+1.3.3. cnt_reset([group.]name)
 
    Resets the counter group.name. The counter must be defined using the
    script_counter module parameter. If the group name is missing, the

+ 1 - 1
modules/ctl/README

@@ -4,7 +4,7 @@ Andrei Pelinescu-Onciul
 
    iptelorg GmbH
 
-   Copyright Š 2009 iptelorg GmbH
+   Copyright Š 2009 iptelorg GmbH
      __________________________________________________________________
 
    1.1. Overview

+ 4 - 4
modules/db_berkeley/bdb_lib.c

@@ -291,7 +291,7 @@ int bdblib_create_dbenv(DB_ENV **_dbenv, char* _home)
 	char *progname;
 	int rc, flags;
 	
-	progname = "openser";
+	progname = "kamailio";
 	
 	/* Create an environment and initialize it for additional error * reporting. */ 
 	if ((rc = db_env_create(&env, 0)) != 0) 
@@ -516,14 +516,14 @@ void bdblib_log(int op, bdb_db_p _db_p, bdb_table_p _tp, char* _msg, int len)
  * Instead it is done on first-use (lazy-initialized) to only create handles to 
  * files (db) that we require.
  * 
- * There is one db file per openser table (eg. acc), and they should exist
+ * There is one db file per kamailio table (eg. acc), and they should exist
  * in your DB_PATH (refer to kamctlrc) directory.
  *
  * This function does _not_ create the underlying binary db tables.
  * Creating the tables MUST be manually performed before 
- * openser startup by 'kamdbctl create'
+ * kamailio startup by 'kamdbctl create'
  *
- * Function returns NULL on error, which will cause openser to exit.
+ * Function returns NULL on error, which will cause kamailio to exit.
  *
  */
 bdb_table_p bdblib_create_table(bdb_db_p _db, str *_s)

+ 4 - 4
modules/db_berkeley/km_bdb_lib.c

@@ -308,7 +308,7 @@ int km_bdblib_create_dbenv(DB_ENV **_dbenv, char* _home)
 	char *progname;
 	int rc, flags;
 	
-	progname = "openser";
+	progname = "kamailio";
 	
 	/* Create an environment and initialize it for additional error * reporting. */ 
 	if ((rc = db_env_create(&env, 0)) != 0) 
@@ -556,14 +556,14 @@ void km_bdblib_log(int op, table_p _tp, char* _msg, int len)
  * Instead it is done on first-use (lazy-initialized) to only create handles to 
  * files (db) that we require.
  * 
- * There is one db file per openser table (eg. acc), and they should exist
+ * There is one db file per kamailio table (eg. acc), and they should exist
  * in your DB_PATH (refer to kamctlrc) directory.
  *
  * This function does _not_ create the underlying binary db tables.
  * Creating the tables MUST be manually performed before 
- * openser startup by 'kamdbctl create'
+ * kamailio startup by 'kamdbctl create'
  *
- * Function returns NULL on error, which will cause openser to exit.
+ * Function returns NULL on error, which will cause kamailio to exit.
  *
  */
 table_p km_bdblib_create_table(database_p _db, str *_s)

+ 1 - 1
modules/db_cassandra/Makefile

@@ -14,7 +14,7 @@ NAME=db_cassandra.so
 
 THRIFT_DIR = /usr/local/include/thrift
 LIB_DIR = /usr/local/lib
-DEFS += -I${THRIFT_DIR} -DOPENSER_MOD_INTERFACE
+DEFS += -I${THRIFT_DIR} -DKAMAILIO_MOD_INTERFACE
 LIBS += -L${LIB_DIR} dbcassa_base.o cassandra_constants.o cassandra_types.o Cassandra.o -lthrift
 
 CXXFLAGS=$(CFLAGS:-Wno-deprecated option=)

+ 1 - 1
modules/db_flatstore/README

@@ -5,7 +5,7 @@ Jan Janak
    FhG FOKUS
    <[email protected]>
 
-   Copyright © 2004, 2005 FhG FOKUS
+   Copyright © 2004, 2005 FhG FOKUS
      __________________________________________________________________
 
    1.1. Overview

+ 3 - 3
modules/db_mysql/README

@@ -10,7 +10,7 @@ Daniel-Constantin Mierla
 
    <[email protected]>
 
-   Copyright © 2006 Voice Sistem SRL
+   Copyright © 2006 Voice Sistem SRL
      __________________________________________________________________
 
    Table of Contents
@@ -109,8 +109,8 @@ modparam("db_mysql", "ping_interval", 600)
    retries are done from the driver before it gives up.
 
    The read timeout parameter is ignored on MySQL driver versions prior to
-   “5.1.12�, “5.0.25� and “4.1.22�. The write timeout parameter is ignored
-   on versions prior to “5.1.12� and “5.0.25�, the “4.1� release don't
+   "5.1.12", "5.0.25" and "4.1.22". The write timeout parameter is ignored
+   on versions prior to "5.1.12" and "5.0.25", the "4.1" release don't
    support it at all.
 
    Default value is 2 (6 sec).

+ 1 - 1
modules/db_mysql/km_dbase.c

@@ -192,7 +192,7 @@ static int db_mysql_store_result(const db1_con_t* _h, db1_res_t** _r)
 		LM_DBG("freeing result set at %p\n", _r);
 		pkg_free(*_r);
 		*_r = 0;
-		/* all mem on openser API side is already freed by
+		/* all mem on Kamailio API side is already freed by
 		 * db_mysql_convert_result in case of error, but we also need
 		 * to free the mem from the mysql lib side */
 		mysql_free_result(CON_RESULT(_h));

+ 1 - 1
modules/debugger/Makefile

@@ -7,6 +7,6 @@ auto_gen=
 NAME=debugger.so
 LIBS=
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 include ../../Makefile.modules

+ 12 - 12
modules/debugger/README

@@ -10,7 +10,7 @@ Daniel-Constantin Mierla
 
    <[email protected]>
 
-   Copyright © 2010 Daniel-Constantin Mierla (asipto.com)
+   Copyright © 2010 Daniel-Constantin Mierla (asipto.com)
      __________________________________________________________________
 
    Table of Contents
@@ -143,7 +143,7 @@ Chapter 1. Admin Guide
    You can change the value at runtime without restart, globally or per
    process.
 
-   Default value is “0� (disabled).
+   Default value is "0" (disabled).
 
    Example 1.1. Set cfgtrace parameter
 ...
@@ -155,7 +155,7 @@ modparam("debugger", "cfgtrace", 1)
    Control whether every line (global) breakpoint is enabled or disabled
    at startup.
 
-   Default value is “0� (disabled).
+   Default value is "0" (disabled).
 
    Example 1.2. Set breakpoint parameter
 ...
@@ -166,7 +166,7 @@ modparam("debugger", "breakpoint", 1)
 
    What log level is to be used to print module-specific messages.
 
-   Default value is “-1� (L_ERR).
+   Default value is "-1" (L_ERR).
 
    Example 1.3. Set log_level parameter
 ...
@@ -177,7 +177,7 @@ modparam("debugger", "log_level", 1)
 
    What log facility is to be used to print module-specific messages.
 
-   Default value is “NULL� (default from core).
+   Default value is "NULL" (default from core).
 
    Example 1.4. Set log_facility parameter
 ...
@@ -188,7 +188,7 @@ modparam("debugger", "log_facility", "LOG_DAEMON")
 
    String to print before any module-specific messages.
 
-   Default value is “*** cfgtrace:�.
+   Default value is "*** cfgtrace:".
 
    Example 1.5. Set log_prefix parameter
 ...
@@ -200,7 +200,7 @@ modparam("debugger", "log_prefix", "from-debugger-with-love:")
    Microseconds to sleep before checking for new commands when waiting at
    breakpoint.
 
-   Default value is “100000� (that is 0.1 sec).
+   Default value is "100000" (that is 0.1 sec).
 
    Example 1.6. Set step_usleep parameter
 ...
@@ -214,7 +214,7 @@ modparam("debugger", "step_usleep", 500000)
    blocking RPC process forever in case the worker process 'forgets' to
    write back a reply.
 
-   Default value is “200�.
+   Default value is "200".
 
    Example 1.7. Set step_loops parameter
 ...
@@ -225,7 +225,7 @@ modparam("debugger", "step_loops", 100)
 
    4.1. dbg_breakpoint(mode)
 
-4.1.  dbg_breakpoint(mode)
+4.1. dbg_breakpoint(mode)
 
    Anchor a breakpoint at the current line of the config (the one on which
    this function is called). The 'mode' specifies whether the breakpoint
@@ -246,7 +246,7 @@ if($si=="10.0.0.10")
    5.2. dbg.trace
    5.3. dbg.bp
 
-5.1.  dbg.ls
+5.1. dbg.ls
 
    List SIP router processes with info related to interactive debugging.
 
@@ -260,7 +260,7 @@ if($si=="10.0.0.10")
                 dbg.ls
                 dbg.ls 1234
 
-5.2.  dbg.trace
+5.2. dbg.trace
 
    Control config running trace.
 
@@ -277,7 +277,7 @@ if($si=="10.0.0.10")
                 dbg.trace off
                 dbg.trace on 1234
 
-5.3.  dbg.bp
+5.3. dbg.bp
 
    Control breakpoints and config execution.
 

+ 1 - 1
modules/dialplan/Makefile

@@ -21,7 +21,7 @@ endif
 DEFS+=$(PCREDEFS)
 LIBS=$(PCRELIBS)
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/kmi/kmi

+ 1 - 1
modules/dialplan/doc/dialplan_admin.xml

@@ -113,7 +113,7 @@
 		<para>
 		<emphasis>
 			Default value is 
-				<quote>mysql://openser:openserrw@localhost/openser</quote>.
+				<quote>&defaultdb;</quote>.
 		</emphasis>
 		</para>
 		<example>

+ 1 - 1
modules/enum/Makefile

@@ -10,7 +10,7 @@ auto_gen=
 NAME=enum.so
 LIBS=
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/kcore/kcore

+ 13 - 13
modules/enum/README

@@ -8,7 +8,7 @@ Otmar Lendl
 
    <[email protected]>
 
-   Copyright © 2002, 2003 Juha Heinanen
+   Copyright © 2002, 2003 Juha Heinanen
      __________________________________________________________________
 
    Table of Contents
@@ -74,9 +74,9 @@ Chapter 1. Admin Guide
    phone number of the form +decimal-digits, where the number of digits is
    at least 2 and at most 15. Out of this number enum_query forms a domain
    name, where the digits are in reverse order and separated by dots
-   followed by domain suffix that by default is “e164.arpa.�. For example,
+   followed by domain suffix that by default is "e164.arpa.". For example,
    if the user part is +35831234567, the domain name will be
-   “7.6.5.4.3.2.1.3.8.5.3.e164.arpa.�. i_enum_query operates in a similar
+   "7.6.5.4.3.2.1.3.8.5.3.e164.arpa.". i_enum_query operates in a similar
    fashion. The only difference is that it adds a label (default "i") to
    branch off from the default, user-ENUM tree to an infrastructure ENUM
    tree.
@@ -143,7 +143,7 @@ Chapter 1. Admin Guide
    digits of an E164 number. Can be overridden by a parameter to
    enum_query.
 
-   Default value is “e164.arpa.�
+   Default value is "e164.arpa."
 
    Example 1.1. Setting domain_suffix module parameter
 modparam("enum", "domain_suffix", "e1234.arpa.")
@@ -158,7 +158,7 @@ Note
    Currently SIP Router does not support tel URIs. This means that at
    present tel_uri_params is appended as URI parameters to every URI.
 
-   Default value is “�
+   Default value is ""
 
    Example 1.2. Setting tel_uri_params module parameter
 modparam("enum", "tel_uri_params", ";npdi")
@@ -168,7 +168,7 @@ modparam("enum", "tel_uri_params", ";npdi")
    The domain suffix to be used for i_enum_query() lookups. Can be
    overridden by a parameter to i_enum_query.
 
-   Default value is “e164.arpa.�
+   Default value is "e164.arpa."
 
    Example 1.3. Setting i_enum_suffix module parameter
 modparam("enum", "i_enum_suffix", "e1234.arpa.")
@@ -178,7 +178,7 @@ modparam("enum", "i_enum_suffix", "e1234.arpa.")
    This parameter determines which label i_enum_query() will use to branch
    off to the infrastructure ENUM tree.
 
-   Default value is “"i"�
+   Default value is ""i""
 
    Example 1.4. Setting brachlabel module parameter
 modparam("enum", "branchlabel", "i")
@@ -217,7 +217,7 @@ i.1.e164.arpa.     TYPE65300  \# 14 (
 ;                               )
 9.9.9.8.7.6.5.i.4.3.2.1.e164.arpa. IN NAPTR "NAPTR content for  +1 234 5678 999"
 
-   Default value is “cc�
+   Default value is "cc"
 
    Example 1.7. Setting the bl_algorithm module parameter
 modparam("enum", "bl_algorithm", "txt")
@@ -229,10 +229,10 @@ modparam("enum", "bl_algorithm", "txt")
    4.3. i_enum_query(["suffix"[,"service"]])
    4.4. is_from_user_enum()
 
-4.1.  enum_query(["suffix"[,"service"]])
+4.1. enum_query(["suffix"[,"service"]])
 
    The function performs an enum query and rewrites the Request-URI with
-   the result of the query. See Section 1, “Overview� for more
+   the result of the query. See Section 1, "Overview" for more
    information.
 
    Meaning of the parameters is as follows:
@@ -265,11 +265,11 @@ enum_query("e164.arpa.","voice");
 enum_query("e164.arpa.","+sip+voice:sip");
 ...
 
-4.2.  enum_pv_query("pvar"[,"suffix"[,"service"]])
+4.2. enum_pv_query("pvar"[,"suffix"[,"service"]])
 
    The function performs an enum query on E.164 number stored in its
    pseudo variable argument and rewrites the Request-URI with the result
-   of the query. See Section 1, “Overview� for more information.
+   of the query. See Section 1, "Overview" for more information.
 
    Meaning of the parameters is as follows:
      * pvar - Pseudo variable that holds an E.164 number on which enum
@@ -301,7 +301,7 @@ enum_pv_query("$avp(i:100)","e164.arpa.","voice");
 enum_pv_query("$avp(i:100)","e164.arpa.","+sip+voice:sip");
 ...
 
-4.3.  i_enum_query(["suffix"[,"service"]])
+4.3. i_enum_query(["suffix"[,"service"]])
 
    The function performs an enum query and rewrites the Request-URI with
    the result of the query. This the Infrastructure-ENUM version of

+ 1 - 1
modules/geoip/Makefile

@@ -7,7 +7,7 @@ auto_gen=
 NAME=geoip.so
 LIBS= -lGeoIP
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/kmi/kmi

+ 1 - 1
modules/ipops/Makefile

@@ -9,6 +9,6 @@ auto_gen=
 NAME=ipops.so
 
 LIBS=
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 SERLIBPATH=../../lib
 include ../../Makefile.modules

+ 24 - 24
modules/ipops/README

@@ -1,16 +1,16 @@
 ipops Module
 
-Iñaki Baz Castillo
+Iñaki Baz Castillo
 
    <[email protected]>
 
 Edited by
 
-Iñaki Baz Castillo
+Iñaki Baz Castillo
 
    <[email protected]>
 
-   Copyright © 2011 Iñaki Baz Castillo
+   Copyright © 2011 Iñaki Baz Castillo
      __________________________________________________________________
 
    Table of Contents
@@ -88,7 +88,7 @@ Chapter 1. Admin Guide
    When using IPv6 in an URI (i.e. a SIP URI) such IP must be written in
    "IPv6 reference" format (which is the textual representation of the
    IPv6 enclosed between [ ] symbols). An example is
-   “sip:alice@[1080:0:0:0:8:800:200C:417A]�. This module also allows
+   "sip:alice@[1080:0:0:0:8:800:200C:417A]". This module also allows
    comparing a IPv6 with its IPv6 reference representation.
 
 2. Dependencies
@@ -122,7 +122,7 @@ Chapter 1. Admin Guide
    4.9. is_ip_rfc1918 (ip)
    4.10. is_in_subnet (ip, subnet)
 
-4.1.  is_ip (ip)
+4.1. is_ip (ip)
 
    Returns TRUE if the argument is a valid IPv4, IPv6 or IPv6 reference.
    FALSE otherwise.
@@ -133,14 +133,14 @@ Chapter 1. Admin Guide
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
    ONREPLY_ROUTE, BRANCH_ROUTE and LOCAL_ROUTE.
 
-   Example 1.1.  is_ip usage
+   Example 1.1. is_ip usage
 ...
 if (is_ip($rd)) {
   xlog("L_INFO", "RURI domain is IP\n");
 }
 ...
 
-4.2.  is_pure_ip (ip)
+4.2. is_pure_ip (ip)
 
    Returns TRUE if the argument is a valid IPv4 or IPv6. FALSE otherwise.
 
@@ -150,7 +150,7 @@ if (is_ip($rd)) {
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
    ONREPLY_ROUTE, BRANCH_ROUTE and LOCAL_ROUTE.
 
-   Example 1.2.  is_pure_ip usage
+   Example 1.2. is_pure_ip usage
 ...
 $var(ip) = "::1";
 if (is_pure_ip($var(ip))) {
@@ -158,7 +158,7 @@ if (is_pure_ip($var(ip))) {
 }
 ...
 
-4.3.  is_ipv4 (ip)
+4.3. is_ipv4 (ip)
 
    Returns TRUE if the argument is a valid IPv4. FALSE otherwise.
 
@@ -168,14 +168,14 @@ if (is_pure_ip($var(ip))) {
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
    ONREPLY_ROUTE, BRANCH_ROUTE and LOCAL_ROUTE.
 
-   Example 1.3.  is_ipv4 usage
+   Example 1.3. is_ipv4 usage
 ...
 if (is_ipv4("1.2.3.4")) {
   xlog("L_INFO", "it's IPv4\n");
 }
 ...
 
-4.4.  is_ipv6 (ip)
+4.4. is_ipv6 (ip)
 
    Returns TRUE if the argument is a valid IPv6. FALSE otherwise.
 
@@ -185,14 +185,14 @@ if (is_ipv4("1.2.3.4")) {
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
    ONREPLY_ROUTE, BRANCH_ROUTE and LOCAL_ROUTE.
 
-   Example 1.4.  is_ipv6 usage
+   Example 1.4. is_ipv6 usage
 ...
 if (is_ipv6("1080:0:0:0:8:800:200C:417A")) {
   xlog("L_INFO", "it's IPv6\n");
 }
 ...
 
-4.5.  is_ipv6_reference (ip)
+4.5. is_ipv6_reference (ip)
 
    Returns TRUE if the argument is a valid IPv6 reference. FALSE
    otherwise.
@@ -203,14 +203,14 @@ if (is_ipv6("1080:0:0:0:8:800:200C:417A")) {
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
    ONREPLY_ROUTE, BRANCH_ROUTE and LOCAL_ROUTE.
 
-   Example 1.5.  is_ipv6_reference usage
+   Example 1.5. is_ipv6_reference usage
 ...
 if (is_ipv6_reference("[1080:0:0:0:8:800:200C:417A]")) {
   xlog("L_INFO", "it's IPv6 reference\n");
 }
 ...
 
-4.6.  ip_type (ip)
+4.6. ip_type (ip)
 
    Returns the type of the given IP.
 
@@ -226,7 +226,7 @@ if (is_ipv6_reference("[1080:0:0:0:8:800:200C:417A]")) {
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
    ONREPLY_ROUTE, BRANCH_ROUTE and LOCAL_ROUTE.
 
-   Example 1.6.  ip_type usage
+   Example 1.6. ip_type usage
 ...
 ip_type($var(myip));
 switch($rc) {
@@ -245,7 +245,7 @@ switch($rc) {
 }
 ...
 
-4.7.  compare_ips (ip1, ip2)
+4.7. compare_ips (ip1, ip2)
 
    Returns TRUE if both IP's are the same. FALSE otherwise. This function
    also allows comparing an IPv6 against an IPv6 reference.
@@ -258,7 +258,7 @@ switch($rc) {
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
    ONREPLY_ROUTE, BRANCH_ROUTE and LOCAL_ROUTE.
 
-   Example 1.7.  compare_ips usage
+   Example 1.7. compare_ips usage
 ...
 if (compare_ips("1080:0000:0000:0000:0008:0800:200C:417A", "[1080::8:800:200C:41
 7A]")) {
@@ -266,7 +266,7 @@ if (compare_ips("1080:0000:0000:0000:0008:0800:200C:417A", "[1080::8:800:200C:41
 }
 ...
 
-4.8.  compare_pure_ips (ip1, ip2)
+4.8. compare_pure_ips (ip1, ip2)
 
    Returns TRUE if both IP's are the same. FALSE otherwise. This function
    does NOT allow comparing an IPv6 against an IPv6 reference.
@@ -279,14 +279,14 @@ if (compare_ips("1080:0000:0000:0000:0008:0800:200C:417A", "[1080::8:800:200C:41
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
    ONREPLY_ROUTE, BRANCH_ROUTE and LOCAL_ROUTE.
 
-   Example 1.8.  compare_pure_ips usage
+   Example 1.8. compare_pure_ips usage
 ...
 if (compare_pure_ips($si, "1080::8:800:200C:417A")) {
   xlog("L_INFO", "both are the same IP\n");
 }
 ...
 
-4.9.  is_ip_rfc1918 (ip)
+4.9. is_ip_rfc1918 (ip)
 
    Returns TRUE if the argument is a private IPv4 according to RFC 1918.
    FALSE otherwise.
@@ -297,14 +297,14 @@ if (compare_pure_ips($si, "1080::8:800:200C:417A")) {
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
    ONREPLY_ROUTE, BRANCH_ROUTE and LOCAL_ROUTE.
 
-   Example 1.9.  is_ip_rfc1918 usage
+   Example 1.9. is_ip_rfc1918 usage
 ...
 if (is_ip_rfc1918("10.0.123.123")) {
   xlog("L_INFO", "it's a private IPv4\n");
 }
 ...
 
-4.10.  is_in_subnet (ip, subnet)
+4.10. is_in_subnet (ip, subnet)
 
    Returns TRUE if the first argument is an IP address within the (CIDR
    notation) subnet in the second argument. FALSE otherwise.
@@ -317,7 +317,7 @@ if (is_ip_rfc1918("10.0.123.123")) {
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
    ONREPLY_ROUTE, BRANCH_ROUTE and LOCAL_ROUTE.
 
-   Example 1.10.  is_in_subnet usage
+   Example 1.10. is_in_subnet usage
 ...
 if (is_in_subnet("10.0.123.123", "10.0.123.1/24")) {
   xlog("L_INFO", "it's in the subnet\n");

+ 1 - 1
modules/json/Makefile

@@ -18,7 +18,7 @@ else
 	DEFS+= $(shell pkg-config --cflags json)
 	LIBS+= $(shell pkg-config --libs json)
 endif
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 SERLIBPATH=../../lib
 # SER_LIBS+=$(SERLIBPATH)/srdb1/srdb1

+ 1 - 1
modules/jsonrpc-c/Makefile

@@ -21,7 +21,7 @@ else
 	LIBS+= $(shell pkg-config --libs libevent)
 endif
  
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 SERLIBPATH=../../lib
 include ../../Makefile.modules

+ 1 - 1
modules/lcr/Makefile

@@ -23,7 +23,7 @@ endif
 DEFS+=$(PCREDEFS)
 LIBS=$(PCRELIBS)
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/srdb1/srdb1

+ 4 - 4
modules/malloc_test/README

@@ -4,7 +4,7 @@ Andrei Pelinescu-Onciul
 
    iptelorg GmbH
 
-   Copyright © 2010 iptelorg GmbH
+   Copyright © 2010 iptelorg GmbH
      __________________________________________________________________
 
    1.1. Overview
@@ -53,10 +53,10 @@ Warning
 
    It can be changed also at runtime, via the rpc interface.
 
-   Example 1.  Set check_content in the config file
+   Example 1. Set check_content in the config file
 modparam("malloc_test", "check_content", 1)
 
-   Example 2.  Set check_content at runtime via sercmd
+   Example 2. Set check_content at runtime via sercmd
 $ sercmd cfg.set_now_int malloc_test check_content 1
 
 1.3. Functions
@@ -143,7 +143,7 @@ mem_free();
    Example 8. mt.mem_rnd_alloc usage
  $ sercmd mt.mem_rnd_alloc 1 64 10240 k
 
-1.4.5.  mt.mem_test_start min max total min_int max_int total_time [unit]
+1.4.5. mt.mem_test_start min max total min_int max_int total_time [unit]
 
    Starts a malloc test that will take total_time to execute. Memory
    allocations will be performed at intervals randomly chosen between

+ 1 - 1
modules/matrix/Makefile

@@ -5,7 +5,7 @@ auto_gen=
 NAME=matrix.so
 LIBS=
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/kmi/kmi

+ 10 - 10
modules/matrix/README

@@ -11,7 +11,7 @@ Henning Westerholt
    1&1 Internet AG
    <[email protected]>
 
-   Copyright © 2008 1&1 Internet AG
+   Copyright © 2008 1&1 Internet AG
      __________________________________________________________________
 
    Table of Contents
@@ -139,7 +139,7 @@ Chapter 1. Admin Guide
 
    The URL for the database connection.
 
-   Default value is “mysql://openserro:openserro@localhost/openser�.
+   Default value is "mysql://openserro:openserro@localhost/openser".
 
    Example 1.1. Set db_url parameter
 ...
@@ -150,7 +150,7 @@ modparam("matrix", "db_url", "mysql://openserro:openserro@localhost/openser")
 
    The name of the table containing the matrix data.
 
-   Default value is “matrix�.
+   Default value is "matrix".
 
    Example 1.2. Set matrix_table parameter
 ...
@@ -161,7 +161,7 @@ modparam("matrix", "matrix_table", "matrix")
 
    The name of the column containing the first row in the matrix.
 
-   Default value is “first�.
+   Default value is "first".
 
    Example 1.3. Set matrix_first_col parameter
 ...
@@ -172,7 +172,7 @@ modparam("matrix", "matrix_first_col", "first")
 
    The name of the column containing the second row in the matrix.
 
-   Default value is “second�.
+   Default value is "second".
 
    Example 1.4. Set matrix_second_col parameter
 ...
@@ -183,7 +183,7 @@ modparam("matrix", "matrix_second_col", "second")
 
    The name of the column containing the result ID to be used.
 
-   Default value is “res�.
+   Default value is "res".
 
    Example 1.5. Set matrix_res_col parameter
 ...
@@ -194,7 +194,7 @@ modparam("matrix", "matrix_res_col", "res")
 
    4.1. matrix (string first, string second, string dstavp)
 
-4.1.  matrix (string first, string second, string dstavp)
+4.1. matrix (string first, string second, string dstavp)
 
    Looks up the desired result ID in the matrix for the given column and
    value and saves the result in dstavp. Returns false if the cell is not
@@ -213,7 +213,7 @@ cr_route("$avp(route_tree)", "$rd", "$rU", "$rU", "call_id");
 
    5.1. reload_matrix
 
-5.1.  reload_matrix
+5.1. reload_matrix
 
    Reloads the internal matrix representation from the database. This is
    necessary after entries in the database have been changed.
@@ -264,7 +264,7 @@ Chapter 2. Module parameter for database access.
 
    URL to the database containing the data.
 
-   Default value is “mysql://openserro:openserro@localhost/openser�.
+   Default value is "mysql://openserro:openserro@localhost/openser".
 
    Example 2.1. Set db_url parameter
 ...
@@ -275,7 +275,7 @@ modparam("matrix", "db_url", "dbdriver://username:password@dbhost/dbname")
 
    Name of the matrix table for the matrix module.
 
-   Default value is “matrix�.
+   Default value is "matrix".
 
    Example 2.2. Set matrix_table parameter
 ...

+ 2 - 2
modules/matrix/doc/matrix_admin.xml

@@ -69,14 +69,14 @@
 	  </para>
 	  <para>
 			<emphasis>
-				Default value is <quote>mysql://openserro:openserro@localhost/openser</quote>.
+				Default value is <quote>&defaultrodb;</quote>.
 		  </emphasis>
 	  </para>
 	  <example>
 		  <title>Set <varname>db_url</varname> parameter</title>
 		  <programlisting format="linespecific">
 ...
-modparam("matrix", "db_url", "mysql://openserro:openserro@localhost/openser")
+modparam("matrix", "db_url", "&defaultrodb;")
 ...
 		  </programlisting>
 	  </example>

+ 11 - 1
modules/matrix/doc/matrix_db.xml

@@ -1,3 +1,13 @@
+<?xml version="1.0" encoding='ISO-8859-1'?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+
+<!-- Include general documentation entities -->
+<!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
+%docentities;
+
+]>
+
 <!--
 WARNING:
 This file was autogenerated from the XML source file
@@ -14,7 +24,7 @@ ALL CHANGES DONE HERE WILL BE LOST IF THE FILE IS REGENERATED
     <title><varname>db_url</varname> (String)</title>
     <para>URL to the database containing the data.</para>
     <para>
-      <emphasis>Default value is <quote>mysql://openserro:openserro@localhost/openser</quote>.</emphasis>
+      <emphasis>Default value is <quote>&defaultrodb;</quote>.</emphasis>
     </para>
     <example>
       <title>Set <varname>db_url</varname> parameter</title>

+ 1 - 1
modules/mediaproxy/Makefile

@@ -10,7 +10,7 @@ auto_gen=
 NAME=mediaproxy.so
 LIBS=
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 include ../../Makefile.modules
 

+ 8 - 8
modules/mediaproxy/README

@@ -10,7 +10,7 @@ Dan Pascu
 
    <[email protected]>
 
-   Copyright © 2004 Dan Pascu
+   Copyright © 2004 Dan Pascu
      __________________________________________________________________
 
    Table of Contents
@@ -178,7 +178,7 @@ Chapter 1. Admin Guide
    mediaproxy is disabled, calls to its functions will have no effect,
    allowing you to use the same configuration without changes.
 
-   Default value is “0�.
+   Default value is "0".
 
    Example 1.1. Setting the disable parameter
 ...
@@ -190,7 +190,7 @@ modparam("mediaproxy", "disable", 1)
    It is the path to the filesystem socket where the mediaproxy dispatcher
    listens for commands from the module.
 
-   Default value is “/var/run/mediaproxy/dispatcher.sock�.
+   Default value is "/var/run/mediaproxy/dispatcher.sock".
 
    Example 1.2. Setting the mediaproxy_socket parameter
 ...
@@ -203,7 +203,7 @@ modparam("mediaproxy", "mediaproxy_socket", "/var/run/mediaproxy/dispatcher.sock
    How much time (in milliseconds) to wait for an answer from the
    mediaproxy dispatcher.
 
-   Default value is “500�.
+   Default value is "500".
 
    Example 1.3. Setting the mediaproxy_timeout parameter
 ...
@@ -225,7 +225,7 @@ modparam("mediaproxy", "mediaproxy_timeout", 500)
    to get the correct NAT IP address from where the SIP signaling
    originated.
 
-   Default value is “$avp(s:signaling_ip)�.
+   Default value is "$avp(s:signaling_ip)".
 
    Example 1.4. Setting the signaling_ip_avp parameter
 ...
@@ -240,7 +240,7 @@ modparam("mediaproxy", "signaling_ip_avp", "$avp(s:nat_ip)")
    before calling use_media_proxy(), it will be preferred by the
    dispatcher over the normal selection algorithm.
 
-   Default value is “$avp(s:media_relay)�.
+   Default value is "$avp(s:media_relay)".
 
    Example 1.5. Setting the media_relay_avp parameter
 ...
@@ -255,7 +255,7 @@ modparam("mediaproxy", "media_relay_avp", "$avp(s:media_relay)")
    selected then a low priority candidate will be added and if
    'high-priority' is selected a high priority one.
 
-   Default value is “none�.
+   Default value is "none".
 
    Example 1.6. Setting the ice_candidate parameter
 ...
@@ -272,7 +272,7 @@ modparam("mediaproxy", "ice_candidate", "low-priority")
    tm module to '1', and if the AVP is not set, the default value will be
    used.
 
-   Default value is “$avp(s:ice_candidate)�.
+   Default value is "$avp(s:ice_candidate)".
 
    Example 1.7. Setting the ice_candidate_avp parameter
 ...

+ 2 - 2
modules/mi_rpc/README

@@ -11,7 +11,7 @@ Daniel-Constantin Mierla
 
    <[email protected]>
 
-   Copyright © 2009 http://www.asipto.com
+   Copyright © 2009 http://www.asipto.com
      __________________________________________________________________
 
    Table of Contents
@@ -112,7 +112,7 @@ modparam("mi_rpc","rpc_url","tcp:localhost:2046")
 
    5.1. mi mi_dg mi_fifo mi_xmlrpc
 
-5.1.  mi mi_dg mi_fifo mi_xmlrpc
+5.1. mi mi_dg mi_fifo mi_xmlrpc
 
    Execute a MI command.
 

+ 1 - 1
modules/mqueue/Makefile

@@ -7,7 +7,7 @@ auto_gen=
 NAME=mqueue.so
 LIBS=
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/kmi/kmi

+ 26 - 5
modules/mqueue/README

@@ -10,7 +10,14 @@ Elena-Ramona Modroiu
 
    <[email protected]>
 
-   Copyright © 2010 Elena-Ramona Modroiu (asipto.com)
+Edited by
+
+Alex Balashov
+
+   Evariste Systems
+   <[email protected]>
+
+   Copyright © 2010 Elena-Ramona Modroiu (asipto.com)
      __________________________________________________________________
 
    Table of Contents
@@ -32,6 +39,7 @@ Elena-Ramona Modroiu
               4.1. mq_add(queue, key, value)
               4.2. mq_fetch(queue)
               4.3. mq_pv_free(queue)
+              4.4. mq_size(queue)
 
    List of Examples
 
@@ -39,6 +47,7 @@ Elena-Ramona Modroiu
    1.2. mq_add usage
    1.3. mq_fetch usage
    1.4. mq_pv_free usage
+   1.5. mq_size usage
 
 Chapter 1. Admin Guide
 
@@ -59,6 +68,7 @@ Chapter 1. Admin Guide
         4.1. mq_add(queue, key, value)
         4.2. mq_fetch(queue)
         4.3. mq_pv_free(queue)
+        4.4. mq_size(queue)
 
 1. Overview
 
@@ -94,7 +104,7 @@ Chapter 1. Admin Guide
 
    Definition of memory queue
 
-   Default value is “none�.
+   Default value is "none".
 
    Value must be a list of parameters: attr=value;... The attribute 'name'
    is mandatory, defining the name of the queue. Optional attribute 'size'
@@ -115,8 +125,9 @@ modparam("mqueue", "mqueue", "name=qaz")
    4.1. mq_add(queue, key, value)
    4.2. mq_fetch(queue)
    4.3. mq_pv_free(queue)
+   4.4. mq_size(queue)
 
-4.1.  mq_add(queue, key, value)
+4.1. mq_add(queue, key, value)
 
    Add a new item (key, value) in the queue. If max size of queue is
    exceeded, the oldest one is removed.
@@ -126,7 +137,7 @@ modparam("mqueue", "mqueue", "name=qaz")
 mq_add("myq", "$rU", "call from $fU");
 ...
 
-4.2.  mq_fetch(queue)
+4.2. mq_fetch(queue)
 
    Take oldest item from queue and fill $mqk(queue) and $mqv(queue) pseudo
    variables.
@@ -142,7 +153,7 @@ while(mq_fetch("myq"))
 }
 ...
 
-4.3.  mq_pv_free(queue)
+4.3. mq_pv_free(queue)
 
    Free the item fetched in pseudo-variables. It is optional, a new fetch
    frees the old values.
@@ -151,3 +162,13 @@ while(mq_fetch("myq"))
 ...
 mq_pv_free("myq");
 ...
+
+4.4. mq_size(queue)
+
+   Returns the current number of elements in the mqueue.
+
+   Example 1.5. mq_size usage
+...
+$var(q_size) = mq_size("queue");
+xlog("L_INFO", "Size of queue is: $var(q_size)\n");
+...

+ 1 - 1
modules/msrp/Makefile

@@ -7,6 +7,6 @@ auto_gen=
 NAME=msrp.so
 LIBS=
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 include ../../Makefile.modules

+ 8 - 8
modules/msrp/README

@@ -16,7 +16,7 @@ Alex Balashov
 
    <[email protected]>
 
-   Copyright © 2012 asipto.com
+   Copyright © 2012 asipto.com
      __________________________________________________________________
 
    Table of Contents
@@ -162,7 +162,7 @@ modparam("msrp", "sipmsg", 1)
    4.6. msrp_relay_flags(flags)
    4.7. msrp_reply_flags(flags)
 
-4.1.  msrp_relay()
+4.1. msrp_relay()
 
    Relay MSRP frame according to the To-Path. This function has to be
    executed for each MSRP request or reply that has to be forwarded. Note
@@ -178,7 +178,7 @@ event_route[msrp:frame-in] {
 }
 ...
 
-4.2.  msrp_reply(code, text [, hdrs])
+4.2. msrp_reply(code, text [, hdrs])
 
    Send a reply for the current MSRP request, adding optional headers.
 
@@ -193,7 +193,7 @@ event_route[msrp:frame-in] {
 }
 ...
 
-4.3.  msrp_is_request()
+4.3. msrp_is_request()
 
    Return true if the MSRP frame is a request.
 
@@ -210,7 +210,7 @@ event_route[msrp:frame-in] {
 }
 ...
 
-4.4.  msrp_is_reply()
+4.4. msrp_is_reply()
 
    Return true if the MSRP frame is a reply.
 
@@ -227,7 +227,7 @@ event_route[msrp:frame-in] {
 }
 ...
 
-4.5.  msrp_set_dst(addr, sock)
+4.5. msrp_set_dst(addr, sock)
 
    Set destination attributes: addr - target address as MSRP URI; sock -
    local socket to be used (format 'proto:ip:port').
@@ -245,7 +245,7 @@ event_route[msrp:frame-in] {
 }
 ...
 
-4.6.  msrp_relay_flags(flags)
+4.6. msrp_relay_flags(flags)
 
    Set transport layer sending flags for forwarding current MSRP frame;
    flags - a bitmask of flags - 1 (don't create a new connection), 2
@@ -264,7 +264,7 @@ event_route[msrp:frame-in] {
 }
 ...
 
-4.7.  msrp_reply_flags(flags)
+4.7. msrp_reply_flags(flags)
 
    Set transport layer sending flags for replies to the current MSRP
    frame; flags - a bitmask of flags - 1 (don't create a new connection),

+ 1 - 1
modules/mtree/Makefile

@@ -7,7 +7,7 @@ auto_gen=
 NAME=mtree.so
 LIBS=
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/srdb1/srdb1

+ 15 - 15
modules/mtree/README

@@ -20,9 +20,9 @@ Juha Heinanen
 
    <[email protected]>
 
-   Copyright © 2010 Daniel-Constantin Mierla (asipto.com)
+   Copyright © 2010 Daniel-Constantin Mierla (asipto.com)
 
-   Copyright © 2011 Juha Heinanen
+   Copyright © 2011 Juha Heinanen
      __________________________________________________________________
 
    Table of Contents
@@ -155,7 +155,7 @@ Chapter 1. Admin Guide
 
    URL of the database server to be used.
 
-   Default value is “mysql://openser:openserrw@localhost/openser�.
+   Default value is "mysql://openser:openserrw@localhost/openser".
 
    Example 1.1. Set db_url parameter
 ...
@@ -167,7 +167,7 @@ modparam("mtree", "db_url", "dbdriver://username:password@dbhost/dbname")
    Name of DB table where data for trees is store. It is ignored if a
    'mtree' parameter is defined.
 
-   Default value is “mtrees�.
+   Default value is "mtrees".
 
    Example 1.2. Set db_table parameter
 ...
@@ -178,7 +178,7 @@ modparam("mtree", "db_table", "mymtrees")
 
    Definition of memory tree
 
-   Default value is “none�.
+   Default value is "none".
 
    Example 1.3. Set mtree parameter
 ...
@@ -189,7 +189,7 @@ modparam("mtree", "mtree", "name=mytable;dbtable=routes;type=0;")
 
    Name of 'tname' column.
 
-   Default value is “tname�.
+   Default value is "tname".
 
    Example 1.4. Set tname_column parameter
 ...
@@ -200,7 +200,7 @@ modparam("mtree", "tname_column", "name")
 
    Name of 'tprefix' column.
 
-   Default value is “tprefix�.
+   Default value is "tprefix".
 
    Example 1.5. Set tprefix_column parameter
 ...
@@ -211,7 +211,7 @@ modparam("mtree", "tprefix_column", "prefix")
 
    Name of 'tvalue' column.
 
-   Default value is “tvalue�.
+   Default value is "tvalue".
 
    Example 1.6. Set tvalue_column parameter
 ...
@@ -233,7 +233,7 @@ modparam("mtree", "fetch_rows", 4000)
 
    The list with characters allowed in prefix.
 
-   Default value is “0123456789�.
+   Default value is "0123456789".
 
    Example 1.8. Set char_list parameter
 ...
@@ -245,7 +245,7 @@ modparam("mtree", "char_list", "0123456789*+")
    The PV spec where to store the matched value. It can be any writtable
    PV.
 
-   Default value is “$avp(s:tvalue)�.
+   Default value is "$avp(s:tvalue)".
 
    Example 1.9. Set pv_value parameter
 ...
@@ -257,7 +257,7 @@ modparam("mtree", "pv_value", "$var(mtval)")
    The PV spec where to store the matched values when mtree is of type 0
    or 2 and mode of mt_match() call has value 2. It can be any AVP.
 
-   Default value is “$avp(s:tvalues)�.
+   Default value is "$avp(s:tvalues)".
 
    Example 1.10. Set pv_values parameter
 ...
@@ -302,7 +302,7 @@ modparam("mtree", "mt_allow_duplicates", 1)
 
    4.1. mt_match(mtree, pv, mode)
 
-4.1.  mt_match(mtree, pv, mode)
+4.1. mt_match(mtree, pv, mode)
 
    Match 'pv' value against 'mtree'. If 'mtree' type is 0 or 2 and value
    of 'mode' is NOT 2, sets a value of longest matching prefix to pseudo
@@ -323,7 +323,7 @@ mt_match("mytree", "$rU", "0");
    5.2. mt_reload
    5.3. mt_summary
 
-5.1.  mt_list
+5.1. mt_list
 
    List content of a tree.
 
@@ -337,7 +337,7 @@ mt_match("mytree", "$rU", "0");
                 _mtname_
                 _empty_line_
 
-5.2.  mt_reload
+5.2. mt_reload
 
    Reload mtree from database.
 
@@ -352,7 +352,7 @@ mt_match("mytree", "$rU", "0");
                 _mtname_
                 _empty_line_
 
-5.3.  mt_summary
+5.3. mt_summary
 
    List usage summary for all trees.
 

+ 1 - 1
modules/ndb_redis/Makefile

@@ -8,7 +8,7 @@ NAME=ndb_redis.so
 DEFS += -I/usr/local/include
 LIBS = -lhiredis
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/kcore/kcore

+ 1 - 1
modules/pdb/Makefile

@@ -6,7 +6,7 @@ auto_gen=
 NAME=pdb.so
 
 LIBS=
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/kmi/kmi $(SERLIBPATH)/kcore/kcore

+ 6 - 6
modules/pdb/README

@@ -11,7 +11,7 @@ Henning Westerholt
    1&1 Internet AG
    <[email protected]>
 
-   Copyright © 2009 1&1 Internet AG
+   Copyright © 2009 1&1 Internet AG
      __________________________________________________________________
 
    Table of Contents
@@ -113,7 +113,7 @@ Chapter 1. Admin Guide
 
    This is the timeout in milliseconds for the pdb_query function.
 
-   Default value is “50�.
+   Default value is "50".
 
    Example 1.1. Set timeout parameter
 ...
@@ -135,7 +135,7 @@ modparam("pdb", "server", "localhost:10001,host.name:10001,192.168.1.7:10002")
 
    4.1. pdb_query (string query, string dstavp)
 
-4.1.  pdb_query (string query, string dstavp)
+4.1. pdb_query (string query, string dstavp)
 
    Sends the query string to all configured servers and stores the answer
    in dstavp. If it takes more than the configured timeout, false is
@@ -159,7 +159,7 @@ cr_route("$avp(i:82)", "$rd", "$rU", "$rU", "call_id");
    5.2. pdb_activate
    5.3. pdb_deactivate
 
-5.1.  pdb_status
+5.1. pdb_status
 
    Prints the status of the module. This can either be "active" or
    "deactivated".
@@ -169,7 +169,7 @@ cr_route("$avp(i:82)", "$rd", "$rU", "$rU", "call_id");
 kamctl fifo pdb_status
 ...
 
-5.2.  pdb_activate
+5.2. pdb_activate
 
    Activates the module. This is the default after loading the module.
 
@@ -178,7 +178,7 @@ kamctl fifo pdb_status
 kamctl fifo pdb_activate
 ...
 
-5.3.  pdb_deactivate
+5.3. pdb_deactivate
 
    Deactivates the module. No more queries are performed until it is
    activated again. As long as the module is deactivated, the pdb_query

+ 1 - 1
modules/peering/Makefile

@@ -10,7 +10,7 @@ include ../../Makefile.radius
 auto_gen=
 NAME=peering.so
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/kcore/kcore

+ 1 - 1
modules/pipelimit/Makefile

@@ -9,7 +9,7 @@ auto_gen=
 NAME=pipelimit.so
 LIBS= 
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/kcore/kcore

+ 9 - 9
modules/pipelimit/README

@@ -23,7 +23,7 @@ Daniel-Constantin Mierla
               2.1. Kamailio Modules
               2.2. External Libraries or Applications
 
-        3. Exported Parameters
+        3. Parameters
 
               3.1. db_url (string)
               3.2. plp_table_name (string)
@@ -34,12 +34,12 @@ Daniel-Constantin Mierla
               3.7. reply_code (integer)
               3.8. reply_reason (string)
 
-        4. Exported Functions
+        4. Functions
 
               4.1. pl_check(name)
               4.2. pl_drop([ [min ], max ])
 
-        5. Exported MI Functions
+        5. MI Commands
 
               5.1. pl_stats
               5.2. pl_set_pipe
@@ -73,7 +73,7 @@ Chapter 1. Admin Guide
         2.1. Kamailio Modules
         2.2. External Libraries or Applications
 
-   3. Exported Parameters
+   3. Parameters
 
         3.1. db_url (string)
         3.2. plp_table_name (string)
@@ -84,12 +84,12 @@ Chapter 1. Admin Guide
         3.7. reply_code (integer)
         3.8. reply_reason (string)
 
-   4. Exported Functions
+   4. Functions
 
         4.1. pl_check(name)
         4.2. pl_drop([ [min ], max ])
 
-   5. Exported MI Functions
+   5. MI Commands
 
         5.1. pl_stats
         5.2. pl_set_pipe
@@ -130,7 +130,7 @@ Chapter 1. Admin Guide
    running Kamailio with this module loaded:
      * None.
 
-3. Exported Parameters
+3. Parameters
 
    3.1. db_url (string)
    3.2. plp_table_name (string)
@@ -244,7 +244,7 @@ modparam("ratelimit", "reply_reason", "Limiting")
    Example 1.10.  Set reply_reason parameter at runtime
 sercmd cfg.set_now_string ratelimit reply_reason "Limiting"
 
-4. Exported Functions
+4. Functions
 
    4.1. pl_check(name)
    4.2. pl_drop([ [min ], max ])
@@ -304,7 +304,7 @@ sercmd cfg.set_now_string ratelimit reply_reason "Limiting"
         }
 ...
 
-5. Exported MI Functions
+5. MI Commands
 
    5.1. pl_stats
    5.2. pl_set_pipe

+ 1 - 1
modules/ratelimit/Makefile

@@ -9,7 +9,7 @@ auto_gen=
 NAME=ratelimit.so
 LIBS= 
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/kcore/kcore

+ 13 - 13
modules/ratelimit/README

@@ -18,9 +18,9 @@ Edited by
 
 Hendrik Scholz
 
-   Copyright © 2006 Freenet Cityline GmbH
+   Copyright © 2006 Freenet Cityline GmbH
 
-   Copyright © 2008-2010 VoIP Embedded Inc.
+   Copyright © 2008-2010 VoIP Embedded Inc.
      __________________________________________________________________
 
    Table of Contents
@@ -327,7 +327,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000")
    7.1. rl_check([pvar])
    7.2. rl_check_pipe([pipe_no])
 
-7.1.  rl_check([pvar])
+7.1. rl_check([pvar])
 
    Check the current request against the matched ratelimit algorithm. If
    no parameter is provided, the queue will be matched based on method
@@ -374,7 +374,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000")
         };
 ...
 
-7.2.  rl_check_pipe([pipe_no])
+7.2. rl_check_pipe([pipe_no])
 
    Check the current request against the matched ratelimit algorithm. If
    no parameter is provided, the queue will be matched based on method
@@ -419,7 +419,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000")
    8.8. rl.push_load
    8.9. rl.set_dbg
 
-8.1.  rl.stats
+8.1. rl.stats
 
    Lists the parameters and variabiles in the ratelimit module.
 
@@ -430,7 +430,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000")
    RPC Command Format:
                 serctl rl.stats
 
-8.2.  rl.set_pipe
+8.2. rl.set_pipe
 
    Sets the pipe parameters for the given pipe id.
 
@@ -444,7 +444,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000")
    RPC Command Format:
                 serctl rl.set_pipe 2 RED 10
 
-8.3.  rl.get_pipes
+8.3. rl.get_pipes
 
    Gets the list of in use pipes.
 
@@ -455,7 +455,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000")
    RPC Command Format:
                 serctl rl.get_pipes
 
-8.4.  rl.set_queue
+8.4. rl.set_queue
 
    Sets the queue parameters for the given queue id.
 
@@ -469,7 +469,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000")
    RPC Command Format:
                 serctl rl.set_queue 3 INVITE 2
 
-8.5.  rl.get_queues
+8.5. rl.get_queues
 
    Gets the list of in use queues.
 
@@ -480,7 +480,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000")
    RPC Command Format:
                 serctl rl.get_queues
 
-8.6.  rl.set_pid
+8.6. rl.set_pid
 
    Sets the PID Controller parameters for the Feedback Algorithm.
 
@@ -494,7 +494,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000")
    RPC Command Format:
                 serctl rl.set_pid 0.5 0.5 0.5
 
-8.7.  rl.get_pid
+8.7. rl.get_pid
 
    Gets the list of in use PID Controller parameters.
 
@@ -505,7 +505,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000")
    RPC Command Format:
                 serctl rl.get_pid
 
-8.8.  rl.push_load
+8.8. rl.push_load
 
    Force the value of the load parameter. This methos is usefull for
    testing the Feedback algorithm.
@@ -519,7 +519,7 @@ modparam("ratelimit", "pipe", "4:NETWORK:10000")
    RPC Command Format:
                 serctl rl.push_load 0.85
 
-8.9.  rl.set_dbg
+8.9. rl.set_dbg
 
    This MI function will enable/disable a WARNING debug log exposing the
    internal counters for each pipe (useful in monitoring the ratelimit

+ 1 - 1
modules/ratelimit/ratelimit.c

@@ -102,7 +102,7 @@ str_map_t algo_names[] = {
 
 /* at [email protected]'s suggestion:
  *
- * set this to 'cpu' to have openser look at /proc/stat every time_interval
+ * set this to 'cpu' to have Kamailio look at /proc/stat every time_interval
  * or set it to 'external' and you can push data in from an external source
  * via the fifo interface
  */

+ 1 - 1
modules/rtpproxy/Makefile

@@ -10,7 +10,7 @@ auto_gen=
 NAME=rtpproxy.so
 LIBS=
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/kmi/kmi

+ 14 - 0
modules/rtpproxy/README

@@ -24,6 +24,12 @@ Edited by
 
 Sas Ovidiu
 
+Edited by
+
+Carsten Bock
+
+   ng-voice GmbH
+
    Copyright © 2003-2008 Sippy Software, Inc.
 
    Copyright © 2005 Voice Sistem SRL
@@ -360,6 +366,8 @@ rtpproxy_offer();
             the ngcp-mediaproxy-ng rtpproxy at the moment!
           + 2 - append second Via branch to Call-ID when sending command
             to rtpproxy. See flag '1' for its meaning.
+          + 3 - behave like flag 1 is set for a request and like flag 2 is
+            set for a reply.
           + a - flags that UA from which message is received doesn't
             support symmetric RTP. (automatically sets the 'r' flag)
           + l - force "lookup", that is, only rewrite SDP when
@@ -380,6 +388,12 @@ rtpproxy_offer();
             Note: As rtpproxy is in bridge mode per default asymmetric,
             you have to specify the 'w' flag for clients behind NAT! See
             also above notes!
+          + x - this flag will do automatic bridging between IPv4 on the
+            "internal network" and IPv6 on the "external network". The
+            distinction is done by the given IP in the SDP, e.g. a IPv4
+            Address will always call "ie" to the RTPProxy (IPv4(i) to
+            IPv6(e)) and an IPv6Address will always call "ei" to the
+            RTPProxy (IPv6(e) to IPv4(i)).
           + f - instructs rtpproxy to ignore marks inserted by another
             rtpproxy in transit to indicate that the session is already
             goes through another proxy. Allows creating chain of proxies.

+ 4 - 1
modules/rtpproxy/doc/rtpproxy_admin.xml

@@ -318,7 +318,10 @@ rtpproxy_offer();
 				command to rtpproxy. See flag '1' for its meaning.
 				</para></listitem>
 				<listitem><para>
-
+				<emphasis>3</emphasis> - behave like flag 1 is set for a request and
+				like flag 2 is set for a reply.
+				</para></listitem>
+				<listitem><para>
 				<emphasis>a</emphasis> - flags that UA from which message is
 				received doesn't support symmetric RTP. (automatically sets the 'r' flag)
 				</para></listitem>

+ 44 - 5
modules/rtpproxy/rtpproxy.c

@@ -1667,7 +1667,7 @@ found:
 }
 
 static int
-unforce_rtp_proxy_f(struct sip_msg* msg, char* str1, char* str2)
+unforce_rtp_proxy_f(struct sip_msg* msg, char* flags, char* str2)
 {
 	str callid, from_tag, to_tag, viabranch;
 	char *cp;
@@ -1677,7 +1677,7 @@ unforce_rtp_proxy_f(struct sip_msg* msg, char* str1, char* str2)
 	struct iovec v[1 + 4 + 3 + 2] = {{NULL, 0}, {"D", 1}, {" ", 1}, {NULL, 0}, {NULL, 0}, {NULL, 0}, {" ", 1}, {NULL, 0}, {" ", 1}, {NULL, 0}};
 						    /* 1 */   /* 2 */   /* 3 */    /* 4 */    /* 5 */    /* 6 */   /* 7 */    /* 8 */   /* 9 */
 
-	for (cp = str1; cp && *cp; cp++) {
+	for (cp = flags; cp && *cp; cp++) {
 		switch (*cp) {
 			case '1':
 				via = 1;
@@ -1687,6 +1687,38 @@ unforce_rtp_proxy_f(struct sip_msg* msg, char* str1, char* str2)
 				via = 2;
 				break;
 
+			case '3':
+				if(msg && msg->first_line.type == SIP_REPLY)
+					via = 2;
+				else
+					via = 1;
+				break;
+
+			case 'a':
+			case 'A':
+			case 'i':
+			case 'I':
+			case 'e':
+			case 'E':
+			case 'l':
+			case 'L':
+			case 'f':
+			case 'F':
+			case 'r':
+			case 'R':
+			case 'c':
+			case 'C':
+			case 'o':
+			case 'O':
+			case 'x':
+			case 'X':
+			case 'w':
+			case 'W':
+			case 'z':
+			case 'Z':
+				/* ignore them - they can be sent by rtpproxy_manage() */
+				break;
+
 			default:
 				LM_ERR("unknown option `%c'\n", *cp);
 				return -1;
@@ -1794,7 +1826,7 @@ rtpproxy_manage(struct sip_msg *msg, char *flags, char *ip)
 		return -1;
 
 	if(method==METHOD_CANCEL || method==METHOD_BYE)
-		return unforce_rtp_proxy_f(msg, 0, 0);
+		return unforce_rtp_proxy_f(msg, flags, 0);
 
 	if(ip==NULL)
 	{
@@ -1820,13 +1852,13 @@ rtpproxy_manage(struct sip_msg *msg, char *flags, char *ip)
 					&& tmb.t_gett()!=T_UNDEFINED)
 				tmb.t_gett()->uas.request->msg_flags |= FL_SDP_BODY;
 			if(route_type==FAILURE_ROUTE)
-				return unforce_rtp_proxy_f(msg, 0, 0);
+				return unforce_rtp_proxy_f(msg, flags, 0);
 			return force_rtp_proxy(msg, flags, (cp!=NULL)?newip:ip, 1,
 					(ip!=NULL)?1:0);
 		}
 	} else if(msg->first_line.type == SIP_REPLY) {
 		if(msg->first_line.u.reply.statuscode>=300)
-			return unforce_rtp_proxy_f(msg, 0, 0);
+			return unforce_rtp_proxy_f(msg, flags, 0);
 		if(nosdp==0) {
 			if(method==METHOD_UPDATE)
 				return force_rtp_proxy(msg, flags, (cp!=NULL)?newip:ip, 0,
@@ -2024,6 +2056,13 @@ force_rtp_proxy(struct sip_msg* msg, char* str1, char* str2, int offer, int forc
 			via = 2;
 			break;
 
+		case '3':
+			if(msg && msg->first_line.type == SIP_REPLY)
+				via = 2;
+			else
+				via = 1;
+			break;
+
 		case 'a':
 		case 'A':
 			if (append_opts(&opts, 'A') == -1) {

+ 1 - 1
modules/sdpops/Makefile

@@ -9,6 +9,6 @@ NAME=sdpops.so
 DEFS +=
 LIBS +=
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 include ../../Makefile.modules

+ 1 - 1
modules/sipcapture/Makefile

@@ -10,7 +10,7 @@ auto_gen=
 NAME=sipcapture.so
 LIBS=
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/kmi/kmi

+ 4 - 4
modules/sipcapture/README

@@ -10,9 +10,9 @@ Alexandr Dubovikov
 
    <[email protected]>
 
-   Copyright © 2011 QSC AG
+   Copyright © 2011 QSC AG
 
-   Copyright © 2011 http://www.qsc.de
+   Copyright © 2011 http://www.qsc.de
      __________________________________________________________________
 
    Table of Contents
@@ -351,7 +351,7 @@ modparam("sipcapture", "capture_node", "homer03")
 
    4.1. sip_capture
 
-4.1.  sip_capture
+4.1. sip_capture
 
    Name: sip_capture
 
@@ -361,7 +361,7 @@ modparam("sipcapture", "capture_node", "homer03")
           + on
           + off
        The parameter is optional - if missing, the command will return the
-       status of the SIP message capturing (as string “on� or “off� )
+       status of the SIP message capturing (as string "on" or "off" )
        without changing anything.
 
    MI FIFO Command Format:

+ 4 - 4
modules/sms/README

@@ -4,7 +4,7 @@ Bogdan Iancu
 
    FhG FOKUS
 
-   Copyright © 2003 FhG FOKUS
+   Copyright © 2003 FhG FOKUS
      __________________________________________________________________
 
    1.1. Overview
@@ -179,7 +179,7 @@ modparam("sms", "links", "NOKIA[D1;d2]")
 
    The default network to use. If no one specified, the first defined
    network is used. This parameter is useful only if the "sms_send_msg"
-   exported function is used (see Section 1.4, “Functions�).
+   exported function is used (see Section 1.4, "Functions").
 
    Example 4. Set default_net parameter
 ...
@@ -245,7 +245,7 @@ modparam("sms", "sms_report_type", 1)
 
 1.4. Functions
 
-1.4.1.  sms_send_msg_to_net(network_name)
+1.4.1. sms_send_msg_to_net(network_name)
 
    Put the SIP msg in the specified network queue. The function return
    error if the number encapsulated into SIP message is malformed, if the
@@ -273,7 +273,7 @@ if (sms_send_msg_to_net("D1"))
 };
 ...
 
-1.4.2.  sms_send_msg()
+1.4.2. sms_send_msg()
 
    The same as the previous one, but use the default network queue.
 

+ 1 - 1
modules/tls/Makefile

@@ -35,7 +35,7 @@ endif
 # dcm: tls.cfg installed via local 'install-cfg' to update paths
 #MOD_INSTALL_CFGS=tls.cfg
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 include ../../Makefile.modules
 

+ 1 - 1
modules/tmrec/Makefile

@@ -9,7 +9,7 @@ NAME=tmrec.so
 DEFS +=
 LIBS +=
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/srutils/srutils

+ 45 - 45
modules/tmrec/README

@@ -16,7 +16,7 @@ Alex Balashov
 
    <[email protected]>
 
-   Copyright © 2012 asipto.com
+   Copyright © 2012 asipto.com
      __________________________________________________________________
 
    Table of Contents
@@ -111,7 +111,7 @@ modparam("tmrec", "separator", ";")
    4.2. is_leap_year([year])
    4.3. time_period_match(period [, timestamp])
 
-4.1.  tmrec_match(timerec [, timestamp])
+4.1. tmrec_match(timerec [, timestamp])
 
    Match a time recurrence rule against the timestamp (UNIX epoch format).
    If the timestamp parameter is missing, the current UNIX epoch time is
@@ -134,39 +134,39 @@ modparam("tmrec", "separator", ";")
    Description of time recurrence attributes:
      * startdate - date for the start of the first period.
      * duration - the duration of the time period. For a recurring
-       interval, the “duration� parameter MUST be small enough such that
+       interval, the "duration" parameter MUST be small enough such that
        subsequent intervals do not overlap. For non-recurring intervals,
        durations of any positive length are permitted. Zero-length
-       duration means “forever�. Negative-length durations are not
+       duration means "forever". Negative-length durations are not
        allowed.
-     * frequency - can be one of the following values: “daily� - specify
-       repeating periods based on an interval of a day or more; “weekly� -
+     * frequency - can be one of the following values: "daily" - specify
+       repeating periods based on an interval of a day or more; "weekly" -
        specify repeating periods based on an interval of a week or more;
-       “monthly� - specify repeating periods based on an interval of a
-       month or more; “yearly� - specify repeating periods based on an
+       "monthly" - specify repeating periods based on an interval of a
+       month or more; "yearly" - specify repeating periods based on an
        interval of a year or more. These values are case-insensitive.
      * until - defines an iCalendar COS DATE or DATE-TIME value which
        bounds the recurrence rule in an inclusive manner. If the value
-       specified by “until� is synchronized with the specified recurrence,
+       specified by "until" is synchronized with the specified recurrence,
        this date or date-time becomes the last instance of the recurrence.
        If it is not present, the recurrence is considered to repeat
        forever.
      * interval - a positive integer representing how often the recurrence
-       rule repeats. The default value is “1�, meaning every day for a
-       “daily� rule, every week for a “weekly� rule, every month for a
-       “monthly� rule and every year for a “yearly� rule.
+       rule repeats. The default value is "1", meaning every day for a
+       "daily" rule, every week for a "weekly" rule, every month for a
+       "monthly" rule and every year for a "yearly" rule.
      * byday - a comma-separated list short codes of days of the week. The
-       days are specified as: “MO� for Monday; “TU� for Tuesday; “WE� for
-       Wednesday; “TH� for Thursday; “FR� for Friday; “SA� for Saturday;
-       “SU� for Sunday. These values are case insensitive.
-       Each “byday� value can also be prefixed by a positive (+n) or
+       days are specified as: "MO" for Monday; "TU" for Tuesday; "WE" for
+       Wednesday; "TH" for Thursday; "FR" for Friday; "SA" for Saturday;
+       "SU" for Sunday. These values are case insensitive.
+       Each "byday" value can also be prefixed by a positive (+n) or
        negative (-n) integer. If present, this indicates the n-th
-       occurrence of the specific day within the “monthly� or “yearly�
-       recurrence. For example, within a “monthly� rule, +1MO (or simply
+       occurrence of the specific day within the "monthly" or "yearly"
+       recurrence. For example, within a "monthly" rule, +1MO (or simply
        1MO) represents the first Monday within the month, whereas -1MO
        represents the last Monday of the month. If an integer modifier is
        not present, it means all days of this type within the specified
-       frequency. For example, within a “monthly� rule, MO represents all
+       frequency. For example, within a "monthly" rule, MO represents all
        Mondays within the month.
      * bymonthday - a comma-separated list of days of the month. Valid
        values are 1 to 31 or -31 to -1. For example, -10 represents the
@@ -180,43 +180,43 @@ modparam("tmrec", "separator", ";")
      * bymonth - parameter specifies a comma-separated list of months of
        the year. Valid values are 1 to 12.
 
-   A recurrence is specified by including the “frequency� parameter, which
+   A recurrence is specified by including the "frequency" parameter, which
    indicates the type of the recurrence rule. Parameters other than
-   “startdate� and “duration� SHOULD NOT be specified unless “frequency�
+   "startdate" and "duration" SHOULD NOT be specified unless "frequency"
    is set.
 
-   If invalid byxxx parameter values are found (ie, bymonthday=“30� in
+   If invalid byxxx parameter values are found (ie, bymonthday="30" in
    February), they are simply ignored.
 
    Byxxx parameters modify the recurrence rule matching. The Byxxx rule,
    as an attribute for a period of time which is greater than or equal to
    the frequency, generally reduces or limits the number of occurrences
-   for the recurrence definition. For example, frequency=“daily�
-   bymonth=“3� reduces the number of recurrence instances from all days
-   (if the “bymonth� parameter is not present) to all days in March. Byxxx
+   for the recurrence definition. For example, frequency="daily"
+   bymonth="3" reduces the number of recurrence instances from all days
+   (if the "bymonth" parameter is not present) to all days in March. Byxxx
    parameters for a period of time less than the frequency generally
    increases or expands the number of occurrences of the recurrence. For
-   example, frequency=“yearly� bymonth=“8,9� increases the number of days
-   within the yearly recurrence set from 1 (if “bymonth� parameter is not
+   example, frequency="yearly" bymonth="8,9" increases the number of days
+   within the yearly recurrence set from 1 (if "bymonth" parameter is not
    present) to 2.
 
    If multiple Byxxx parameters are specified, then after evaluating the
-   specified “frequency� and “interval� parameters, the Byxxx parameters
+   specified "frequency" and "interval" parameters, the Byxxx parameters
    are applied to the current set of evaluated occurrences in the
-   following order: “bymonth�, “byweekno�, “byyearday�, “bymonthday�,
-   “byday�; then “until� is evaluated.
+   following order: "bymonth", "byweekno", "byyearday", "bymonthday",
+   "byday"; then "until" is evaluated.
 
    Next is an example of evaluating multiple Byxxx parameters.
 
-   startdate=“20100101T093000� duration=“10H30M� frequency=“yearly�
-   interval=“4� bymonth=“3� byday=“SU�
+   startdate="20100101T093000" duration="10H30M" frequency="yearly"
+   interval="4" bymonth="3" byday="SU"
 
-   First, the interval=“4� would be applied to frequency=“yearly� to match
-   on “every 4th year� . Then, bymonth=“1� would be applied to match on
-   “every March, every 4th year�. Then, byday=“SU� would be applied to
-   match on “every Sunday in March, every 4th year, from 9:30 to 20:00 �.
+   First, the interval="4" would be applied to frequency="yearly" to match
+   on "every 4th year" . Then, bymonth="1" would be applied to match on
+   "every March, every 4th year". Then, byday="SU" would be applied to
+   match on "every Sunday in March, every 4th year, from 9:30 to 20:00 ".
    The start and end hours:minutes have been retrieved from the
-   “startdate� and “duration� parameters.
+   "startdate" and "duration" parameters.
 
    This function can be used in ANY_ROUTE.
 
@@ -228,7 +228,7 @@ modparam("tmrec", "separator", ";")
         xdbg("it is with working hours\n");
 ...
 
-4.2.  is_leap_year([year])
+4.2. is_leap_year([year])
 
    Return true if the value from parameter is a leap year. If the
    parameter is missing, then the year from the current time is taken.
@@ -242,7 +242,7 @@ modparam("tmrec", "separator", ";")
 if(is_leap_year("2010"))
 ...
 
-4.3.  time_period_match(period [, timestamp])
+4.3. time_period_match(period [, timestamp])
 
    Matches the point in time specified by the timestamp parameter, or the
    current time if the parameter is missing, against the given period
@@ -275,26 +275,26 @@ if(is_leap_year("2010"))
        the current century.
      * month or mo - Month of the year, either a number between 1 and 12,
        or at least the first 3 letters of a spelled out month name, e.g.
-       “jan�, “janua� or “january� will all work.
+       "jan", "janua" or "january" will all work.
      * week or wk - Week of the month, a number between 1 and 6. The first
        day of the week is Sunday.
      * yday or yd - Day of the year, a number between 1 and 366.
      * mday or md - Day of the month, a number between 1 and 31.
      * wday or wd - Day of the week, either a number between 1 and 7, or
        at least the first 2 letters of a spelled out weekday name
-       (analogous to the “month� scale). Sunday is the first day of the
+       (analogous to the "month" scale). Sunday is the first day of the
        week.
      * hour or hr - A number between 0 and 23. Unlike the Perl
-       Time::Period module, “am� or “pm� specifications are not supported.
+       Time::Period module, "am" or "pm" specifications are not supported.
      * minute or min - A number between 0 and 59.
      * second or sec - A number between 0 and 60 (to allow for leap
        seconds).
 
    The parameters can include pseudo-variables. Whitespace (more
    precisely, the space character only) can occur anywhere, but is
-   optional. Ranges in all scales (with the exception of the “year� scale)
-   are allowed to wrap-around, e.g. a weekday scale of “{fri-tue}� is
-   equivalent to “{fri-sat,sun-tue}�.
+   optional. Ranges in all scales (with the exception of the "year" scale)
+   are allowed to wrap-around, e.g. a weekday scale of "{fri-tue}" is
+   equivalent to "{fri-sat,sun-tue}".
 
    Example 1.4. time_period_match usage
 ...

+ 1 - 1
modules/topoh/Makefile

@@ -10,6 +10,6 @@ auto_gen=
 NAME=topoh.so
 LIBS=
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 include ../../Makefile.modules

+ 1 - 1
modules/topoh/README

@@ -10,7 +10,7 @@ Daniel-Constantin Mierla
 
    <[email protected]>
 
-   Copyright © 2009 FhG FOKUS
+   Copyright © 2009 FhG FOKUS
      __________________________________________________________________
 
    Table of Contents

+ 1 - 1
modules/utils/Makefile

@@ -13,7 +13,7 @@ DEFS+=-I/usr/include/libxml2 -I$(LOCALBASE)/include/libxml2 \
       -I$(LOCALBASE)/include
 LIBS+=-L$(LOCALBASE)/lib -lcurl -lxml2
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/srdb1/srdb1

+ 1 - 1
modules/websocket/Makefile

@@ -19,7 +19,7 @@ else
 endif
 LIBS+= -lunistring
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/kcore/kcore

+ 1 - 1
modules/xhttp/Makefile

@@ -9,6 +9,6 @@ NAME=xhttp.so
 DEFS +=
 LIBS +=
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 include ../../Makefile.modules

+ 2 - 2
modules/xhttp/README

@@ -16,7 +16,7 @@ Alex Balashov
 
    <[email protected]>
 
-   Copyright © 2010 asipto.com
+   Copyright © 2010 asipto.com
      __________________________________________________________________
 
    Table of Contents
@@ -168,7 +168,7 @@ modparam("xhttp", "url_match", "^/sip/")
 
    5.1. xhttp_reply(code, reason, ctype, body)
 
-5.1.  xhttp_reply(code, reason, ctype, body)
+5.1. xhttp_reply(code, reason, ctype, body)
 
    Send back a reply with content-type and body.
 

+ 1 - 1
modules/xhttp_rpc/Makefile

@@ -9,6 +9,6 @@ NAME=xhttp_rpc.so
 DEFS +=
 LIBS +=
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 include ../../Makefile.modules

+ 2 - 2
modules/xhttp_rpc/README

@@ -16,7 +16,7 @@ Alex Balashov
 
    <[email protected]>
 
-   Copyright © 2011 VoIPEmbedded Inc.
+   Copyright © 2011 VoIPEmbedded Inc.
      __________________________________________________________________
 
    Table of Contents
@@ -146,7 +146,7 @@ modparam("xhttp", "xhttp_rpc_buf_size", )
 
    4.1. dispatch_xhttp_rpc()
 
-4.1.  dispatch_xhttp_rpc()
+4.1. dispatch_xhttp_rpc()
 
    Handle the HTTP request and generate a response.
 

+ 1 - 1
modules/xmlops/Makefile

@@ -24,6 +24,6 @@ else
 
 endif
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 include ../../Makefile.modules

+ 2 - 2
modules/xmlops/pv_xml.c

@@ -5,12 +5,12 @@
  *
  * This file is part of kamailio, a free SIP server.
  *
- * openser is free software; you can redistribute it and/or modify
+ * Kamailio is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version
  *
- * openser is distributed in the hope that it will be useful,
+ * Kamailio is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  * GNU General Public License for more details.

+ 2 - 2
modules/xmlops/pv_xml.h

@@ -5,12 +5,12 @@
  *
  * This file is part of kamailio, a free SIP server.
  *
- * openser is free software; you can redistribute it and/or modify
+ * Kamailio is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version
  *
- * openser is distributed in the hope that it will be useful,
+ * Kamailio is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  * GNU General Public License for more details.

+ 2 - 2
modules/xmlops/xmlops_mod.c

@@ -5,12 +5,12 @@
  *
  * This file is part of kamailio, a free SIP server.
  *
- * openser is free software; you can redistribute it and/or modify
+ * Kamailio is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version
  *
- * openser is distributed in the hope that it will be useful,
+ * Kamailio is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  * GNU General Public License for more details.

+ 1 - 1
modules_k/acc/Makefile

@@ -28,7 +28,7 @@ ifeq ($(ENABLE_DIAMETER_ACC),true)
 DEFS+=-DDIAM_ACC
 endif
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/srdb1/srdb1 $(SERLIBPATH)/kcore/kcore

+ 1 - 1
modules_k/acc_radius/Makefile

@@ -12,7 +12,7 @@ LIBS=
 
 include ../../Makefile.radius
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/kcore/kcore

+ 1 - 1
modules_k/alias_db/Makefile

@@ -12,7 +12,7 @@ NAME=alias_db.so
 LIBS=
 DEFS+=
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/srdb1/srdb1

+ 11 - 11
modules_k/alias_db/README

@@ -14,9 +14,9 @@ Daniel-Constantin Mierla
 
    <[email protected]>
 
-   Copyright © 2005 Voice Sistem SRL
+   Copyright © 2005 Voice Sistem SRL
 
-   Copyright © 2008 asipto.com
+   Copyright © 2008 asipto.com
      __________________________________________________________________
 
    Table of Contents
@@ -126,7 +126,7 @@ Chapter 1. Admin Guide
 
    Database URL.
 
-   Default value is “mysql://openserro:openserro@localhost/openser�.
+   Default value is "mysql://openserro:openserro@localhost/openser".
 
    Example 1.1. Set db_url parameter
 ...
@@ -137,7 +137,7 @@ modparam("alias_db", "db_url", "dbdriver://username:password@dbhost/dbname")
 
    Name of the column storing username.
 
-   Default value is “username�.
+   Default value is "username".
 
    Example 1.2. Set user_column parameter
 ...
@@ -148,7 +148,7 @@ modparam("alias_db", "user_column", "susername")
 
    Name of the column storing user's domain.
 
-   Default value is “domain�.
+   Default value is "domain".
 
    Example 1.3. Set domain_column parameter
 ...
@@ -159,7 +159,7 @@ modparam("alias_db", "domain_column", "sdomain")
 
    Name of the column storing alias username.
 
-   Default value is “alias_username�.
+   Default value is "alias_username".
 
    Example 1.4. Set alias_user_column parameter
 ...
@@ -170,7 +170,7 @@ modparam("alias_db", "alias_user_column", "auser")
 
    Name of the column storing alias domain.
 
-   Default value is “alias_domain�.
+   Default value is "alias_domain".
 
    Example 1.5. Set alias_domain_column parameter
 ...
@@ -183,7 +183,7 @@ modparam("alias_db", "alias_domain_column", "adomain")
    for alias. If set to 0, the domain from R-URI is not used, if set to 1
    the domain from R-URI is used.
 
-   Default value is “0�.
+   Default value is "0".
 
    Example 1.6. Set use_domain parameter
 ...
@@ -195,7 +195,7 @@ modparam("alias_db", "use_domain", 1)
    Specifies the prefix to be stripped from the domain in R-URI before
    doing the search.
 
-   Default value is “NULL�.
+   Default value is "NULL".
 
    Example 1.7. Set domain_prefix parameter
 ...
@@ -207,7 +207,7 @@ modparam("alias_db", "domain_prefix", "sip.")
    If the alias resolves to many SIP IDs, the first is replacing the
    R-URI, the rest are added as branches.
 
-   Default value is “0� (0 - don't add branches; 1 - add branches).
+   Default value is "0" (0 - don't add branches; 1 - add branches).
 
    Example 1.8. Set append_branches parameter
 ...
@@ -218,7 +218,7 @@ modparam("alias_db", "append_branches", 1)
 
    4.1. alias_db_lookup(table_name)
 
-4.1.  alias_db_lookup(table_name)
+4.1. alias_db_lookup(table_name)
 
    The function takes the R-URI and search to see whether it is an alias
    or not. If it is an alias for a local user, the R-URI is replaced with

+ 1 - 1
modules_k/auth_db/Makefile

@@ -10,7 +10,7 @@ auto_gen=
 NAME=auth_db.so
 LIBS=
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/kcore/kcore $(SERLIBPATH)/srdb1/srdb1

+ 35 - 0
modules_k/auth_db/README

@@ -58,6 +58,7 @@ Jan Janak
               4.3. proxy_authenticate(realm, table)
               4.4. proxy_authorize(realm, table)
               4.5. auth_check(realm, table, flags)
+              4.6. is_subscriber(uri, dbtable, flags)
 
    List of Examples
 
@@ -73,6 +74,7 @@ Jan Janak
    1.10. www_authorize usage
    1.11. proxy_authorize usage
    1.12. auth_check usage
+   1.13. is_subscriber usage
 
 Chapter 1. Admin Guide
 
@@ -103,6 +105,7 @@ Chapter 1. Admin Guide
         4.3. proxy_authenticate(realm, table)
         4.4. proxy_authorize(realm, table)
         4.5. auth_check(realm, table, flags)
+        4.6. is_subscriber(uri, dbtable, flags)
 
 1. Overview
 
@@ -301,6 +304,7 @@ modparam("auth_db", "version_table", 0)
    4.3. proxy_authenticate(realm, table)
    4.4. proxy_authorize(realm, table)
    4.5. auth_check(realm, table, flags)
+   4.6. is_subscriber(uri, dbtable, flags)
 
 4.1. www_authenticate(realm, table)
 
@@ -420,3 +424,34 @@ if (!auth_check("$fd", "subscriber", "1")) {
     exit;
 }
 ...
+
+4.6. is_subscriber(uri, dbtable, flags)
+
+   The function checks if there is a subscriber corresponding to the AoR
+   in uri parameter. It uses same database connection as for
+   authentication functions.
+
+   In addition, if the subscriber record is found, then the
+   load_credentials attributes are loaded. An use case can be loading the
+   credential attributes for callee.
+
+   Meaning of the parameters is as follows:
+     * uri - a valid SIP URI value to identify the subscriber. The string
+       may contain pseudo variables.
+     * dbtable - Table to be used to lookup username and domain from URI
+       (usually subscriber table). The string may contain pseudo
+       variables.
+     * flags - set of flags to control the behaviour of the function. If
+       it is 1, then the function will use the domain part of the URI to
+       perform the database table search.
+       The parameter may be a pseudo variable.
+
+   This function can be used from ANY_ROUTE.
+
+   Example 1.13. is_subscriber usage
+...
+if (!is_subscriber("$ru", "subscriber", "1")) {
+    # callee is not a local subscriber
+    ...
+}
+...

+ 63 - 0
modules_k/auth_db/authdb_mod.c

@@ -43,6 +43,7 @@
 #include "../../mod_fix.h"
 #include "../../trim.h"
 #include "../../mem/mem.h"
+#include "../../parser/parse_uri.h"
 #include "../../modules/auth/api.h"
 #include "authorize.h"
 
@@ -68,6 +69,8 @@ static int child_init(int rank);
 static int mod_init(void);
 
 
+static int w_is_subscriber(sip_msg_t *msg, char *_uri, char* _table,
+		char *_flags);
 static int auth_fixup(void** param, int param_no);
 static int auth_check_fixup(void** param, int param_no);
 int parse_aaa_pvs(char *definition, pv_elem_t **pv_def, int *cnt);
@@ -122,6 +125,8 @@ static cmd_export_t cmds[] = {
 		REQUEST_ROUTE},
 	{"auth_check",         (cmd_function)auth_check,         3, auth_check_fixup, 0,
 		REQUEST_ROUTE},
+	{"is_subscriber",      (cmd_function)w_is_subscriber,    3, auth_check_fixup, 0,
+		ANY_ROUTE},
 	{"bind_auth_db",       (cmd_function)bind_auth_db,       0, 0, 0,
 		0},
 	{0, 0, 0, 0, 0, 0}
@@ -232,6 +237,64 @@ static void destroy(void)
 }
 
 
+/**
+ * check if the subscriber identified by _uri has a valid record in
+ * database table _table
+ */
+static int w_is_subscriber(sip_msg_t *msg, char *_uri, char* _table,
+		char *_flags)
+{
+	str suri;
+	str stable;
+	int iflags;
+	int ret;
+	sip_uri_t puri;
+
+	if(msg==NULL || _uri==NULL || _table==NULL || _flags==NULL) {
+		LM_ERR("invalid parameters\n");
+		return AUTH_ERROR;
+	}
+
+	if (get_str_fparam(&suri, msg, (fparam_t*)_uri) < 0) {
+		LM_ERR("failed to get uri value\n");
+		return -1;
+	}
+
+	if (suri.len==0) {
+		LM_ERR("invalid uri parameter - empty value\n");
+		return -1;
+	}
+	if(parse_uri(suri.s, suri.len, &puri)<0){
+		LM_ERR("invalid uri parameter format\n");
+		return -1;
+	}
+
+	if (get_str_fparam(&stable, msg, (fparam_t*)_table) < 0) {
+		LM_ERR("failed to get table value\n");
+		return -1;
+	}
+
+	if (stable.len==0) {
+		LM_ERR("invalid table parameter - empty value\n");
+		return -1;
+	}
+
+	if(fixup_get_ivalue(msg, (gparam_p)_flags, &iflags)!=0)
+	{
+		LM_ERR("invalid flags parameter\n");
+		return -1;
+	}
+
+	LM_DBG("uri [%.*s] table [%.*s] flags [%d]\n", suri.len, suri.s,
+			stable.len,  stable.s, iflags);
+	ret = fetch_credentials(msg, &puri.user, (iflags==1)?&puri.host:NULL,
+			&stable);
+
+	if(ret>=0)
+		return 1;
+	return ret;
+}
+
 /*
  * Convert the char* parameters
  */

+ 72 - 0
modules_k/auth_db/authorize.c

@@ -52,6 +52,78 @@
 #include "authdb_mod.h"
 
 
+int fetch_credentials(sip_msg_t *msg, str *user, str* domain, str *table)
+{
+	pv_elem_t *cred;
+	db_key_t keys[2];
+	db_val_t vals[2];
+	db_key_t *col;
+	db1_res_t *res = NULL;
+
+	int n, nc;
+
+	col = pkg_malloc(sizeof(*col) * (credentials_n + 1));
+	if (col == NULL) {
+		LM_ERR("no more pkg memory\n");
+		return -1;
+	}
+
+	keys[0] = &user_column;
+	keys[1] = &domain_column;
+
+	for (n = 0, cred=credentials; cred ; n++, cred=cred->next) {
+		col[n] = &cred->text;
+	}
+
+	VAL_TYPE(vals) = VAL_TYPE(vals + 1) = DB1_STR;
+	VAL_NULL(vals) = VAL_NULL(vals + 1) = 0;
+
+	n = 1;
+	VAL_STR(vals) = *user;
+
+	if (domain && domain->len) {
+		VAL_STR(vals + 1) = *domain;
+		n = 2;
+	}
+
+	nc = credentials_n;
+	if (auth_dbf.use_table(auth_db_handle, table) < 0) {
+		LM_ERR("failed to use_table\n");
+		pkg_free(col);
+		return -1;
+	}
+
+	if (auth_dbf.query(auth_db_handle, keys, 0, vals, col, n, nc, 0, &res) < 0) {
+		LM_ERR("failed to query database\n");
+		pkg_free(col);
+		if(res)
+			auth_dbf.free_result(auth_db_handle, res);
+		return -1;
+	}
+	pkg_free(col);
+	if (RES_ROW_N(res) == 0) {
+		if(res)
+			auth_dbf.free_result(auth_db_handle, res);
+		LM_DBG("no result for user \'%.*s%s%.*s\' in [%.*s]\n",
+				user->len, user->s, (n==2)?"@":"",
+				(n==2)?domain->len:0, (n==2)?domain->s:"",
+				table->len, table->s);
+		return -2;
+	}
+	for (cred=credentials, n=0; cred; cred=cred->next, n++) {
+		if (db_val2pv_spec(msg, &RES_ROWS(res)[0].values[n], cred->spec) != 0) {
+			if(res)
+				auth_dbf.free_result(auth_db_handle, res);
+			LM_ERR("Failed to convert value for column %.*s\n",
+					RES_NAMES(res)[n]->len, RES_NAMES(res)[n]->s);
+			return -3;
+		}
+	}
+	if(res)
+		auth_dbf.free_result(auth_db_handle, res);
+	return 0;
+}
+
 static inline int get_ha1(struct username* _username, str* _domain,
 			  const str* _table, char* _ha1, db1_res_t** res)
 {

+ 5 - 0
modules_k/auth_db/authorize.h

@@ -51,6 +51,11 @@ int www_authenticate(struct sip_msg* _msg, char* _realm, char* _table);
  */
 int auth_check(struct sip_msg* _m, char* _realm, char* _table, char *_flags);
 
+/*
+ * Fetch credentials for a specific user
+ */
+int fetch_credentials(sip_msg_t *msg, str *user, str* domain, str *table);
+
 /*
  * Bind to AUTH_DB API
  */

+ 52 - 0
modules_k/auth_db/doc/auth_db_admin.xml

@@ -528,6 +528,58 @@ if (!auth_check("$fd", "subscriber", "1")) {
 	</section>
 
 
+	<section>
+		<title>
+			<function moreinfo="none">is_subscriber(uri, dbtable, flags)</function>
+		</title>
+		<para>The function checks if there is a subscriber corresponding to
+		the AoR in uri parameter. It uses same database connection as for
+		authentication functions.
+		</para>
+		<para>
+		In addition, if the subscriber record is found, then the load_credentials
+		attributes are loaded. An use case can be loading the credential attributes
+		for callee.
+		</para>
+		<para>Meaning of the parameters is as follows:</para>
+		<itemizedlist>
+		<listitem>
+			<para><emphasis>uri</emphasis> - a valid SIP URI value to identify
+			the subscriber. The string may contain pseudo variables.
+			</para>
+		</listitem>
+		<listitem>
+			<para><emphasis>dbtable</emphasis> - Table to be used to lookup
+			username and domain from URI (usually subscriber table). The string
+			may contain pseudo variables.
+			</para>
+		</listitem>
+		<listitem>
+			<para><emphasis>flags</emphasis> - set of flags to control the
+			behaviour of the function. If it is 1, then the function will
+			use the domain part of the URI to perform the database table search.
+			</para>
+			<para>
+			The parameter may be a pseudo variable.
+			</para>
+		</listitem>
+		</itemizedlist>
+		<para>
+		This function can be used from ANY_ROUTE.
+		</para>
+		<example>
+		<title>is_subscriber usage</title>
+		<programlisting format="linespecific">
+...
+if (!is_subscriber("$ru", "subscriber", "1")) {
+    # callee is not a local subscriber
+    ...
+}
+...
+</programlisting>
+		</example>
+	</section>
+
 	</section>
 </chapter>
 

+ 1 - 1
modules_k/auth_diameter/Makefile

@@ -11,6 +11,6 @@ auto_gen=
 NAME=auth_diameter.so
 LIBS=
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 include ../../Makefile.modules

+ 10 - 10
modules_k/auth_diameter/README

@@ -8,7 +8,7 @@ Edited by
 
 Elena-Ramona Modroiu
 
-   Copyright © 2003, 2004 FhG FOKUS
+   Copyright © 2003, 2004 FhG FOKUS
      __________________________________________________________________
 
    Table of Contents
@@ -137,7 +137,7 @@ Chapter 1. Admin Guide
 
    Hostname of the machine where the DIAMETER Client is running.
 
-   Default value is “localhost�.
+   Default value is "localhost".
 
    Example 1.2. Set diameter_client_host parameter
 ...
@@ -148,7 +148,7 @@ modparam("auth_diameter", "diameter_client_host", "10.10.10.10")
 
    Port number where the DIAMETER Client is listening.
 
-   Default value is “3000�.
+   Default value is "3000".
 
    Example 1.3. Set diameter_client_port parameter
 ...
@@ -160,7 +160,7 @@ modparam("auth_diameter", "diameter_client_port", 3000)
    Specifies whether the domain name part of URI is used when checking the
    user's privileges.
 
-   Default value is “0 (0==false and 1==true )�.
+   Default value is "0 (0==false and 1==true )".
 
    Example 1.4. Set use_domain parameter
 ...
@@ -173,12 +173,12 @@ modparam("auth_diameter", "use_domain", 1)
    4.2. diameter_proxy_authorize(realm)
    4.3. diameter_is_user_in(who, group)
 
-4.1.  diameter_www_authorize(realm)
+4.1. diameter_www_authorize(realm)
 
    SIP Server checks for authorization having a DIAMETER server in
    backend. If no credentials are provided inside the SIP request then a
    challenge is sent back to UAC. If the credentials don't match the ones
-   computed by DISC then “403 Forbidden� is sent back.
+   computed by DISC then "403 Forbidden" is sent back.
 
    Negative codes may be interpreted as follows:
      * -5 (generic error) - some generic error occurred and no reply was
@@ -199,12 +199,12 @@ if(!diameter_www_authorize("siphub.net"))
 };
 ...
 
-4.2.  diameter_proxy_authorize(realm)
+4.2. diameter_proxy_authorize(realm)
 
    SIP Proxy checks for authorization having a DIAMETER server in backend.
    If no credentials are provided inside the SIP request then a challenge
    is sent back to UAC. If the credentials don't match the ones computed
-   by DISC then “403 Forbidden� is sent back. For more about the negative
+   by DISC then "403 Forbidden" is sent back. For more about the negative
    return codes, see the above function.
 
    Meaning of the parameters is as follows:
@@ -221,14 +221,14 @@ if(!diameter_proxy_authorize("siphub.net"))
 };
 ...
 
-4.3.  diameter_is_user_in(who, group)
+4.3. diameter_is_user_in(who, group)
 
    The method performs group membership checking with DISC.
 
    Meaning of the parameters is as follows:
      * who - what header to be used to get the SIP URI that is wanted to
        be checked being member in a certain group. It can be:
-       “Request-URI�, “From�, “To� or “Credentials�.
+       "Request-URI", "From", "To" or "Credentials".
      * group - the group name where to check if the user is part of.
 
    This function can be used from REQUEST_ROUTE.

+ 1 - 1
modules_k/auth_radius/Makefile

@@ -11,7 +11,7 @@ include ../../Makefile.radius
 auto_gen=
 NAME=auth_radius.so
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/kcore/kcore

+ 1 - 1
modules_k/benchmark/Makefile

@@ -16,7 +16,7 @@ DEFS+=
 #DEFS+= -DBM_CLOCK_REALTIME
 #LIBS+= -lrt
 
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 SERLIBPATH=../../lib
 SER_LIBS+=$(SERLIBPATH)/kmi/kmi

+ 12 - 12
modules_k/benchmark/README

@@ -15,9 +15,9 @@ Bastian Friedrich
 
    <[email protected]>
 
-   Copyright © 2007 Collax GmbH
+   Copyright © 2007 Collax GmbH
 
-   Copyright © 2007 Voice System SRL
+   Copyright © 2007 Voice System SRL
      __________________________________________________________________
 
    Table of Contents
@@ -151,7 +151,7 @@ Chapter 1. Admin Guide
        that feature is implemented.
      * 1 - Globally enable benchmarking
 
-   Default value is “0�.
+   Default value is "0".
 
    Example 1.1. Set enable parameter
 ...
@@ -164,7 +164,7 @@ modparam("benchmark", "enable", 1)
    function, but only every n'th call. n is defined through this variable.
    A sensible granularity seems to be 100.
 
-   Default value is “1�.
+   Default value is "1".
 
    Example 1.2. Set granularity parameter
 ...
@@ -182,7 +182,7 @@ modparam("benchmark", "granularity", 500)
      * 3 - L_INFO
      * 4 - L_DBG
 
-   Default value is “3� (L_INFO).
+   Default value is "3" (L_INFO).
 
    Example 1.3. Set loglevel parameter
 ...
@@ -196,16 +196,16 @@ modparam("benchmark", "loglevel", 4)
    4.1. bm_start_timer(name)
    4.2. bm_log_timer(name)
 
-4.1.  bm_start_timer(name)
+4.1. bm_start_timer(name)
 
-   Start timer “name�. A later call to “bm_log_timer()� logs this timer..
+   Start timer "name". A later call to "bm_log_timer()" logs this timer..
 
    Example 1.4. bm_start_timer usage
 ...
 bm_start_timer("test");
 ...
 
-4.2.  bm_log_timer(name)
+4.2. bm_log_timer(name)
 
    This function logs the timer with the given ID. The following data are
    logged:
@@ -213,7 +213,7 @@ bm_start_timer("test");
        equals the granularity variable.
 
      * Last sum is the accumulated duration in the current logging
-       interval (i.e. for the last “granularity� calls).
+       interval (i.e. for the last "granularity" calls).
 
      * Last min is the minimum duration between start/log_timer calls
        during the last interval.
@@ -316,18 +316,18 @@ Chapter 2. Developer Guide
    1.2. bm_start(id)
    1.3. bm_log(id)
 
-1.1.  bm_register(name, mode, id)
+1.1. bm_register(name, mode, id)
 
    This function register a new timer and/or returns the internal ID
    associated with the timer. mode controls the creation of new timer if
    not found. id is to be used by start and log timer functions.
 
-1.2.  bm_start(id)
+1.2. bm_start(id)
 
    This function equals the user-exported function bm_start_timer. The id
    is passed as an integer, though.
 
-1.3.  bm_log(id)
+1.3. bm_log(id)
 
    This function equals the user-exported function bm_log_timer. The id is
    passed as an integer, though.

+ 2 - 2
modules_k/benchmark/benchmark.c

@@ -179,7 +179,7 @@ struct module_exports exports = {
 
 /*
  * mod_init
- * Called by openser at init time
+ * Called by Kamailio at init time
  */
 static int mod_init(void) {
 	if(register_mi_mod(exports.name, mi_cmds)!=0)
@@ -200,7 +200,7 @@ static int mod_init(void) {
 
 /*
  * destroy
- * called by openser at exit time
+ * called by Kamailio at exit time
  */
 static void destroy(void)
 {

+ 1 - 1
modules_k/call_control/Makefile

@@ -9,7 +9,7 @@ include ../../Makefile.defs
 auto_gen=
 NAME=call_control.so
 LIBS=
-DEFS+=-DOPENSER_MOD_INTERFACE
+DEFS+=-DKAMAILIO_MOD_INTERFACE
 
 
 include ../../Makefile.modules

+ 3 - 3
modules_k/call_control/README

@@ -34,7 +34,7 @@ Dan Pascu
               5.5. canonical_uri_avp (string)
               5.6. diverter_avp_id (string)
 
-        6. Exported Functions
+        6. Functions
 
               6.1. call_control()
 
@@ -69,7 +69,7 @@ Chapter 1. Admin Guide
         5.5. canonical_uri_avp (string)
         5.6. diverter_avp_id (string)
 
-   6. Exported Functions
+   6. Functions
 
         6.1. call_control()
 
@@ -281,7 +281,7 @@ route {
 }
 ...
 
-6. Exported Functions
+6. Functions
 
    6.1. call_control()
 

部分文件因文件數量過多而無法顯示