Browse Source

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

* 'master' of ssh://git.sip-router.org/sip-router:
  modules/rtpproxy: some README improvements
  pkg/kamailio/fedora/16: More tweaks to .spec
  pkg/kamailio/(centos|fedora): Updated boxgrinder appliance definitions
  pkg/kamailio/fedora/16: added SCTP dependencies to .spec
  pkg/kamailio/fedora/16: Updated .spec file
  Makefiles: Updated Makefiles to use db2x_docbook2man when docbook2x-man is not installed
  pkg/kamailio/fedora/16: Updated .spec to set ownership of /etc/kamailio to kamailio.kamailio
  modules/websocket: Updated example configuration file
  modules/msrp: Updated MSRP configuration example
  rtpproxy: allow flags parameter to rtpproxy_destroy()
Olle E. Johansson 13 years ago
parent
commit
ca3f80f76c

+ 1 - 1
Makefile.modules

@@ -295,7 +295,7 @@ endif
 ifneq (,$(wildcard $(MOD_NAME).xml))
 
 $(MOD_NAME).7: $(MOD_NAME).xml
-	docbook2x-man -s ../../doc/stylesheets/serdoc2man.xsl $<
+	$(DOCBOOK) -s ../../doc/stylesheets/serdoc2man.xsl $<
 
 man: $(MOD_NAME).7
 

+ 5 - 0
Makefile.shared

@@ -42,3 +42,8 @@ sh_err_fail=
 try_err=$(1) ; if [ $$? != 0 ]; then echo ERROR: $(1) failed ; fi
 endif
 
+DOCBOOK = $(shell which docbook2x-man 2>/dev/null)
+ifeq ($(DOCBOOK),)
+	DOCBOOK = $(shell which db2x_docbook2man 2>/dev/null)
+endif
+

+ 1 - 1
Makefile.utils

@@ -123,7 +123,7 @@ endif
 ifneq (,$(wildcard $(UTIL_NAME).xml))
 
 $(UTIL_NAME).7: $(UTIL_NAME).xml
-	docbook2x-man -s ../../doc/stylesheets/serdoc2man.xsl $<
+	$(DOCBOOK) -s ../../doc/stylesheets/serdoc2man.xsl $<
 
 man: $(UTIL_NAME).7
 

+ 42 - 18
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),
@@ -397,7 +397,12 @@ loadmodule "xlog.so"
 # ----- mi_fifo params -----
 modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
 
-modparam("htable", "htable", "msrp=>size=8;autoexpire=1800;")
+modparam("auth", "nonce_count", 1)
+modparam("auth", "qop", "auth")
+
+#!substdef "!MSRP_MIN_EXPIRES!1800!g"
+#!substdef "!MSRP_MAX_EXPIRES!3600!g"
+modparam("htable", "htable", "msrp=>size=8;autoexpire=MSRP_MAX_EXPIRES;")
 
 request_route {
         sl_send_reply("403", "No SIP Here");
@@ -424,11 +429,11 @@ event_route[msrp:frame-in] {
 
         msrp_reply_flags("1");
 
-    if(msrp_is_reply())
-    {
-        msrp_relay();
-        exit;
-    }
+        if(msrp_is_reply())
+        {
+                msrp_relay();
+                exit;
+        }
 
         # handle AUTH MSRP requests
         if($msrp(method)=="AUTH")
@@ -438,12 +443,13 @@ event_route[msrp:frame-in] {
                         msrp_relay();
                         exit;
                 }
+
                 # frame for local server - send Use-Path
                 # -- passwd can be loaded from DB based on $au
                 $var(passwd) = "xyz123";
                 if(!pv_www_authenticate("myrealm", "$var(passwd)", "0"))
                 {
-                        if(auth_get_www_authenticate("myrealm", "0",
+                        if(auth_get_www_authenticate("myrealm", "1",
                                                 "$var(wauth)"))
                         {
                                 msrp_reply("401", "Authorization Required",
@@ -453,14 +459,32 @@ event_route[msrp:frame-in] {
                         }
                         exit;
                 }
+
+                if ($hdr(Expires) != $null) {
+                        $var(expires) = (int) $hdr(Expires);
+                        if ($var(expires) < MSRP_MIN_EXPIRES) {
+                                msrp_reply("423", "Interval Out-of-Bounds",
+                                        "Min-Expires: MSRP_MIN_EXPIRES\r\n");
+                                exit;
+                        } else {
+                                msrp_reply("423", "Interval Out-of-Bounds",
+                                        "Max-Expires: MSRP_MAX_EXPIRES\r\n");
+                                exit;
+                        }
+
+                } else
+                        $var(expires) = MSRP_MAX_EXPIRES;
+
                 $var(cnt) = $var(cnt) + 1;
                 pv_printf("$var(sessid)", "s.$(pp).$(var(cnt)).$(RANDOM)");
                 $sht(msrp=>$var(sessid)::srcaddr) = $msrp(srcaddr);
                 $sht(msrp=>$var(sessid)::srcsock) = $msrp(srcsock);
+                $shtex(msrp=>$var(sessid)) = $var(expires) + 5;
                 # - Use-Path: the MSRP address for server + session id
-                $var(UsePath) = "Use-Path: msrp://127.0.0.1:5060/"
-                                + $var(sessid) + ";tcp\r\n";
-                msrp_reply("200", "OK", "$var(UsePath)");
+                $var(headers) = "Use-Path: msrp://127.0.0.1:5060/"
+                                + $var(sessid) + ";tcp\r\n"
+                                + "Expires: " + $var(expires) + "\r\n";
+                msrp_reply("200", "OK", "$var(headers)");
                 exit;
         }
 

+ 34 - 10
modules/msrp/doc/msrp_admin.xml

@@ -442,7 +442,12 @@ loadmodule "xlog.so"
 # ----- mi_fifo params -----
 modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
 
-modparam("htable", "htable", "msrp=>size=8;autoexpire=1800;")
+modparam("auth", "nonce_count", 1)
+modparam("auth", "qop", "auth")
+
+#!substdef "!MSRP_MIN_EXPIRES!1800!g"
+#!substdef "!MSRP_MAX_EXPIRES!3600!g"
+modparam("htable", "htable", "msrp=>size=8;autoexpire=MSRP_MAX_EXPIRES;")
 
 request_route {
 	sl_send_reply("403", "No SIP Here");
@@ -469,11 +474,11 @@ event_route[msrp:frame-in] {
 
 	msrp_reply_flags("1");
 
-    if(msrp_is_reply())
-    {
-        msrp_relay();
-        exit;
-    }
+	if(msrp_is_reply())
+	{
+		msrp_relay();
+		exit;
+	}
 
 	# handle AUTH MSRP requests
 	if($msrp(method)=="AUTH")
@@ -483,12 +488,13 @@ event_route[msrp:frame-in] {
 			msrp_relay();
 			exit;
 		}
+
 		# frame for local server - send Use-Path
 		# -- passwd can be loaded from DB based on $au
 		$var(passwd) = "xyz123";
 		if(!pv_www_authenticate("myrealm", "$var(passwd)", "0"))
 		{
-			if(auth_get_www_authenticate("myrealm", "0",
+			if(auth_get_www_authenticate("myrealm", "1",
 						"$var(wauth)"))
 			{
 				msrp_reply("401", "Authorization Required",
@@ -498,14 +504,32 @@ event_route[msrp:frame-in] {
 			}
 			exit;
 		}
+
+		if ($hdr(Expires) != $null) {
+			$var(expires) = (int) $hdr(Expires);
+			if ($var(expires) < MSRP_MIN_EXPIRES) {
+				msrp_reply("423", "Interval Out-of-Bounds",
+					"Min-Expires: MSRP_MIN_EXPIRES\r\n");
+				exit;
+			} else {
+				msrp_reply("423", "Interval Out-of-Bounds",
+					"Max-Expires: MSRP_MAX_EXPIRES\r\n");
+				exit;
+			}
+
+		} else
+			$var(expires) = MSRP_MAX_EXPIRES;
+		
 		$var(cnt) = $var(cnt) + 1;
 		pv_printf("$var(sessid)", "s.$(pp).$(var(cnt)).$(RANDOM)");
 		$sht(msrp=>$var(sessid)::srcaddr) = $msrp(srcaddr);
 		$sht(msrp=>$var(sessid)::srcsock) = $msrp(srcsock);
+		$shtex(msrp=>$var(sessid)) = $var(expires) + 5;
 		# - Use-Path: the MSRP address for server + session id
-		$var(UsePath) = "Use-Path: msrp://127.0.0.1:5060/"
-				+ $var(sessid) + ";tcp\r\n";
-		msrp_reply("200", "OK", "$var(UsePath)");
+		$var(headers) = "Use-Path: msrp://127.0.0.1:5060/"
+				+ $var(sessid) + ";tcp\r\n"
+				+ "Expires: " + $var(expires) + "\r\n";
+		msrp_reply("200", "OK", "$var(headers)");
 		exit;
 	}
 

+ 64 - 65
modules/rtpproxy/README

@@ -30,13 +30,13 @@ Carsten Bock
 
    ng-voice GmbH
 
-   Copyright © 2003-2008 Sippy Software, Inc.
+   Copyright © 2003-2008 Sippy Software, Inc.
 
-   Copyright © 2005 Voice Sistem SRL
+   Copyright © 2005 Voice Sistem SRL
 
-   Copyright © 2009 TuTPro Inc.
+   Copyright © 2009 TuTPro Inc.
 
-   Copyright © 2010 VoIPEmbedded Inc.
+   Copyright © 2010 VoIPEmbedded Inc.
      __________________________________________________________________
 
    Table of Contents
@@ -152,12 +152,10 @@ Chapter 1. Admin Guide
 1. Overview
 
    This is a module that enables media streams to be proxied via an
-   rtpproxy.
-
-   Known devices that get along over NATs with rtpproxy are ATAs (as
-   clients) and Cisco Gateways (since 12.2(T)) as servers. See
-   http://www.cisco.com/en/US/products/sw/iosswrel/ps1839/products_feature
-   _guide09186a0080110bf9.html">
+   rtpproxy. Rtpproxies know to work with this module are Sippy RTPproxy
+   http://www.rtpproxy.org and ngcp-rtpproxy-ng
+   http://deb.sipwise.com/spce/2.6/pool/main/n/ngcp-mediaproxy-ng. Some
+   features of rtpproxy module apply only one of the two rtpproxies.
 
 2. Multiple RTPProxy usage
 
@@ -168,7 +166,7 @@ Chapter 1. Admin Guide
    load-balancing will be performed over a set and the user has the
    ability to choose what set should be used. The set is selected via its
    id - the id being defined along with the set. Refer to the
-   "rtpproxy_sock" module parameter definition for syntax description.
+   “rtpproxy_sock� module parameter definition for syntax description.
 
    The balancing inside a set is done automatically by the module based on
    the weight of each rtpproxy from the set.
@@ -216,7 +214,7 @@ Chapter 1. Admin Guide
    Definition of socket(s) used to connect to (a set) RTPProxy. It may
    specify a UNIX socket or an IPv4/IPv6 UDP socket.
 
-   Default value is "NONE" (disabled).
+   Default value is “NONE� (disabled).
 
    Example 1.1. Set rtpproxy_sock parameter
 ...
@@ -238,7 +236,7 @@ modparam("rtpproxy", "rtpproxy_sock",
    will not attempt to establish communication to RTPProxy for
    rtpproxy_disable_tout seconds.
 
-   Default value is "60".
+   Default value is “60�.
 
    Example 1.2. Set rtpproxy_disable_tout parameter
 ...
@@ -249,7 +247,7 @@ modparam("rtpproxy", "rtpproxy_disable_tout", 20)
 
    Timeout value in waiting for reply from RTPProxy.
 
-   Default value is "1".
+   Default value is “1�.
 
    Example 1.3. Set rtpproxy_tout parameter
 ...
@@ -261,7 +259,7 @@ modparam("rtpproxy", "rtpproxy_tout", 2)
    How many times rtpproxy should retry to send and receive after timeout
    was generated.
 
-   Default value is "5".
+   Default value is “5�.
 
    Example 1.4. Set rtpproxy_retr parameter
 ...
@@ -273,7 +271,7 @@ modparam("rtpproxy", "rtpproxy_retr", 2)
    Socket to be forced in communicating to RTPProxy. It makes sense only
    for UDP communication. If no one specified, the OS will choose.
 
-   Default value is "NULL".
+   Default value is “NULL�.
 
    Example 1.5. Set force_socket parameter
 ...
@@ -291,7 +289,7 @@ Note
 
    The string must be a complete SDP line, including the EOH (\r\n).
 
-   Default value is "a=nortpproxy:yes\r\n".
+   Default value is “a=nortpproxy:yes\r\n�.
 
    Example 1.6. Set nortpproxy_str parameter
 ...
@@ -306,7 +304,7 @@ modparam("rtpproxy", "nortpproxy_str", "a=sdpmangled:yes\r\n")
    If it is an empty string, no timeout socket will be transmitted to the
    RTP-Proxy.
 
-   Default value is "" (nothing).
+   Default value is “� (nothing).
 
    Example 1.7. Set timeout_socket parameter
 ...
@@ -327,7 +325,7 @@ modparam("nathelper", "timeout_socket", "xmlrpc:http://127.0.0.1:8000/RPC2")
    5.10. start_recording()
    5.11. rtpproxy_stop_stream2uas(prompt_name, count)
 
-5.1. set_rtp_proxy_set(setid)
+5.1.  set_rtp_proxy_set(setid)
 
    Sets the Id of the rtpproxy set to be used for the next
    unforce_rtp_proxy(), rtpproxy_offer(), rtpproxy_answer() or
@@ -343,7 +341,7 @@ set_rtp_proxy_set("2");
 rtpproxy_offer();
 ...
 
-5.2. rtpproxy_offer([flags [, ip_address]])
+5.2.  rtpproxy_offer([flags [, ip_address]])
 
    Rewrites SDP body to ensure that media is passed through an RTP proxy.
    To be invoked on INVITE for the cases the SDPs are in INVITE and 200 OK
@@ -353,16 +351,16 @@ rtpproxy_offer();
      * flags - flags to turn on some features.
           + 1 - append first Via branch to Call-ID when sending command to
             rtpproxy. This can be used to create one media session per
-            branch on the rtpproxy. When sending a subsequent "delete"
+            branch on the rtpproxy. When sending a subsequent “delete�
             command to the rtpproxy, you can then stop just the session
             for a specific branch when passing the flag '1' or '2' in the
-            "unforce_rtpproxy", or stop all sessions for a call when not
+            “unforce_rtpproxy�, or stop all sessions for a call when not
             passing one of those two flags there. This is especially
             useful if you have serially forked call scenarios where
-            rtpproxy gets an "update" command for a new branch, and then a
-            "delete" command for the previous branch, which would
+            rtpproxy gets an “update� command for a new branch, and then a
+            “delete� command for the previous branch, which would
             otherwise delete the full call, breaking the subsequent
-            "lookup" for the new branch. This flag is only supported by
+            “lookup� for the new branch. This flag is only supported by
             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.
@@ -370,7 +368,7 @@ rtpproxy_offer();
             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
+          + l - force “lookup�, that is, only rewrite SDP when
             corresponding session is already exists in the RTP proxy. By
             default is on when the session is to be completed.
           + i, e - these flags specify the direction of the SIP message.
@@ -454,7 +452,7 @@ onreply_route[2]
 ...
 }
 
-5.3. rtpproxy_answer([flags [, ip_address]])
+5.3.  rtpproxy_answer([flags [, ip_address]])
 
    Rewrites SDP body to ensure that media is passed through an RTP proxy.
    To be invoked on 200 OK for the cases the SDPs are in INVITE and 200 OK
@@ -470,7 +468,7 @@ onreply_route[2]
 
    See rtpproxy_offer() function example above for example.
 
-5.4. rtpproxy_destroy([flags])
+5.4.  rtpproxy_destroy([flags])
 
    Tears down the RTPProxy session for the current call.
 
@@ -480,16 +478,16 @@ onreply_route[2]
      * flags - flags to turn on some features.
           + 1 - append first Via branch to Call-ID when sending command to
             rtpproxy. This can be used to create one media session per
-            branch on the rtpproxy. When sending a subsequent "delete"
+            branch on the rtpproxy. When sending a subsequent “delete�
             command to the rtpproxy, you can then stop just the session
             for a specific branch when passing the flag '1' or '2' in the
-            "unforce_rtpproxy", or stop all sessions for a call when not
+            “unforce_rtpproxy�, or stop all sessions for a call when not
             passing one of those two flags there. This is especially
             useful if you have serially forked call scenarios where
-            rtpproxy gets an "update" command for a new branch, and then a
-            "delete" command for the previous branch, which would
+            rtpproxy gets an “update� command for a new branch, and then a
+            “delete� command for the previous branch, which would
             otherwise delete the full call, breaking the subsequent
-            "lookup" for the new branch. This flag is only supported by
+            “lookup� for the new branch. This flag is only supported by
             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.
@@ -499,11 +497,11 @@ onreply_route[2]
 rtpproxy_destroy();
 ...
 
-5.5. unforce_rtp_proxy()
+5.5.  unforce_rtp_proxy()
 
    Same as rtpproxy_destroy().
 
-5.6. rtpproxy_manage([flags [, ip_address]])
+5.6.  rtpproxy_manage([flags [, ip_address]])
 
    Manage the RTPProxy session - it combines the functionality of
    rtpproxy_offer(), rtpproxy_answer() and unfroce_rtpproxy(), detecting
@@ -531,7 +529,7 @@ rtpproxy_destroy();
 rtpproxy_manage();
 ...
 
-5.7. rtpproxy_stream2uac(prompt_name, count),
+5.7.  rtpproxy_stream2uac(prompt_name, count),
 
    Instruct the RTPproxy to stream prompt/announcement pre-encoded with
    the makeann command from the RTPproxy distribution. The uac/uas suffix
@@ -573,11 +571,11 @@ rtpproxy_manage();
     };
 ...
 
-5.8. rtpproxy_stream2uas(prompt_name, count)
+5.8.  rtpproxy_stream2uas(prompt_name, count)
 
    See function rtpproxy_stream2uac(prompt_name, count).
 
-5.9. rtpproxy_stop_stream2uac(),
+5.9.  rtpproxy_stop_stream2uac(),
 
    Stop streaming of announcement/prompt/MOH started previously by the
    respective rtpproxy_stream2xxx. The uac/uas suffix selects whose
@@ -586,10 +584,11 @@ rtpproxy_manage();
 
    These functions can be used from REQUEST_ROUTE, ONREPLY_ROUTE.
 
-5.10. start_recording()
+5.10.  start_recording()
 
-   This command will send a signal to the RTP-Proxy to record the RTP
-   stream on the RTP-Proxy.
+   This function will send a signal to the RTP-Proxy to record the RTP
+   stream on the RTP-Proxy. This function is only supported by Sippy
+   RTPproxy at the moment!
 
    This function can be used from REQUEST_ROUTE and ONREPLY_ROUTE.
 
@@ -598,7 +597,7 @@ rtpproxy_manage();
 start_recording();
 ...
 
-5.11. rtpproxy_stop_stream2uas(prompt_name, count)
+5.11.  rtpproxy_stop_stream2uas(prompt_name, count)
 
    See function rtpproxy_stop_stream2uac(prompt_name, count).
 
@@ -636,7 +635,7 @@ start_recording();
    NOTE: if a rtpproxy is defined multiple times (in the same or diferente
    sete), all its instances will be enables/disabled.
 
-   Example 1.16. nh_enable_rtpp usage
+   Example 1.16.  nh_enable_rtpp usage
 ...
 $ kamctl fifo nh_enable_rtpp udp:192.168.2.133:8081 0
 ...
@@ -648,52 +647,52 @@ $ kamctl fifo nh_enable_rtpp udp:192.168.2.133:8081 0
 
    No parameter.
 
-   Example 1.17. nh_show_rtpp usage
+   Example 1.17.  nh_show_rtpp usage
 ...
 $ kamctl fifo nh_show_rtpp
 ...
 
 Chapter 2. Frequently Asked Questions
 
-   2.1. What happend with "rtpproxy_disable" parameter?
+   2.1. What happend with “rtpproxy_disable� parameter?
    2.2. Where can I find more about Kamailio?
    2.3. Where can I post a question about this module?
    2.4. How can I report a bug?
 
    2.1.
 
-   What happend with "rtpproxy_disable" parameter?
+       What happend with “rtpproxy_disable� parameter?
 
-   It was removed as it became obsolete - now "rtpproxy_sock" can take
-   empty value to disable the rtpproxy functionality.
+       It was removed as it became obsolete - now “rtpproxy_sock� can take
+       empty value to disable the rtpproxy functionality.
 
    2.2.
 
-   Where can I find more about Kamailio?
+       Where can I find more about Kamailio?
 
-   Take a look at http://www.kamailio.org/.
+       Take a look at http://www.kamailio.org/.
 
    2.3.
 
-   Where can I post a question about this module?
+       Where can I post a question about this module?
 
-   First at all check if your question was already answered on one of our
-   mailing lists:
-     * User Mailing List -
-       http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-     * Developer Mailing List -
-       http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
+       First at all check if your question was already answered on one of our
+       mailing lists:
+         * User Mailing List -
+           http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
+         * Developer Mailing List -
+           http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
 
-   E-mails regarding any stable Kamailio release should be sent to
-   <[email protected]> and e-mails regarding development
-   versions should be sent to <[email protected]>.
+       E-mails regarding any stable Kamailio release should be sent to
+       <[email protected]> and e-mails regarding development
+       versions should be sent to <[email protected]>.
 
-   If you want to keep the mail private, send it to
-   <[email protected]>.
+       If you want to keep the mail private, send it to
+       <[email protected]>.
 
    2.4.
 
-   How can I report a bug?
+       How can I report a bug?
 
-   Please follow the guidelines provided at:
-   http://sip-router.org/tracker.
+       Please follow the guidelines provided at:
+       http://sip-router.org/tracker.

+ 5 - 9
modules/rtpproxy/doc/rtpproxy_admin.xml

@@ -18,13 +18,9 @@
 	<title>Overview</title>
 	<para>
 		This is a module that enables media streams to be proxied
-		via an rtpproxy.
-	</para>
-	<para>
-		Known devices that get along over &nat;s with rtpproxy are ATAs
-		(as clients) and Cisco Gateways (since 12.2(T)) as servers.  See <ulink
-		url="http://www.cisco.com/en/US/products/sw/iosswrel/ps1839/products_feature_guide09186a0080110bf9.html">
-		http://www.cisco.com/en/US/products/sw/iosswrel/ps1839/products_feature_guide09186a0080110bf9.html"></ulink>
+		via an rtpproxy.  Rtpproxies know to work with this module
+		are Sippy RTPproxy <ulink url="http://www.rtpproxy.org"></ulink>
+		and ngcp-rtpproxy-ng <ulink url="http://deb.sipwise.com/spce/2.6/pool/main/n/ngcp-mediaproxy-ng"></ulink>.  Some features of rtpproxy module apply only one of the two rtpproxies.
 	</para>
 	</section>
 
@@ -673,8 +669,8 @@ rtpproxy_manage();
 		<function moreinfo="none">start_recording()</function>
 		</title>
 		<para>
-		This command will send a signal to the RTP-Proxy to record
-		the RTP stream on the RTP-Proxy.
+		This function will send a signal to the RTP-Proxy to record
+		the RTP stream on the RTP-Proxy. <emphasis>This function is only supported by Sippy RTPproxy at the moment!</emphasis>
 		</para>
 		<para>
 		This function can be used from REQUEST_ROUTE and ONREPLY_ROUTE.

+ 6 - 0
modules/rtpproxy/rtpproxy.c

@@ -360,6 +360,12 @@ static cmd_export_t cmds[] = {
 	{"rtpproxy_destroy",   (cmd_function)unforce_rtp_proxy_f,    0,
 		0, 0,
 		ANY_ROUTE},
+	{"unforce_rtp_proxy",  (cmd_function)unforce_rtp_proxy_f,    1,
+		0, 0,
+		ANY_ROUTE},
+	{"rtpproxy_destroy",   (cmd_function)unforce_rtp_proxy_f,    1,
+		0, 0,
+		ANY_ROUTE},
 	{"start_recording",    (cmd_function)start_recording_f,      0,
 		0, 0,
 		ANY_ROUTE },

+ 31 - 9
modules/websocket/example/kamailio.cfg

@@ -12,6 +12,8 @@
 #!substdef "!MY_WS_ADDR!tcp:MY_IP_ADDR:MY_WS_PORT!g"
 #!substdef "!MY_WSS_ADDR!tls:MY_IP_ADDR:MY_WSS_PORT!g"
 #!substdef "!MY_MSRP_ADDR!tls:MY_IP_ADDR:MY_MSRP_PORT!g"
+#!substdef "!MSRP_MIN_EXPIRES!1800!g"
+#!substdef "!MSRP_MAX_EXPIRES!3600!g"
 
 ##!define LOCAL_TEST_RUN
 #!define WITH_TLS
@@ -110,6 +112,10 @@ modparam("registrar", "gruu_enabled", 0)
 modparam("usrloc", "db_url", "DBURL")
 modparam("usrloc", "db_mode", 0)
 
+# ----- auth params -----
+modparam("auth", "nonce_count", 1)
+modparam("auth", "qop", "auth")
+
 # ----- auth_db params -----
 modparam("auth_db", "db_url", "DBURL")
 modparam("auth_db", "calculate_ha1", yes)
@@ -137,7 +143,7 @@ modparam("nathelper|registrar", "received_avp", "$avp(RECEIVED)")
 
 #!ifdef WITH_MSRP
 # ----- htable params -----
-modparam("htable", "htable", "msrp=>size=8;autoexpire=3600;")
+modparam("htable", "htable", "msrp=>size=8;autoexpire=MSRP_MAX_EXPIRES;")
 #!endif
 
 
@@ -416,12 +422,10 @@ event_route[msrp:frame-in] {
 			msrp_relay();
 			exit;
 		}
-		# frame for local server - send Use-Path
-		# -- passwd can be loaded from DB based on $au
-		$var(passwd) = "xyz123";
-		if(!pv_www_authenticate("myrealm", "$var(passwd)", "0"))
+
+		if(!www_authenticate("MY_DOMAIN", "subscriber"))
 		{
-			if(auth_get_www_authenticate("myrealm", "0",
+			if(auth_get_www_authenticate("myrealm", "1",
 						"$var(wauth)"))
 			{
 				msrp_reply("401", "Authorization Required",
@@ -431,14 +435,32 @@ event_route[msrp:frame-in] {
 			}
 			exit;
 		}
+
+		if ($hdr(Expires) != $null) {
+			$var(expires) = (int) $hdr(Expires);
+
+			if ($var(expires) < MSRP_MIN_EXPIRES) {
+				msrp_reply("423", "Interval Out-of-Bounds",
+					"Min-Expires: MSRP_MIN_EXPIRES\r\n");
+				exit;
+			} else if ($var(expires) > MSRP_MAX_EXPIRES) {
+				msrp_reply("423", "Interval Out-of-Bounds",
+					"Max-Expires: MSRP_MAX_EXPIRES\r\n");
+					exit;
+			}
+		} else
+			$var(expires) = MSRP_MAX_EXPIRES;
+
 		$var(cnt) = $var(cnt) + 1;
 		pv_printf("$var(sessid)", "s.$(pp).$(var(cnt)).$(RANDOM)");
 		$sht(msrp=>$var(sessid)::srcaddr) = $msrp(srcaddr);
 		$sht(msrp=>$var(sessid)::srcsock) = $msrp(srcsock);
+		$shtex(msrp=>$var(sessid)) = MSRP_MAX_EXPIRES + 5;
 		# - Use-Path: the MSRP address for server + session id
-		$var(UsePath) = "Use-Path: msrp://MY_IP_ADDR:MY_MSRP_PORT/"
-				+ $var(sessid) + ";tcp\r\n";
-		msrp_reply("200", "OK", "$var(UsePath)");
+		$var(headers) = "Use-Path: msrp://MY_IP_ADDR:MY_MSRP_PORT/"
+				+ $var(sessid) + ";tcp\r\n"
+				+ "Expires: " + $var(expires) + "\r\n";
+		msrp_reply("200", "OK", "$var(expires)");
 		exit;
 	}
 

+ 2 - 1
pkg/kamailio/centos/6/kamailio-build.appl

@@ -23,13 +23,14 @@ packages:
   - libpurple-devel		# kamailio-purple
   - libunistring-devel		# kamailio-websocket
   - libxml2-devel		# kamailio-cdp, kamailio-cpl, kamailio-presence, kamailio-purple, kamailio-utils, kamailio-xmlops, kamailio-xmlrpc
+  - lksctp-tools-devel		# kamailio
   - lua-devel			# kamailio-lua
   - make			# kamailio
   - mod_perl-devel		# kamailio-perl
   - mysql-devel			# kamailio-mysql
   - net-snmp-devel		# kamailio-snmpstats
   - openldap-devel		# kamailio-ldap
-  - openssl-devel		# kamailio-tls, kamailio-websocket
+  - openssl-devel		# kamailio, kamailio-websocket
   - pcre-devel			# kamailio-regex, kamailio-dialplan, kamailio-lcr
   - postgresql-devel		# kamailio-postgresql
   - python-devel		# kamailio-python

+ 2 - 1
pkg/kamailio/centos/6/kamailio.appl

@@ -19,11 +19,12 @@ packages:
   - libpurple			# kamailio-purple
   - libunistring		# kamailio-websocket
   - libxml2			# kamailio-cdp, kamailio-cpl, kamailio-presence, kamailio-purple, kamailio-utils, kamailio-xmlops, kamailio-xmlrpc
+  - lksctp-tools		# kamailio
   - mod_perl			# kamailio-perl
   - mysql-libs			# kamailio-mysql
   - net-snmp-libs		# kamailio-snmpstats
   - openldap			# kamailio-ldap
-  - openssl			# kamailio-tls, kamailio-websocket
+  - openssl			# kamailio, kamailio-websocket
   - pcre			# kamailio-regex, kamailio-dialplan, kamailio-lcr
   - perl-Authen-SASL		# kamailio-perl
   - perl-LDAP			# kamailio-perl

+ 2 - 1
pkg/kamailio/fedora/16/kamailio-build.appl

@@ -27,6 +27,7 @@ packages:
   - libpurple-devel		# kamailio-purple
   - libunistring-devel		# kamailio-websocket
   - libxml2-devel		# kamailio-cdp, kamailio-cpl, kamailio-presence, kamailio-purple, kamailio-utils, kamailio-xmlops, kamailio-xmlrpc
+  - lksctp-tools-devel		# kamailio
   - lua-devel			# kamailio-lua
   - make			# kamailio
   - mod_perl-devel		# kamailio-perl
@@ -34,7 +35,7 @@ packages:
   - mysql-devel			# kamailio-mysql
   - net-snmp-devel		# kamailio-snmpstats
   - openldap-devel		# kamailio-ldap
-  - openssl-devel		# kamailio-tls, kamailio-websocket
+  - openssl-devel		# kamailio, kamailio-websocket
   - pcre-devel			# kamailio-regex, kamailio-dialplan, kamailio-lcr
   - postgresql-devel		# kamailio-postgresql
   - python-devel		# kamailio-python

+ 2 - 1
pkg/kamailio/fedora/16/kamailio.appl

@@ -23,12 +23,13 @@ packages:
   - libpurple			# kamailio-purple
   - libunistring		# kamailio-websocket
   - libxml2			# kamailio-cdp, kamailio-cpl, kamailio-presence, kamailio-purple, kamailio-utils, kamailio-xmlops, kamailio-xmlrpc
+  - lksctp-tools		# kamailio
   - mod_perl			# kamailio-perl
   - mono-core			# kamailio-mono
   - mysql-libs			# kamailio-mysql
   - net-snmp-libs		# kamailio-snmpstats
   - openldap			# kamailio-ldap
-  - openssl			# kamailio-tls, kamailio-websocket
+  - openssl			# kamailio, kamailio-websocket
   - pcre			# kamailio-regex, kamailio-dialplan, kamailio-lcr
   - perl-Authen-SASL		# kamailio-perl
   - perl-LDAP			# kamailio-perl

+ 31 - 26
pkg/kamailio/fedora/16/kamailio.spec

@@ -20,7 +20,7 @@ Conflicts:     kamailio-unixODBC < %ver, kamailio-bdb < %ver
 Conflicts:     kamailio-sqlite < %ver, kamailio-utils < %ver
 Conflicts:     kamailio-cpl < %ver, kamailio-snmpstats < %ver
 Conflicts:     kamailio-presence < %ver, kamailio-xmpp < %ver
-Conflicts:     kamailio-tls < %ver, kamailio-purple < %ver, kamailio-ldap < %ver
+Conflicts:     kamailio-purple < %ver, kamailio-ldap < %ver
 Conflicts:     kamailio-xmlrpc < %ver, kamailio-perl < %ver, kamailio-lua < %ver
 Conflicts:     kamailio-python < %ver, kamailio-regex < %ver
 Conflicts:     kamailio-dialplan < %ver, kamailio-lcr < %ver
@@ -31,7 +31,9 @@ Conflicts:     kamailio-radius < %ver, kamailio-carrierroute < %ver
 Conflicts:     kamailio-redis < %ver, kamailio-json < %ver 
 Conflicts:     kamailio-mono < %ver, kamailio-GeoIP < %ver
 %endif
-BuildRequires: bison flex gcc make redhat-rpm-config
+Requires:      openssl lksctp-tools
+BuildRequires: bison flex gcc make redhat-rpm-config openssl-devel
+BuildRequires: lksctp-tools-devel
 
 %description
 Kamailio (former OpenSER) is an Open Source SIP Server released under GPL, able
@@ -150,16 +152,6 @@ BuildRequires: expat-devel
 SIP/XMPP IM gateway for Kamailio.
 
 
-%package tls
-Summary:       TLS transport for Kamailio.
-Group:         System Environment/Daemons
-Requires:      openssl, kamailio = %ver
-BuildRequires: openssl-devel
-
-%description tls
-TLS transport for Kamailio.
-
-
 %package ldap
 Summary:       LDAP search interface for Kamailio.
 Group:         System Environment/Daemons
@@ -253,8 +245,8 @@ XML operation functions for Kamailio.
 %package websocket
 Summary:       WebSocket transport for Kamailio.
 Group:         System Environment/Daemons
-Requires:      openssl, libunistring, kamailio = %ver
-BuildRequires: openssl-devel, libunistring-devel
+Requires:      libunistring, kamailio = %ver
+BuildRequires: libunistring-devel
 
 %description websocket
 WebSocket transport for Kamailio.
@@ -356,7 +348,7 @@ Max Mind GeoIP real-time query support for Kamailio.
 %build
 make FLAVOUR=kamailio cfg prefix=/usr cfg_prefix=$RPM_BUILD_ROOT\
 	basedir=$RPM_BUILD_ROOT cfg_target=/%{_sysconfdir}/kamailio/\
-	modules_dirs="modules modules_k"
+	modules_dirs="modules modules_k" SCTP=1 STUN=1
 make
 %if 0%{?fedora}
 make every-module skip_modules="auth_identity db_cassandra iptrtpproxy\
@@ -364,15 +356,18 @@ make every-module skip_modules="auth_identity db_cassandra iptrtpproxy\
 	kpostgres kunixodbc kldap kperl kpython klua kutils kpurple ktls kxmpp\
 	kcpl ksnmpstats kcarrierroute kpresence kradius kgeoip kregex kdialplan\
 	klcr ksqlite kredis kjson kmono kberkeley kwebsocket"\
-	include_modules="xmlrpc xmlops cdp cdp_avp corex"
+	include_modules="xmlrpc xmlops cdp cdp_avp corex malloc_test\
+	auth_diameter"
 %else
 make every-module skip_modules="auth_identity db_cassandra iptrtpproxy\
 	db_oracle memcached mi_xmlrpc osp" group_include="kstandard kmysql\
 	kpostgres kunixodbc kldap kperl kpython klua kutils kpurple ktls kxmpp\
 	kcpl ksnmpstats kpresence kregex kdialplan\
 	klcr ksqlite kberkeley kwebsocket"\
-	include_modules="xmlrpc xmlops cdp cdp_avp corex"
+	include_modules="xmlrpc xmlops cdp cdp_avp corex malloc_test\
+	auth_diameter"
 %endif
+make utils
 
 
 
@@ -386,7 +381,8 @@ make install-modules-all skip_modules="auth_identity db_cassandra iptrtpproxy\
 	kpostgres kunixodbc kldap kperl kpython klua kutils kpurple ktls kxmpp\
 	kcpl ksnmpstats kcarrierroute kpresence kradius kgeoip kregex kdialplan\
 	klcr ksqlite kredis kjson kmono kberkeley kwebsocket"\
-	include_modules="xmlrpc xmlops cdp cdp_avp"
+	include_modules="xmlrpc xmlops cdp cdp_avp corex malloc_test\
+	auth_diameter"
 
 mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
 install -m644 pkg/kamailio/fedora/%{?fedora}/kamailio.service \
@@ -401,7 +397,8 @@ make install-modules-all skip_modules="auth_identity db_cassandra iptrtpproxy\
 	kpostgres kunixodbc kldap kperl kpython klua kutils kpurple ktls kxmpp\
 	kcpl ksnmpstats kpresence kregex kdialplan\
 	klcr ksqlite kberkeley kwebsocket"\
-	include_modules="xmlrpc xmlops cdp cdp_avp"
+	include_modules="xmlrpc xmlops cdp cdp_avp corex malloc_test\
+	auth_diameter"
 
 mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d
 install -m755 pkg/kamailio/centos/%{?centos}/kamailio.init \
@@ -496,6 +493,7 @@ fi
 %doc %{_docdir}/kamailio/modules/README.sl
 %doc %{_docdir}/kamailio/modules/README.sms
 %doc %{_docdir}/kamailio/modules/README.textopsx
+%doc %{_docdir}/kamailio/modules/README.tls
 %doc %{_docdir}/kamailio/modules/README.tm
 %doc %{_docdir}/kamailio/modules/README.tmrec
 %doc %{_docdir}/kamailio/modules/README.topoh
@@ -556,7 +554,7 @@ fi
 %doc %{_docdir}/kamailio/modules_k/README.usrloc
 %doc %{_docdir}/kamailio/modules_k/README.xlog
 
-%dir %{_sysconfdir}/kamailio
+%dir %attr(-,kamailio,kamailio) %{_sysconfdir}/kamailio
 %config(noreplace) %{_sysconfdir}/kamailio/*
 %if 0%{?fedora}
 %config %{_unitdir}/*
@@ -621,6 +619,7 @@ fi
 %{_libdir}/kamailio/modules/sms.so
 %{_libdir}/kamailio/modules/tm.so
 %{_libdir}/kamailio/modules/tmrec.so
+%{_libdir}/kamailio/modules/tls.so
 %{_libdir}/kamailio/modules/textopsx.so
 %{_libdir}/kamailio/modules/topoh.so
 %{_libdir}/kamailio/modules/xhttp.so
@@ -703,6 +702,9 @@ fi
 %{_libdir}/kamailio/kamctl/dbtextdb/dbtextdb.pyo
 
 %{_mandir}/man5/*
+%if 0%{?fedora}
+%{_mandir}/man7/auth.7.gz
+%endif
 %{_mandir}/man8/*
 
 %dir %{_datadir}/kamailio
@@ -820,12 +822,6 @@ fi
 %{_libdir}/kamailio/modules_k/xmpp.so
 
 
-%files tls
-%defattr(-,root,root)
-%doc %{_docdir}/kamailio/modules/README.tls
-%{_libdir}/kamailio/modules/tls.so
-
-
 %files purple
 %defattr(-,root,root)
 %doc %{_docdir}/kamailio/modules_k/README.purple
@@ -978,6 +974,15 @@ fi
 
 
 %changelog
+* Fri Oct 20 2012 Peter Dunkley <[email protected]>
+  - Set ownership of /etc/kamailio to kamailio.kamailio
+  - Added installation of auth.7.gz for Fedora now that manpages are built for
+    Fedora
+  - Added "make utils" to the build section (when it's not there utils get
+    built during the install - which isn't right)
+  - SCTP and STUN now included in this build
+  - Removed kamailio-tls package - tls module now in main kamailio RPM as that
+    has openssl as a dependency for STUN
 * Sun Sep 17 2012 Peter Dunkley <[email protected]>
   - Added corex module to RPM builds
   - Updated rel to dev4

+ 2 - 1
pkg/kamailio/fedora/17/kamailio-build.appl

@@ -28,6 +28,7 @@ packages:
   - libpurple-devel		# kamailio-purple
   - libunistring-devel		# kamailio-websocket
   - libxml2-devel		# kamailio-cdp, kamailio-cpl, kamailio-presence, kamailio-purple, kamailio-utils, kamailio-xmlops, kamailio-xmlrpc
+  - lksctp-tools-devel		# kamailio
   - lua-devel			# kamailio-lua
   - make			# kamailio
   - mod_perl-devel		# kamailio-perl
@@ -35,7 +36,7 @@ packages:
   - mysql-devel			# kamailio-mysql
   - net-snmp-devel		# kamailio-snmpstats
   - openldap-devel		# kamailio-ldap
-  - openssl-devel		# kamailio-tls, kamailio-websocket
+  - openssl-devel		# kamailio, kamailio-websocket
   - pcre-devel			# kamailio-regex, kamailio-dialplan, kamailio-lcr
   - postgresql-devel		# kamailio-postgresql
   - python-devel		# kamailio-python

+ 2 - 1
pkg/kamailio/fedora/17/kamailio.appl

@@ -24,12 +24,13 @@ packages:
   - libpurple			# kamailio-purple
   - libunistring		# kamailio-websocket
   - libxml2			# kamailio-cdp, kamailio-cpl, kamailio-presence, kamailio-purple, kamailio-utils, kamailio-xmlops, kamailio-xmlrpc
+  - lksctp-tools		# kamailio
   - mod_perl			# kamailio-perl
   - mono-core			# kamailio-mono
   - mysql-libs			# kamailio-mysql
   - net-snmp-libs		# kamailio-snmpstats
   - openldap			# kamailio-ldap
-  - openssl			# kamailio-tls, kamailio-websocket
+  - openssl			# kamailio, kamailio-websocket
   - pcre			# kamailio-regex, kamailio-dialplan, kamailio-lcr
   - perl-Authen-SASL		# kamailio-perl
   - perl-LDAP			# kamailio-perl