Module: sip-router
Branch: master
Commit: 5b6f68ae0dc50c05902ace37f1081b19bda0320e
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5b6f68a…
Author: Carsten Bock <carsten(a)ng-voice.com>
Committer: Carsten Bock <carsten(a)ng-voice.com>
Date: Tue Nov 6 16:32:50 2012 +0100
RTPProxy: Documentation improvements
- added a note about compatibility with different implementations for the "x"-flag (namely RFC 4091 and RFC 6157)
- made more clear, that "x" is only a shortcut for the "IE" and "EI" flags of RTPProxy
---
modules/rtpproxy/doc/rtpproxy_admin.xml | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/modules/rtpproxy/doc/rtpproxy_admin.xml b/modules/rtpproxy/doc/rtpproxy_admin.xml
index e3a403e..b7f719e 100644
--- a/modules/rtpproxy/doc/rtpproxy_admin.xml
+++ b/modules/rtpproxy/doc/rtpproxy_admin.xml
@@ -343,11 +343,17 @@ rtpproxy_offer();
the 'w' flag for clients behind NAT! See also above notes!
</para></listitem>
<listitem><para>
- <emphasis>x</emphasis> - this flag will do automatic bridging between IPv4 on the
+ <emphasis>x</emphasis> - this flag a shortcut for using the "ie" or "ei"-flags of RTP-Proxy,
+ in order to 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)).
+ </para><para>
+ Note: Please note, that this will only work properly with non-dual-stack user-agents or with
+ dual-stack clients according to RFC6157 (which suggest ICE for Dual-Stack implementations).
+ This short-cut will not work properly with RFC4091 (ANAT) compatible clients, which suggests
+ having different m-lines with different IP-protocols grouped together.
</para></listitem>
<listitem><para>
<emphasis>f</emphasis> - instructs rtpproxy to ignore marks
Module: sip-router
Branch: 3.3
Commit: 020acff35f8e9dfa62aba8678a781a0f7bbb110b
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=020acff…
Author: Klaus Darilion <klaus.mailinglists(a)pernau.at>
Committer: Klaus Darilion <klaus.mailinglists(a)pernau.at>
Date: Wed Nov 7 13:55:55 2012 +0000
allow freeing of NULL pointer to behave like standard free() function
The memory functions provided to openssl needs to behave like standard
memory functions, i.e. free(). Therefore, ser_free must accept NULL
pointers, see: http://openssl.6102.n7.nabble.com/Custom-free-routine-is-invoked-with-NULL-…
As shm_free() aborts on null pointers, we have to check for null pointer
here in the wrapper function.
(cherry picked from commit 7c37f8d4dc311c64c12e0b03b5e312892f9d886c)
---
modules/tls/tls_init.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/modules/tls/tls_init.c b/modules/tls/tls_init.c
index e409b5e..b629afa 100644
--- a/modules/tls/tls_init.c
+++ b/modules/tls/tls_init.c
@@ -295,7 +295,15 @@ static void* ser_realloc(void *ptr, size_t size)
static void ser_free(void *ptr)
{
- shm_free(ptr);
+ /* The memory functions provided to openssl needs to behave like standard
+ * memory functions, i.e. free(). Therefore, ser_free must accept NULL
+ * pointers, see: http://openssl.6102.n7.nabble.com/Custom-free-routine-is-invoked-with-NULL-…
+ * As shm_free() aborts on null pointers, we have to check for null pointer
+ * here in the wrapper function.
+ */
+ if (ptr) {
+ shm_free(ptr);
+ }
}
Module: sip-router
Branch: master
Commit: 7c37f8d4dc311c64c12e0b03b5e312892f9d886c
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7c37f8d…
Author: Klaus Darilion <klaus.mailinglists(a)pernau.at>
Committer: Klaus Darilion <klaus.mailinglists(a)pernau.at>
Date: Wed Nov 7 13:55:55 2012 +0000
allow freeing of NULL pointer to behave like standard free() function
The memory functions provided to openssl needs to behave like standard
memory functions, i.e. free(). Therefore, ser_free must accept NULL
pointers, see: http://openssl.6102.n7.nabble.com/Custom-free-routine-is-invoked-with-NULL-…
As shm_free() aborts on null pointers, we have to check for null pointer
here in the wrapper function.
---
modules/tls/tls_init.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/modules/tls/tls_init.c b/modules/tls/tls_init.c
index e409b5e..b629afa 100644
--- a/modules/tls/tls_init.c
+++ b/modules/tls/tls_init.c
@@ -295,7 +295,15 @@ static void* ser_realloc(void *ptr, size_t size)
static void ser_free(void *ptr)
{
- shm_free(ptr);
+ /* The memory functions provided to openssl needs to behave like standard
+ * memory functions, i.e. free(). Therefore, ser_free must accept NULL
+ * pointers, see: http://openssl.6102.n7.nabble.com/Custom-free-routine-is-invoked-with-NULL-…
+ * As shm_free() aborts on null pointers, we have to check for null pointer
+ * here in the wrapper function.
+ */
+ if (ptr) {
+ shm_free(ptr);
+ }
}
Module: sip-router
Branch: 3.3
Commit: cd1c367218cdcd5f0867af2234f6080e8e6622a6
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=cd1c367…
Author: Carsten Bock <carsten(a)ng-voice.com>
Committer: Carsten Bock <carsten(a)ng-voice.com>
Date: Mon Sep 17 17:25:38 2012 +0200
New Option: "x" for automatic bridging between IPv4 and IPv6.
Based on the following assumption: "i" is the IPv4 interface
and "e" is the IPv6 interface on the RTPProxy (tested with both
RTPProxy and Sipwise's ngcp-mediaproxy-ng).
Mechanism is as follows:
- IP in SDP is IPv4: Do bridging "ie"
- IP in SDP is IPv6: Do bridging "ei"
Not a big deal, but makes the configuration much more easier.
---
modules/rtpproxy/doc/rtpproxy.xml | 8 ++++++++
modules/rtpproxy/doc/rtpproxy_admin.xml | 7 +++++++
modules/rtpproxy/rtpproxy.c | 22 +++++++++++++++++++++-
3 files changed, 36 insertions(+), 1 deletions(-)
diff --git a/modules/rtpproxy/doc/rtpproxy.xml b/modules/rtpproxy/doc/rtpproxy.xml
index d5a15ee..741a4d9 100644
--- a/modules/rtpproxy/doc/rtpproxy.xml
+++ b/modules/rtpproxy/doc/rtpproxy.xml
@@ -57,6 +57,14 @@
<email>osas(a)voipembedded.com</email>
</address>
</editor>
+ <editor>
+ <firstname>Carsten</firstname>
+ <surname>Bock</surname>
+ <affiliation><orgname>ng-voice GmbH</orgname></affiliation>
+ <address>
+ <email>carsten(a)ng-voice.com</email>
+ </address>
+ </editor>
</authorgroup>
<copyright>
<year>2003-2008</year>
diff --git a/modules/rtpproxy/doc/rtpproxy_admin.xml b/modules/rtpproxy/doc/rtpproxy_admin.xml
index 6b9577a..64843eb 100644
--- a/modules/rtpproxy/doc/rtpproxy_admin.xml
+++ b/modules/rtpproxy/doc/rtpproxy_admin.xml
@@ -343,6 +343,13 @@ rtpproxy_offer();
the 'w' flag for clients behind NAT! See also above notes!
</para></listitem>
<listitem><para>
+ <emphasis>x</emphasis> - 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)).
+ </para></listitem>
+ <listitem><para>
<emphasis>f</emphasis> - instructs rtpproxy to ignore marks
inserted by another rtpproxy in transit to indicate that the
session is already goes through another proxy. Allows creating
diff --git a/modules/rtpproxy/rtpproxy.c b/modules/rtpproxy/rtpproxy.c
index b50b2d1..e18655f 100644
--- a/modules/rtpproxy/rtpproxy.c
+++ b/modules/rtpproxy/rtpproxy.c
@@ -1939,6 +1939,7 @@ force_rtp_proxy(struct sip_msg* msg, char* str1, char* str2, int offer, int forc
{NULL, 0}, /* Timeout-Socket */
};
int iovec_param_count;
+ int autobridge_ipv4v6;
char *c1p, *c2p, *bodylimit, *o1p;
char itoabuf_buf[20];
@@ -1958,7 +1959,7 @@ force_rtp_proxy(struct sip_msg* msg, char* str1, char* str2, int offer, int forc
LM_ERR("out of pkg memory\n");
FORCE_RTP_PROXY_RET (-1);
}
- flookup = force = real = orgip = commip = via = 0;
+ flookup = force = real = orgip = commip = via = autobridge_ipv4v6 = 0;
for (cp = str1; cp != NULL && *cp != '\0'; cp++) {
switch (*cp) {
case '1':
@@ -2022,6 +2023,11 @@ force_rtp_proxy(struct sip_msg* msg, char* str1, char* str2, int offer, int forc
orgip = 1;
break;
+ case 'x':
+ case 'X':
+ autobridge_ipv4v6 = 1;
+ break;
+
case 'w':
case 'W':
if (append_opts(&opts, 'S') == -1) {
@@ -2199,6 +2205,12 @@ force_rtp_proxy(struct sip_msg* msg, char* str1, char* str2, int offer, int forc
}
/* XXX must compare address families in all addresses */
if (pf == AF_INET6) {
+ if (autobridge_ipv4v6 != 0) {
+ if ((append_opts(&opts, 'E') == -1) && (append_opts(&opts, 'I') == -1)) {
+ LM_ERR("out of pkg memory\n");
+ FORCE_RTP_PROXY_RET (-1);
+ }
+ }
if (append_opts(&opts, '6') == -1) {
LM_ERR("out of pkg memory\n");
FORCE_RTP_PROXY_RET (-1);
@@ -2206,7 +2218,15 @@ force_rtp_proxy(struct sip_msg* msg, char* str1, char* str2, int offer, int forc
/* We need to update the pointers and the length here, it has changed. */
v[1].iov_base = opts.s.s;
v[1].iov_len = opts.oidx;
+ } else {
+ if (autobridge_ipv4v6 != 0) {
+ if ((append_opts(&opts, 'I') == -1) && (append_opts(&opts, 'E') == -1)) {
+ LM_ERR("out of pkg memory\n");
+ FORCE_RTP_PROXY_RET (-1);
+ }
+ }
}
+
STR2IOVEC(newip, v[9]);
STR2IOVEC(oldport, v[11]);
#ifdef EXTRA_DEBUG