Module: sip-router Branch: 3.3 Commit: cd1c367218cdcd5f0867af2234f6080e8e6622a6 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=cd1c3672...
Author: Carsten Bock carsten@ng-voice.com Committer: Carsten Bock carsten@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@voipembedded.com</email> </address> </editor> + <editor> + <firstname>Carsten</firstname> + <surname>Bock</surname> + <affiliation><orgname>ng-voice GmbH</orgname></affiliation> + <address> + <email>carsten@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
Hello,
is this a bug fix, because at first sight seems to be a new feature. Backports to the code in stable branches must be only related to fixing issues, otherwise they become a mess and will be no longer stable.
In exceptional cases, if it is not clear that is a bug fix or a new feature, it should be discussed on the devel list before.
Moreover, the backports should be done via cherry-picking (or merging) commits from master branch, to be able to track what fixes were not backported -- some hints are presented at http://www.kamailio.org/wiki/devel/backporting-to-3.2.x .
It would be also good to try to follow git recommendations for commit messages, summarized at: - http://www.kamailio.org/wiki/devel/git-commit-guidelines#commit_message
The email notifications as well as changelog will be then properly formatted.
Cheers, Daniel
On 11/1/12 8:27 PM, admin@sip-router.org wrote:
Module: sip-router Branch: 3.3 Commit: cd1c367218cdcd5f0867af2234f6080e8e6622a6 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=cd1c3672...
Author: Carsten Bock carsten@ng-voice.com Committer: Carsten Bock carsten@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@voipembedded.com</email> </address> </editor>
<editor>
<firstname>Carsten</firstname>
<surname>Bock</surname>
<affiliation><orgname>ng-voice GmbH</orgname></affiliation>
<address>
<email>carsten@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);
}
} }
#ifdef EXTRA_DEBUGSTR2IOVEC(newip, v[9]); STR2IOVEC(oldport, v[11]);
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Hi Daniel,
you're right (as almost always): It's not a bug-fix, but more a new feature. I've reverted the change; that was the reason, why i only commited the feature only in trunk. Actually i did a cherry-pick, but git did not ask for a new comment, so i assumed it would automatically add the "cherry picked from commit..." message. No serious commits on the first day after a holiday. Thanks for reminding me.
Kind regards, Carsten
2012/11/1 Daniel-Constantin Mierla miconda@gmail.com:
Hello,
is this a bug fix, because at first sight seems to be a new feature. Backports to the code in stable branches must be only related to fixing issues, otherwise they become a mess and will be no longer stable.
In exceptional cases, if it is not clear that is a bug fix or a new feature, it should be discussed on the devel list before.
Moreover, the backports should be done via cherry-picking (or merging) commits from master branch, to be able to track what fixes were not backported -- some hints are presented at http://www.kamailio.org/wiki/devel/backporting-to-3.2.x .
It would be also good to try to follow git recommendations for commit messages, summarized at:
The email notifications as well as changelog will be then properly formatted.
Cheers, Daniel
On 11/1/12 8:27 PM, admin@sip-router.org wrote:
Module: sip-router Branch: 3.3 Commit: cd1c367218cdcd5f0867af2234f6080e8e6622a6 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=cd1c3672...
Author: Carsten Bock carsten@ng-voice.com Committer: Carsten Bock carsten@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@voipembedded.com</email> </address> </editor>
<editor>
<firstname>Carsten</firstname>
<surname>Bock</surname>
<affiliation><orgname>ng-voice
GmbH</orgname></affiliation>
<address>
<email>carsten@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);
}
} }
#ifdef EXTRA_DEBUGSTR2IOVEC(newip, v[9]); STR2IOVEC(oldport, v[11]);
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
-- Daniel-Constantin Mierla - http://www.asipto.com http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - http://asipto.com/u/kat Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 - http://asipto.com/u/katu
Hello,
On 11/1/12 9:07 PM, Carsten Bock wrote:
Hi Daniel,
you're right (as almost always): It's not a bug-fix, but more a new feature. I've reverted the change; that was the reason, why i only commited the feature only in trunk.
ok.
Actually i did a cherry-pick, but git did not ask for a new comment, so i assumed it would automatically add the "cherry picked from commit..." message.
Strange. Indeed, when cherry-picking you are not asked to add a new comment, the one from initial commit is used and the "cherry picked from ..." message is automatically appended.
I was checking the previous backports and they have the cherry pick message, so I have no idea for the moment what happened.
Cheers, Daniel
No serious commits on the first day after a holiday. Thanks for reminding me.
Kind regards, Carsten
2012/11/1 Daniel-Constantin Mierla miconda@gmail.com:
Hello,
is this a bug fix, because at first sight seems to be a new feature. Backports to the code in stable branches must be only related to fixing issues, otherwise they become a mess and will be no longer stable.
In exceptional cases, if it is not clear that is a bug fix or a new feature, it should be discussed on the devel list before.
Moreover, the backports should be done via cherry-picking (or merging) commits from master branch, to be able to track what fixes were not backported -- some hints are presented at http://www.kamailio.org/wiki/devel/backporting-to-3.2.x .
It would be also good to try to follow git recommendations for commit messages, summarized at:
The email notifications as well as changelog will be then properly formatted.
Cheers, Daniel
On 11/1/12 8:27 PM, admin@sip-router.org wrote:
Module: sip-router Branch: 3.3 Commit: cd1c367218cdcd5f0867af2234f6080e8e6622a6 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=cd1c3672...
Author: Carsten Bock carsten@ng-voice.com Committer: Carsten Bock carsten@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@voipembedded.com</email> </address> </editor>
<editor>
<firstname>Carsten</firstname>
<surname>Bock</surname>
<affiliation><orgname>ng-voice
GmbH</orgname></affiliation>
<address>
<email>carsten@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);
}
} }
#ifdef EXTRA_DEBUGSTR2IOVEC(newip, v[9]); STR2IOVEC(oldport, v[11]);
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
-- Daniel-Constantin Mierla - http://www.asipto.com http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - http://asipto.com/u/kat Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 - http://asipto.com/u/katu
admin@sip-router.org writes:
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"
i don't know how this would help. proxy gets invite that includes ipv4 or ipv6 address in sdp and $rd is domain name. what should proxy config do?
in such situations perhaps rtpproxy should ADD its own address of different protocol in sdp and then when reply comes, un-arm rtpproxy if reply included address of original protocol.
i don't know if legacy UAs can deal with two ip addresses in sdp. if not, this whole bridging stuff is wasted effort.
-- juha
Hi Juha,
sorry for the late answer. I've discussed this with the SEMS guys (we were discussing about IPv4/IPv6 interworking), who discussed this with Alfred E. Heggestad. We did agree, that SDP would probably never contain both IPv4 or IPv6 addresses. RFC 6157 (https://tools.ietf.org/html/rfc6157, "IPv6 Transition in the Session Initiation Protocol (SIP)") also recommends using ICE for SIP-IPv4/IPv6 dual-stack. If we follow this RFC and typical UA's, we will always have "either/or" rather than "and". However, i've never seen any dual-stack SIP-Endpoints so far..
Kind regards, Carsten
2012/11/2 Juha Heinanen jh@tutpro.com:
admin@sip-router.org writes:
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"
i don't know how this would help. proxy gets invite that includes ipv4 or ipv6 address in sdp and $rd is domain name. what should proxy config do?
in such situations perhaps rtpproxy should ADD its own address of different protocol in sdp and then when reply comes, un-arm rtpproxy if reply included address of original protocol.
i don't know if legacy UAs can deal with two ip addresses in sdp. if not, this whole bridging stuff is wasted effort.
-- juha
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Carsten Bock writes:
We did agree, that SDP would probably never contain both IPv4 or IPv6 addresses. RFC 6157 (https://tools.ietf.org/html/rfc6157, "IPv6 Transition in the Session Initiation Protocol (SIP)") also recommends using ICE for SIP-IPv4/IPv6 dual-stack.
ok, i need to read it.
If we follow this RFC and typical UA's, we will always have "either/or" rather than "and". However, i've never seen any dual-stack SIP-Endpoints so far.
at least cisco ios gateways support dual stack:
protocol mode ipv4 | ipv6 | dual-stack [preference {ipv4 | ipv6}]}
so what should sip proxy do when $rd is domain name?
-- juha
Hi,
interesting to know, i wasn't aware that Cisco IOS support dual-stack VoIP; i wonder how they've implemented it. The shortcut works for single-stack/RFC6157 devices only, maybe i should add this to the docs.
Carsten
2012/11/6 Juha Heinanen jh@tutpro.com:
Carsten Bock writes:
We did agree, that SDP would probably never contain both IPv4 or IPv6 addresses. RFC 6157 (https://tools.ietf.org/html/rfc6157, "IPv6 Transition in the Session Initiation Protocol (SIP)") also recommends using ICE for SIP-IPv4/IPv6 dual-stack.
ok, i need to read it.
If we follow this RFC and typical UA's, we will always have "either/or" rather than "and". However, i've never seen any dual-stack SIP-Endpoints so far.
at least cisco ios gateways support dual stack:
protocol mode ipv4 | ipv6 | dual-stack [preference {ipv4 | ipv6}]}
so what should sip proxy do when $rd is domain name?
-- juha
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
On 11/06/12 08:57, Carsten Bock wrote:
Hi,
interesting to know, i wasn't aware that Cisco IOS support dual-stack VoIP; i wonder how they've implemented it. The shortcut works for single-stack/RFC6157 devices only, maybe i should add this to the docs.
Accordinging to [1], they've implemented it using RFC 4091 (ANAT).
cheers
[1] http://www.cisco.com/en/US/docs/ios/ipv6/configuration/guide/ip6_voip.html
Hi,
FYI: I just added a note to the docs about the flag and the compatibility with the RFC's.
Carsten
2012/11/6 Richard Fuchs rfuchs@sipwise.com:
On 11/06/12 08:57, Carsten Bock wrote:
Hi,
interesting to know, i wasn't aware that Cisco IOS support dual-stack VoIP; i wonder how they've implemented it. The shortcut works for single-stack/RFC6157 devices only, maybe i should add this to the docs.
Accordinging to [1], they've implemented it using RFC 4091 (ANAT).
cheers
[1] http://www.cisco.com/en/US/docs/ios/ipv6/configuration/guide/ip6_voip.html
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Richard Fuchs writes:
Accordinging to [1], they've implemented it using RFC 4091 (ANAT).
makes sense to me. hopefully also sems and rtpproxy one day support anat. ice is a much more complex beast.
-- juha
On 06.11.2012 14:07, Juha Heinanen wrote:
so what should sip proxy do when $rd is domain name?
I think this is a general problem. The problem is the automatic network protocol selection. If it would be possible to force outgoing requests to a certain network protocol, e.g. IPv4 or IPv6, then it would be possible to put an IPv4 address into the SDP and force IPv4. If it fails, use failure-route to put an IPv6 address into the SDP and forward again using IPv6.
Of course just because the next hop is IPv4 or IPv6 does not mean that the UAS uses the same network protocol. But in my opinion it is the task of the receiving domain to do v4/v6 bridging if the domain's proxy uses a different IP version than the domain's users.
regards Klaus