### Description
UDP/TLS/RTP/SAVP and UDP/TLS/RTP/SAVPF should be recognised and handled as valid transport protocols, those should be used when DTLS is used for SRTP.
### Additional Information
```
version: kamailio 5.1.1 (x86_64/linux)
```
* **Operating System**:
```
Linux 3.10.0-693.17.1.el7.x86_64 #1 SMP Thu Jan 25 20:13:58 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1458
Module: kamailio
Branch: master
Commit: 755ce7bfa5d0f15d3bd25ae7ac0d4c4deba05cb0
URL: https://github.com/kamailio/kamailio/commit/755ce7bfa5d0f15d3bd25ae7ac0d4c4…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2018-02-28T16:01:35+01:00
modules: readme files regenerated - rtpengine ... [skip ci]
---
Modified: src/modules/rtpengine/README
---
Diff: https://github.com/kamailio/kamailio/commit/755ce7bfa5d0f15d3bd25ae7ac0d4c4…
Patch: https://github.com/kamailio/kamailio/commit/755ce7bfa5d0f15d3bd25ae7ac0d4c4…
---
diff --git a/src/modules/rtpengine/README b/src/modules/rtpengine/README
index addebe415b..91f3664f2c 100644
--- a/src/modules/rtpengine/README
+++ b/src/modules/rtpengine/README
@@ -1924,20 +1924,21 @@ rtpengine_offer();
otherwise the RTP proxy will only insert itself as additional
ICE candidate. Other SDP substitutions (c=, m=, etc) are
unaffected by this flag.
- + RTP, SRTP, AVP, AVPF - These flags control the RTP transport
- protocol that should be used towards the recipient of the SDP.
- If none of them are specified, the protocol given in the SDP
- is left untouched. Otherwise, the “SRTP” flag indicates that
- SRTP should be used, while “RTP” indicates that SRTP should
- not be used. “AVPF” indicates that the advanced RTCP profile
- with feedback messages should be used, and “AVP” indicates
- that the regular RTCP profile should be used. See also the
- next set of flags below.
- + RTP/AVP, RTP/SAVP, RTP/AVPF, RTP/SAVPF - these serve as an
- alternative, more explicit way to select between the different
- RTP protocols and profiles supported by the RTP proxy. For
- example, giving the flag “RTP/SAVPF” has the same effect as
- giving the two flags “SRTP AVPF”.
+ + RTP, SRTP, DTLS, AVP, AVPF - These flags control the RTP
+ transport protocol that should be used towards the recipient
+ of the SDP. If none of them are specified, the protocol given
+ in the SDP is left untouched. Otherwise, the “SRTP” flag
+ indicates that SRTP should be used, while “RTP” indicates that
+ SRTP should not be used. “AVPF” indicates that the advanced
+ RTCP profile with feedback messages should be used, and “AVP”
+ indicates that the regular RTCP profile should be used. See
+ also the next set of flags below.
+ + RTP/AVP, RTP/SAVP, UDP/TLS/RTP/SAVP, RTP/AVPF, RTP/SAVPF,
+ UDP/TLS/RTP/SAVPF - these serve as an alternative, more
+ explicit way to select between the different RTP protocols and
+ profiles supported by the RTP proxy. For example, giving the
+ flag “RTP/SAVPF” has the same effect as giving the two flags
+ “SRTP AVPF”.
+ to-tag - force inclusion of the “To” tag. Normally, the “To”
tag is always included when present, except for “delete”
messages. Including the “To” tag in a “delete” messages allows
Module: kamailio
Branch: master
Commit: ff209e978e732def77285e8045d7f3d0a561fde9
URL: https://github.com/kamailio/kamailio/commit/ff209e978e732def77285e8045d7f3d…
Author: Richard Fuchs <rfuchs(a)sipwise.com>
Committer: GitHub <noreply(a)github.com>
Date: 2018-02-28T09:55:18-05:00
Merge pull request #1460 from jerzyptak/rtpengine-add-dtls-transports
rtpengine: added support for DTLS transports
---
Modified: src/modules/rtpengine/doc/rtpengine_admin.xml
Modified: src/modules/rtpengine/rtpengine.c
---
Diff: https://github.com/kamailio/kamailio/commit/ff209e978e732def77285e8045d7f3d…
Patch: https://github.com/kamailio/kamailio/commit/ff209e978e732def77285e8045d7f3d…
---
diff --git a/src/modules/rtpengine/doc/rtpengine_admin.xml b/src/modules/rtpengine/doc/rtpengine_admin.xml
index af0c147d50..141b7572e2 100644
--- a/src/modules/rtpengine/doc/rtpengine_admin.xml
+++ b/src/modules/rtpengine/doc/rtpengine_admin.xml
@@ -2207,7 +2207,7 @@ rtpengine_offer();
&sdp; substitutions (c=, m=, etc) are unaffected by this flag.
</para></listitem>
<listitem><para>
- <emphasis>RTP, SRTP, AVP, AVPF</emphasis> - These flags control the &rtp;
+ <emphasis>RTP, SRTP, DTLS, AVP, AVPF</emphasis> - These flags control the &rtp;
transport protocol that should be used towards the recipient of
the &sdp;. If none of them are specified, the protocol given in
the &sdp; is left untouched. Otherwise, the <quote>SRTP</quote> flag indicates that
@@ -2217,8 +2217,8 @@ rtpengine_offer();
should be used. See also the next set of flags below.
</para></listitem>
<listitem><para>
- <emphasis>RTP/AVP, RTP/SAVP, RTP/AVPF, RTP/SAVPF</emphasis> - these serve as
- an alternative, more explicit way to select between the different &rtp; protocols
+ <emphasis>RTP/AVP, RTP/SAVP, UDP/TLS/RTP/SAVP, RTP/AVPF, RTP/SAVPF, UDP/TLS/RTP/SAVPF</emphasis> - these
+ serve as an alternative, more explicit way to select between the different &rtp; protocols
and profiles supported by the &rtp; proxy. For example, giving the flag
<quote>RTP/SAVPF</quote> has the same effect as giving the two flags
<quote>SRTP AVPF</quote>.
diff --git a/src/modules/rtpengine/rtpengine.c b/src/modules/rtpengine/rtpengine.c
index 9fd827b987..927558f437 100644
--- a/src/modules/rtpengine/rtpengine.c
+++ b/src/modules/rtpengine/rtpengine.c
@@ -1888,6 +1888,8 @@ static const char *transports[] = {
[0x01] = "RTP/SAVP",
[0x02] = "RTP/AVPF",
[0x03] = "RTP/SAVPF",
+ [0x04] = "UDP/TLS/RTP/SAVP",
+ [0x06] = "UDP/TLS/RTP/SAVPF",
};
static int parse_flags(struct ng_flags_parse *ng_flags, struct sip_msg *msg, enum rtpe_operation *op,
@@ -1963,6 +1965,8 @@ static int parse_flags(struct ng_flags_parse *ng_flags, struct sip_msg *msg, enu
ng_flags->transport |= 0x101;
else if (str_eq(&key, "AVPF"))
ng_flags->transport |= 0x102;
+ else if (str_eq(&key, "DTLS"))
+ ng_flags->transport |= 0x104;
else
goto generic;
goto next;
@@ -2065,6 +2069,23 @@ static int parse_flags(struct ng_flags_parse *ng_flags, struct sip_msg *msg, enu
goto next;
}
break;
+
+ case 16:
+ if (str_eq(&key, "UDP/TLS/RTP/SAVP"))
+ ng_flags->transport = 0x104;
+ else
+ goto generic;
+ goto next;
+ break;
+
+ case 17:
+ if (str_eq(&key, "UDP/TLS/RTP/SAVPF"))
+ ng_flags->transport = 0x106;
+ else
+ goto generic;
+ goto next;
+ break;
+
}
generic:
@@ -2165,7 +2186,7 @@ static bencode_item_t *rtpp_function_call(bencode_buffer_t *bencbuf, struct sip_
bencode_dictionary_add(ng_flags.dict, "replace", ng_flags.replace);
if ((ng_flags.transport & 0x100))
bencode_dictionary_add_string(ng_flags.dict, "transport-protocol",
- transports[ng_flags.transport & 0x003]);
+ transports[ng_flags.transport & 0x007]);
if (ng_flags.rtcp_mux && ng_flags.rtcp_mux->child)
bencode_dictionary_add(ng_flags.dict, "rtcp-mux", ng_flags.rtcp_mux);
Module: kamailio
Branch: master
Commit: 99695c2827d0ff6e3d25f144678f07548016415d
URL: https://github.com/kamailio/kamailio/commit/99695c2827d0ff6e3d25f144678f075…
Author: Jerzy Ptak <jerzy.ptak(a)bbitg.co.uk>
Committer: Jerzy Ptak <jerzy.ptak(a)bbitg.co.uk>
Date: 2018-02-28T12:29:45Z
rtpengine: added support for DTLS transports
- added ability to explicitly request DTLS transports:
UDP/TLS/RTP/SAVP and UDP/TLS/RTP/SAVPF
---
Modified: src/modules/rtpengine/doc/rtpengine_admin.xml
Modified: src/modules/rtpengine/rtpengine.c
---
Diff: https://github.com/kamailio/kamailio/commit/99695c2827d0ff6e3d25f144678f075…
Patch: https://github.com/kamailio/kamailio/commit/99695c2827d0ff6e3d25f144678f075…
---
diff --git a/src/modules/rtpengine/doc/rtpengine_admin.xml b/src/modules/rtpengine/doc/rtpengine_admin.xml
index af0c147d50..141b7572e2 100644
--- a/src/modules/rtpengine/doc/rtpengine_admin.xml
+++ b/src/modules/rtpengine/doc/rtpengine_admin.xml
@@ -2207,7 +2207,7 @@ rtpengine_offer();
&sdp; substitutions (c=, m=, etc) are unaffected by this flag.
</para></listitem>
<listitem><para>
- <emphasis>RTP, SRTP, AVP, AVPF</emphasis> - These flags control the &rtp;
+ <emphasis>RTP, SRTP, DTLS, AVP, AVPF</emphasis> - These flags control the &rtp;
transport protocol that should be used towards the recipient of
the &sdp;. If none of them are specified, the protocol given in
the &sdp; is left untouched. Otherwise, the <quote>SRTP</quote> flag indicates that
@@ -2217,8 +2217,8 @@ rtpengine_offer();
should be used. See also the next set of flags below.
</para></listitem>
<listitem><para>
- <emphasis>RTP/AVP, RTP/SAVP, RTP/AVPF, RTP/SAVPF</emphasis> - these serve as
- an alternative, more explicit way to select between the different &rtp; protocols
+ <emphasis>RTP/AVP, RTP/SAVP, UDP/TLS/RTP/SAVP, RTP/AVPF, RTP/SAVPF, UDP/TLS/RTP/SAVPF</emphasis> - these
+ serve as an alternative, more explicit way to select between the different &rtp; protocols
and profiles supported by the &rtp; proxy. For example, giving the flag
<quote>RTP/SAVPF</quote> has the same effect as giving the two flags
<quote>SRTP AVPF</quote>.
diff --git a/src/modules/rtpengine/rtpengine.c b/src/modules/rtpengine/rtpengine.c
index 9fd827b987..927558f437 100644
--- a/src/modules/rtpengine/rtpengine.c
+++ b/src/modules/rtpengine/rtpengine.c
@@ -1888,6 +1888,8 @@ static const char *transports[] = {
[0x01] = "RTP/SAVP",
[0x02] = "RTP/AVPF",
[0x03] = "RTP/SAVPF",
+ [0x04] = "UDP/TLS/RTP/SAVP",
+ [0x06] = "UDP/TLS/RTP/SAVPF",
};
static int parse_flags(struct ng_flags_parse *ng_flags, struct sip_msg *msg, enum rtpe_operation *op,
@@ -1963,6 +1965,8 @@ static int parse_flags(struct ng_flags_parse *ng_flags, struct sip_msg *msg, enu
ng_flags->transport |= 0x101;
else if (str_eq(&key, "AVPF"))
ng_flags->transport |= 0x102;
+ else if (str_eq(&key, "DTLS"))
+ ng_flags->transport |= 0x104;
else
goto generic;
goto next;
@@ -2065,6 +2069,23 @@ static int parse_flags(struct ng_flags_parse *ng_flags, struct sip_msg *msg, enu
goto next;
}
break;
+
+ case 16:
+ if (str_eq(&key, "UDP/TLS/RTP/SAVP"))
+ ng_flags->transport = 0x104;
+ else
+ goto generic;
+ goto next;
+ break;
+
+ case 17:
+ if (str_eq(&key, "UDP/TLS/RTP/SAVPF"))
+ ng_flags->transport = 0x106;
+ else
+ goto generic;
+ goto next;
+ break;
+
}
generic:
@@ -2165,7 +2186,7 @@ static bencode_item_t *rtpp_function_call(bencode_buffer_t *bencbuf, struct sip_
bencode_dictionary_add(ng_flags.dict, "replace", ng_flags.replace);
if ((ng_flags.transport & 0x100))
bencode_dictionary_add_string(ng_flags.dict, "transport-protocol",
- transports[ng_flags.transport & 0x003]);
+ transports[ng_flags.transport & 0x007]);
if (ng_flags.rtcp_mux && ng_flags.rtcp_mux->child)
bencode_dictionary_add(ng_flags.dict, "rtcp-mux", ng_flags.rtcp_mux);
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests.
If you have questions about using Kamailio or related to its configuration file,
ask on sr-users mailing list:
* http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
If you have questions about developing extensions to Kamailio or its existing
C code, ask on sr-dev mailing list
* http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Please try to fill this template as much as possible for any issue. It helps the
developers to troubleshoot the issue.
If you submit a feature request (or enhancement), you can delete the text of
the template and only add the description of what you would like to be added.
If there is no content to be filled in a section, the entire section can be removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment).
-->
### Description
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
Use KEMI cfgutils.lock() and cfgutils.unlock().
Expect native behaviour of lock() unlock().
Instead segfault.
### Troubleshooting
The KEMI wrappers do not have leading sip_msg_t* argument.
Wrapper for lock() is cfg_lock()
Prototype for cfg_lock() is static int cfg_lock(str *lkey). Notice the missing sig_msg_t * first argument.
#### Reproduction
Call cfgutils.lock() cfgutils.unlock() from scripting language
#### Debugging Data
#0 0x00007fdc6e7eff32 in core_case_hash (s1=0x7fdcb88ac1a0, s2=0x0, size=16) at ../../core/hashes.h:317
317 v=(ch_icase(*p)<<24)+(ch_icase(p[1])<<16)+(ch_icase(p[2])<<8)
s1 is actually the sip_msg_t* not the lock key string.
*s1 can actually be deferenced as *(sip_msg_t*) s1
#### Log Messages
#### SIP Traffic
### Possible Solutions
KEMI wrappers for cfgutils.c should include dummy sip_msg_t* argument.
### Additional Information
* 5.0 5.1 master - kamailio version
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1459
Module: kamailio
Branch: 5.1
Commit: 03aa0b7340dd9b752502f765885eff1f08ea41e2
URL: https://github.com/kamailio/kamailio/commit/03aa0b7340dd9b752502f765885eff1…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-02-28T11:17:57+01:00
registrar: downgraded some warning messages at startup
(cherry picked from commit ceff642b25f8b464515446ed696da43c1f638d21)
---
Modified: src/modules/registrar/registrar.c
---
Diff: https://github.com/kamailio/kamailio/commit/03aa0b7340dd9b752502f765885eff1…
Patch: https://github.com/kamailio/kamailio/commit/03aa0b7340dd9b752502f765885eff1…
---
diff --git a/src/modules/registrar/registrar.c b/src/modules/registrar/registrar.c
index 4a8d245ac2..35ea204e0c 100644
--- a/src/modules/registrar/registrar.c
+++ b/src/modules/registrar/registrar.c
@@ -360,17 +360,17 @@ static int mod_init(void)
if (sock_hdr_name.s) {
if (sock_hdr_name.len==0 || sock_flag==-1) {
- LM_WARN("empty sock_hdr_name or sock_flag not set -> resetting\n");
+ LM_INFO("empty sock_hdr_name or sock_flag not set -> resetting\n");
sock_hdr_name.len = 0;
sock_flag = -1;
}
} else if (reg_xavp_cfg.s) {
if (reg_xavp_cfg.len == 0 || sock_flag == -1) {
- LM_WARN("empty reg_xavp_cfg or sock_flag not set -> resetting\n");
+ LM_DBG("empty reg_xavp_cfg or sock_flag not set -> resetting\n");
sock_flag = -1;
}
} else if (sock_flag!=-1) {
- LM_WARN("sock_flag defined but no sock_hdr_name or no reg_xavp_cfg -> resetting flag\n");
+ LM_INFO("sock_flag defined but no sock_hdr_name or no reg_xavp_cfg -> resetting flag\n");
sock_flag = -1;
}
Module: kamailio
Branch: master
Commit: ceff642b25f8b464515446ed696da43c1f638d21
URL: https://github.com/kamailio/kamailio/commit/ceff642b25f8b464515446ed696da43…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-02-28T11:16:02+01:00
registrar: downgraded some warning messages at startup
---
Modified: src/modules/registrar/registrar.c
---
Diff: https://github.com/kamailio/kamailio/commit/ceff642b25f8b464515446ed696da43…
Patch: https://github.com/kamailio/kamailio/commit/ceff642b25f8b464515446ed696da43…
---
diff --git a/src/modules/registrar/registrar.c b/src/modules/registrar/registrar.c
index 4a8d245ac2..35ea204e0c 100644
--- a/src/modules/registrar/registrar.c
+++ b/src/modules/registrar/registrar.c
@@ -360,17 +360,17 @@ static int mod_init(void)
if (sock_hdr_name.s) {
if (sock_hdr_name.len==0 || sock_flag==-1) {
- LM_WARN("empty sock_hdr_name or sock_flag not set -> resetting\n");
+ LM_INFO("empty sock_hdr_name or sock_flag not set -> resetting\n");
sock_hdr_name.len = 0;
sock_flag = -1;
}
} else if (reg_xavp_cfg.s) {
if (reg_xavp_cfg.len == 0 || sock_flag == -1) {
- LM_WARN("empty reg_xavp_cfg or sock_flag not set -> resetting\n");
+ LM_DBG("empty reg_xavp_cfg or sock_flag not set -> resetting\n");
sock_flag = -1;
}
} else if (sock_flag!=-1) {
- LM_WARN("sock_flag defined but no sock_hdr_name or no reg_xavp_cfg -> resetting flag\n");
+ LM_INFO("sock_flag defined but no sock_hdr_name or no reg_xavp_cfg -> resetting flag\n");
sock_flag = -1;
}