mirror of
https://github.com/asterisk/asterisk.git
synced 2025-08-18 20:16:32 +00:00
Compare commits
34 Commits
14.7.1
...
14.0.0-bet
Author | SHA1 | Date | |
---|---|---|---|
|
9528429f4c | ||
|
9cdf44668d | ||
|
73d39f2029 | ||
|
e8a97775ee | ||
|
345409825a | ||
|
105c1168f7 | ||
|
8927b52634 | ||
|
fc68258037 | ||
|
9a95c6dea3 | ||
|
aaee8160bc | ||
|
72e2d978ac | ||
|
1877d36c95 | ||
|
7af0eac02a | ||
|
ef0bf47bb3 | ||
|
be8fa4a81d | ||
|
a1d6b14c40 | ||
|
a783e1e60d | ||
|
9c56f798f6 | ||
|
01ee54ea1c | ||
|
1ad00c1c30 | ||
|
815b6f72f8 | ||
|
c95b611a73 | ||
|
bc94ccbcdd | ||
|
de9145e0fe | ||
|
a7233fbf3e | ||
|
c327430ea0 | ||
|
763a18bc9d | ||
|
ce6898bd3c | ||
|
ebc477aa5d | ||
|
1838b283aa | ||
|
f196cf975d | ||
|
699a7390eb | ||
|
4b17a11d7d | ||
|
bb9dcae98c |
1
.lastclean
Normal file
1
.lastclean
Normal file
@@ -0,0 +1 @@
|
||||
40
|
11
CHANGES
11
CHANGES
@@ -243,12 +243,11 @@ Core
|
||||
- 'media cache delete <item>' - remove an item from the cache
|
||||
- 'media cache create <uri>' - retrieve a URI and store it in the cache
|
||||
|
||||
* The ability for hints to be automatically created as a result of device state
|
||||
changes now exists in the PBX. This functionality is referred to as "autohints"
|
||||
and is configurable in extensions.conf by placing "autohints=yes" in the
|
||||
context. If enabled then a hint will be automatically created with the name of
|
||||
the device.
|
||||
|
||||
* The ability for device state hints to be automatically created as a result of
|
||||
device state changes now exists in the PBX. This functionality is referred to
|
||||
as "autohints" and is configurable in extensions.conf by placing "autohints=yes"
|
||||
in the context. If enabled a device state hint will be automatically created
|
||||
with the name of the device.
|
||||
|
||||
Functions
|
||||
------------------
|
||||
|
60
asterisk-14.0.0-beta2-summary.html
Normal file
60
asterisk-14.0.0-beta2-summary.html
Normal file
@@ -0,0 +1,60 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><title>Release Summary - asterisk-14.0.0-beta2</title><h1 align="center"><a name="top">Release Summary</a></h1><h3 align="center">asterisk-14.0.0-beta2</h3><h3 align="center">Date: 2016-08-29</h3><h3 align="center"><asteriskteam@digium.com></h3><hr><h2 align="center">Table of Contents</h2><ol>
|
||||
<li><a href="#summary">Summary</a></li>
|
||||
<li><a href="#contributors">Contributors</a></li>
|
||||
<li><a href="#closed_issues">Closed Issues</a></li>
|
||||
<li><a href="#commits">Other Changes</a></li>
|
||||
<li><a href="#diffstat">Diffstat</a></li>
|
||||
</ol><hr><a name="summary"><h2 align="center">Summary</h2></a><center><a href="#top">[Back to Top]</a></center><p>This is the first release of a major new version of Asterisk. For a list of new features that have been included with this release, please see the CHANGES file inside the source package. Since this is a new major release, users are encouraged to do extended testing before upgrading to this version in a production environment.</p><p>The data in this summary reflects changes that have been made since the previous release, asterisk-14.0.0-beta1.</p><hr><a name="contributors"><h2 align="center">Contributors</h2></a><center><a href="#top">[Back to Top]</a></center><p>This table lists the people who have submitted code, those that have tested patches, as well as those that reported issues on the issue tracker that were resolved in this release. For coders, the number is how many of their patches (of any size) were committed into this release. For testers, the number is the number of times their name was listed as assisting with testing a patch. Finally, for reporters, the number is the number of issues that they reported that were affected by commits that went into this release.</p><table width="100%" border="0">
|
||||
<tr><th width="33%">Coders</th><th width="33%">Testers</th><th width="33%">Reporters</th></tr>
|
||||
<tr valign="top"><td width="33%">6 George Joseph <gjoseph@digium.com><br/>5 Joshua Colp <jcolp@digium.com><br/>3 Kevin Harwell <kharwell@digium.com><br/>1 Richard Mudgett <rmudgett@digium.com><br/>1 Mark Michelson <mmichelson@digium.com><br/></td><td width="33%"><td width="33%">3 George Joseph <gjoseph@digium.com><br/>2 Joshua Colp <jcolp@digium.com><br/>1 Ben Merrills <ben@xdev.net><br/>1 Kevin Harwell <kharwell@digium.com><br/>1 Hans van Eijsden <info@hansvaneijsden.nl><br/></td></tr>
|
||||
</table><hr><a name="closed_issues"><h2 align="center">Closed Issues</h2></a><center><a href="#top">[Back to Top]</a></center><p>This is a list of all issues from the issue tracker that were closed by changes that went into this release.</p><h3>Bug</h3><h4>Category: Contrib/General</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26183">ASTERISK-26183</a>: alembic: error when using sqlalchemy version 1.1.0b2<br/>Reported by: Kevin Harwell<ul>
|
||||
<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=a783e1e60dd9594e830359ad3eb20c3ef0e761c3">[a783e1e60d]</a> Kevin Harwell -- alembic/sqlalchemy: auto increment only allowed on a single column</li>
|
||||
</ul><br><h4>Category: Core/General</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26253">ASTERISK-26253</a>: sdp_srtp: libsrtp now a required dependency, shouldn't be<br/>Reported by: Ben Merrills<ul>
|
||||
<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=a1d6b14c40498c3e6c6373fca1c2a41922ab7ebe">[a1d6b14c40]</a> Richard Mudgett -- res_srtp: Move SDP SRTP code from the core to res_srtp.</li>
|
||||
</ul><br><h4>Category: Resources/res_pjsip</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26238">ASTERISK-26238</a>: res_pjsip: Empty global default_from_user causes crash<br/>Reported by: Joshua Colp<ul>
|
||||
<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=9a95c6dea39ecd2cf14b84f5d923d0a07a42138f">[9a95c6dea3]</a> gtjoseph -- res_pjsip: Fail global load if debug or default_from_user are empty</li>
|
||||
</ul><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26241">ASTERISK-26241</a>: res_pjsip: When using compact headers, rpid and pai are incorrectly generated<br/>Reported by: George Joseph<ul>
|
||||
<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=aaee8160bcb875763eb8375e2b61b1c3a6a5db8a">[aaee8160bc]</a> gtjoseph -- res_pjsip_caller_id: Copy header name to short header name</li>
|
||||
</ul><br><h4>Category: Resources/res_pjsip/Bundling</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26148">ASTERISK-26148</a>: pjsip: Cannot compile 13.10.0-rc1: "libasteriskpj.so: undefined reference to..."<br/>Reported by: Hans van Eijsden<ul>
|
||||
<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=815b6f72f8796d27e17d91a6f5a14d9569f49564">[815b6f72f8]</a> gtjoseph -- pjproject_bundled: Update for pjproject 2.5.5</li>
|
||||
</ul><br><h4>Category: Resources/res_pjsip_logger</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26239">ASTERISK-26239</a>: res_pjsip_logger: An empty global/debug option is treated as a "match all" hostname<br/>Reported by: George Joseph<ul>
|
||||
<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=9a95c6dea39ecd2cf14b84f5d923d0a07a42138f">[9a95c6dea3]</a> gtjoseph -- res_pjsip: Fail global load if debug or default_from_user are empty</li>
|
||||
</ul><br><hr><a name="commits"><h2 align="center">Commits Not Associated with an Issue</h2></a><center><a href="#top">[Back to Top]</a></center><p>This is a list of all changes that went into this release that did not reference a JIRA issue.</p><table width="100%" border="1">
|
||||
<tr><th>Revision</th><th>Author</th><th>Summary</th></tr>
|
||||
<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=73d39f20294168fbb366f9bc7fe5f0b5cf8f5cf2">73d39f2029</a></td><td>Joshua Colp</td><td>Release summaries: Remove previous versions</td></tr>
|
||||
<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=e8a97775ee2ce128a9063f40b5657f1fbf5b3b07">e8a97775ee</a></td><td>Joshua Colp</td><td>.version: Update for 14.0.0-beta2</td></tr>
|
||||
<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=345409825a3e1e6ceb5b019855faf2bcedb44e98">345409825a</a></td><td>Joshua Colp</td><td>.lastclean: Update for 14.0.0-beta2</td></tr>
|
||||
<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=105c1168f7d634b2222d431a2793dec8960d8a33">105c1168f7</a></td><td>Joshua Colp</td><td>realtime: Add database scripts for 14.0.0-beta2</td></tr>
|
||||
<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=8927b52634d7c7396cd31f2bcc258d26d20e0060">8927b52634</a></td><td>Joshua Colp</td><td>alembic: Fix downgrade path.</td></tr>
|
||||
<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=7af0eac02a57a92adf6274ae8c8e6dd8741e12ab">7af0eac02a</a></td><td>gtjoseph</td><td>autohints: Update CHANGES and extensions.conf.sample</td></tr>
|
||||
<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=1ad00c1c30ce3726c0942595ac68b4d4038da10e">1ad00c1c30</a></td><td>gtjoseph</td><td>menuselect: Add an opaque "member_data" string to the acceptable xml</td></tr>
|
||||
<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=c95b611a73889cc29fdaaf037411972847660e56">c95b611a73</a></td><td>Mark Michelson</td><td>Remove SILK payload mappings from Asterisk core.</td></tr>
|
||||
<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=bc94ccbcdddc80992d07a42986abc751d958f78d">bc94ccbcdd</a></td><td>Kevin Harwell</td><td>rtp_engine: Failed assertion and wrong name given for codec</td></tr>
|
||||
</table><hr><a name="diffstat"><h2 align="center">Diffstat Results</h2></a><center><a href="#top">[Back to Top]</a></center><p>This is a summary of the changes to the source code that went into this release that was generated using the diffstat utility.</p><pre>asterisk-14.0.0-beta1-summary.html | 4244 ----
|
||||
asterisk-14.0.0-beta1-summary.txt |10040 ----------
|
||||
b/.version | 2
|
||||
b/CHANGES | 11
|
||||
b/configs/samples/extensions.conf.sample | 5
|
||||
b/configure | 45
|
||||
b/configure.ac | 3
|
||||
b/contrib/ast-db-manage/config/versions/3772f8f828da_update_identify_by.py | 44
|
||||
b/contrib/ast-db-manage/config/versions/581a4264e537_adding_extensions.py | 10
|
||||
b/contrib/realtime/mssql/mssql_config.sql | 17
|
||||
b/contrib/realtime/mysql/mysql_config.sql | 9
|
||||
b/contrib/realtime/oracle/oracle_config.sql | 17
|
||||
b/contrib/realtime/postgresql/postgresql_config.sql | 15
|
||||
b/include/asterisk/autoconfig.h.in | 3
|
||||
b/include/asterisk/sdp_srtp.h | 95
|
||||
b/main/rtp_engine.c | 24
|
||||
b/main/sdp_srtp.c | 606
|
||||
b/menuselect/menuselect.c | 6
|
||||
b/menuselect/menuselect.h | 2
|
||||
b/res/res_pjsip/config_global.c | 12
|
||||
b/res/res_pjsip_caller_id.c | 2
|
||||
b/res/res_pjsip_diversion.c | 2
|
||||
b/res/res_resolver_unbound.c | 53
|
||||
b/res/res_srtp.c | 587
|
||||
b/third-party/pjproject/Makefile.rules | 31
|
||||
third-party/pjproject/patches/0001-evsub-Add-APIs-to-add-decrement-an-event-subscriptio.patch | 73
|
||||
third-party/pjproject/patches/0001-sip_transport_tcp-tls-Set-factory-on-transports-crea.patch | 26
|
||||
27 files changed, 963 insertions(+), 15021 deletions(-)</pre><br></html>
|
181
asterisk-14.0.0-beta2-summary.txt
Normal file
181
asterisk-14.0.0-beta2-summary.txt
Normal file
@@ -0,0 +1,181 @@
|
||||
Release Summary
|
||||
|
||||
asterisk-14.0.0-beta2
|
||||
|
||||
Date: 2016-08-29
|
||||
|
||||
<asteriskteam@digium.com>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Table of Contents
|
||||
|
||||
1. Summary
|
||||
2. Contributors
|
||||
3. Closed Issues
|
||||
4. Other Changes
|
||||
5. Diffstat
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Summary
|
||||
|
||||
[Back to Top]
|
||||
|
||||
This is the first release of a major new version of Asterisk. For a list
|
||||
of new features that have been included with this release, please see the
|
||||
CHANGES file inside the source package. Since this is a new major release,
|
||||
users are encouraged to do extended testing before upgrading to this
|
||||
version in a production environment.
|
||||
|
||||
The data in this summary reflects changes that have been made since the
|
||||
previous release, asterisk-14.0.0-beta1.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Contributors
|
||||
|
||||
[Back to Top]
|
||||
|
||||
This table lists the people who have submitted code, those that have
|
||||
tested patches, as well as those that reported issues on the issue tracker
|
||||
that were resolved in this release. For coders, the number is how many of
|
||||
their patches (of any size) were committed into this release. For testers,
|
||||
the number is the number of times their name was listed as assisting with
|
||||
testing a patch. Finally, for reporters, the number is the number of
|
||||
issues that they reported that were affected by commits that went into
|
||||
this release.
|
||||
|
||||
Coders Testers Reporters
|
||||
6 George Joseph 3 George Joseph
|
||||
5 Joshua Colp 2 Joshua Colp
|
||||
3 Kevin Harwell 1 Ben Merrills
|
||||
1 Richard Mudgett 1 Kevin Harwell
|
||||
1 Mark Michelson 1 Hans van Eijsden
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Closed Issues
|
||||
|
||||
[Back to Top]
|
||||
|
||||
This is a list of all issues from the issue tracker that were closed by
|
||||
changes that went into this release.
|
||||
|
||||
Bug
|
||||
|
||||
Category: Contrib/General
|
||||
|
||||
ASTERISK-26183: alembic: error when using sqlalchemy version 1.1.0b2
|
||||
Reported by: Kevin Harwell
|
||||
* [a783e1e60d] Kevin Harwell -- alembic/sqlalchemy: auto increment only
|
||||
allowed on a single column
|
||||
|
||||
Category: Core/General
|
||||
|
||||
ASTERISK-26253: sdp_srtp: libsrtp now a required dependency, shouldn't be
|
||||
Reported by: Ben Merrills
|
||||
* [a1d6b14c40] Richard Mudgett -- res_srtp: Move SDP SRTP code from the
|
||||
core to res_srtp.
|
||||
|
||||
Category: Resources/res_pjsip
|
||||
|
||||
ASTERISK-26238: res_pjsip: Empty global default_from_user causes crash
|
||||
Reported by: Joshua Colp
|
||||
* [9a95c6dea3] gtjoseph -- res_pjsip: Fail global load if debug or
|
||||
default_from_user are empty
|
||||
ASTERISK-26241: res_pjsip: When using compact headers, rpid and pai are
|
||||
incorrectly generated
|
||||
Reported by: George Joseph
|
||||
* [aaee8160bc] gtjoseph -- res_pjsip_caller_id: Copy header name to
|
||||
short header name
|
||||
|
||||
Category: Resources/res_pjsip/Bundling
|
||||
|
||||
ASTERISK-26148: pjsip: Cannot compile 13.10.0-rc1: "libasteriskpj.so:
|
||||
undefined reference to..."
|
||||
Reported by: Hans van Eijsden
|
||||
* [815b6f72f8] gtjoseph -- pjproject_bundled: Update for pjproject 2.5.5
|
||||
|
||||
Category: Resources/res_pjsip_logger
|
||||
|
||||
ASTERISK-26239: res_pjsip_logger: An empty global/debug option is treated
|
||||
as a "match all" hostname
|
||||
Reported by: George Joseph
|
||||
* [9a95c6dea3] gtjoseph -- res_pjsip: Fail global load if debug or
|
||||
default_from_user are empty
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Commits Not Associated with an Issue
|
||||
|
||||
[Back to Top]
|
||||
|
||||
This is a list of all changes that went into this release that did not
|
||||
reference a JIRA issue.
|
||||
|
||||
+------------------------------------------------------------------------+
|
||||
| Revision | Author | Summary |
|
||||
|------------+----------------+------------------------------------------|
|
||||
| 73d39f2029 | Joshua Colp | Release summaries: Remove previous |
|
||||
| | | versions |
|
||||
|------------+----------------+------------------------------------------|
|
||||
| e8a97775ee | Joshua Colp | .version: Update for 14.0.0-beta2 |
|
||||
|------------+----------------+------------------------------------------|
|
||||
| 345409825a | Joshua Colp | .lastclean: Update for 14.0.0-beta2 |
|
||||
|------------+----------------+------------------------------------------|
|
||||
| 105c1168f7 | Joshua Colp | realtime: Add database scripts for |
|
||||
| | | 14.0.0-beta2 |
|
||||
|------------+----------------+------------------------------------------|
|
||||
| 8927b52634 | Joshua Colp | alembic: Fix downgrade path. |
|
||||
|------------+----------------+------------------------------------------|
|
||||
| 7af0eac02a | gtjoseph | autohints: Update CHANGES and |
|
||||
| | | extensions.conf.sample |
|
||||
|------------+----------------+------------------------------------------|
|
||||
| 1ad00c1c30 | gtjoseph | menuselect: Add an opaque "member_data" |
|
||||
| | | string to the acceptable xml |
|
||||
|------------+----------------+------------------------------------------|
|
||||
| c95b611a73 | Mark Michelson | Remove SILK payload mappings from |
|
||||
| | | Asterisk core. |
|
||||
|------------+----------------+------------------------------------------|
|
||||
| bc94ccbcdd | Kevin Harwell | rtp_engine: Failed assertion and wrong |
|
||||
| | | name given for codec |
|
||||
+------------------------------------------------------------------------+
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Diffstat Results
|
||||
|
||||
[Back to Top]
|
||||
|
||||
This is a summary of the changes to the source code that went into this
|
||||
release that was generated using the diffstat utility.
|
||||
|
||||
asterisk-14.0.0-beta1-summary.html | 4244 ----
|
||||
asterisk-14.0.0-beta1-summary.txt |10040 ----------
|
||||
b/.version | 2
|
||||
b/CHANGES | 11
|
||||
b/configs/samples/extensions.conf.sample | 5
|
||||
b/configure | 45
|
||||
b/configure.ac | 3
|
||||
b/contrib/ast-db-manage/config/versions/3772f8f828da_update_identify_by.py | 44
|
||||
b/contrib/ast-db-manage/config/versions/581a4264e537_adding_extensions.py | 10
|
||||
b/contrib/realtime/mssql/mssql_config.sql | 17
|
||||
b/contrib/realtime/mysql/mysql_config.sql | 9
|
||||
b/contrib/realtime/oracle/oracle_config.sql | 17
|
||||
b/contrib/realtime/postgresql/postgresql_config.sql | 15
|
||||
b/include/asterisk/autoconfig.h.in | 3
|
||||
b/include/asterisk/sdp_srtp.h | 95
|
||||
b/main/rtp_engine.c | 24
|
||||
b/main/sdp_srtp.c | 606
|
||||
b/menuselect/menuselect.c | 6
|
||||
b/menuselect/menuselect.h | 2
|
||||
b/res/res_pjsip/config_global.c | 12
|
||||
b/res/res_pjsip_caller_id.c | 2
|
||||
b/res/res_pjsip_diversion.c | 2
|
||||
b/res/res_resolver_unbound.c | 53
|
||||
b/res/res_srtp.c | 587
|
||||
b/third-party/pjproject/Makefile.rules | 31
|
||||
third-party/pjproject/patches/0001-evsub-Add-APIs-to-add-decrement-an-event-subscriptio.patch | 73
|
||||
third-party/pjproject/patches/0001-sip_transport_tcp-tls-Set-factory-on-transports-crea.patch | 26
|
||||
27 files changed, 963 insertions(+), 15021 deletions(-)
|
@@ -197,6 +197,11 @@ TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0)
|
||||
; before "B".
|
||||
;
|
||||
;[context]
|
||||
;
|
||||
;autohints = yes
|
||||
; If enabled for a context, a device state hint will be automatically created in
|
||||
; the context with the name of the device and updated with device state changes.
|
||||
;
|
||||
;exten => someexten,{priority|label{+|-}offset}[(alias)],application(arg1,arg2,...)
|
||||
;
|
||||
; Timing list for includes is
|
||||
|
45
configure
vendored
45
configure
vendored
@@ -23683,7 +23683,7 @@ if test "x${PBX_UNBOUND}" != "x1" -a "${USE_UNBOUND}" != "no"; then
|
||||
pbxlibdir="-L${UNBOUND_DIR}"
|
||||
fi
|
||||
fi
|
||||
pbxfuncname="ub_ctx_add_ta_autr"
|
||||
pbxfuncname="ub_ctx_delete"
|
||||
if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
|
||||
AST_UNBOUND_FOUND=yes
|
||||
else
|
||||
@@ -23777,6 +23777,49 @@ fi
|
||||
|
||||
|
||||
|
||||
if test "x${PBX_UNBOUND_CONST_PARAMS}" != "x1" -a "${USE_UNBOUND_CONST_PARAMS}" != "no"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNBOUND_VERSION_MAJOR declared in unbound.h" >&5
|
||||
$as_echo_n "checking for UNBOUND_VERSION_MAJOR declared in unbound.h... " >&6; }
|
||||
saved_cppflags="${CPPFLAGS}"
|
||||
if test "x${UNBOUND_CONST_PARAMS_DIR}" != "x"; then
|
||||
UNBOUND_CONST_PARAMS_INCLUDE="-I${UNBOUND_CONST_PARAMS_DIR}/include"
|
||||
fi
|
||||
CPPFLAGS="${CPPFLAGS} ${UNBOUND_CONST_PARAMS_INCLUDE}"
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <unbound.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
#if !defined(UNBOUND_VERSION_MAJOR)
|
||||
(void) UNBOUND_VERSION_MAJOR;
|
||||
#endif
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
PBX_UNBOUND_CONST_PARAMS=1
|
||||
|
||||
$as_echo "#define HAVE_UNBOUND_CONST_PARAMS 1" >>confdefs.h
|
||||
|
||||
|
||||
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
CPPFLAGS="${saved_cppflags}"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test "x${PBX_UNIXODBC}" != "x1" -a "${USE_UNIXODBC}" != "no"; then
|
||||
pbxlibdir=""
|
||||
|
@@ -2101,7 +2101,8 @@ AST_EXT_LIB_CHECK([NEWT], [newt], [newtBell], [newt.h])
|
||||
# script bug which does not find the ldns library. The bug is fixed in
|
||||
# v1.4.22 but that version is not easily detectable.
|
||||
#
|
||||
AST_EXT_LIB_CHECK([UNBOUND], [unbound], [ub_ctx_add_ta_autr], [unbound.h], [])
|
||||
AST_EXT_LIB_CHECK([UNBOUND], [unbound], [ub_ctx_delete], [unbound.h], [])
|
||||
AST_C_DECLARE_CHECK([UNBOUND_CONST_PARAMS], [UNBOUND_VERSION_MAJOR], [unbound.h])
|
||||
|
||||
AST_EXT_LIB_CHECK([UNIXODBC], [odbc], [SQLConnect], [sql.h], [])
|
||||
|
||||
|
@@ -0,0 +1,44 @@
|
||||
"""update_identify_by
|
||||
|
||||
Revision ID: 3772f8f828da
|
||||
Revises: c7a44a5a0851
|
||||
Create Date: 2016-08-11 10:47:29.211063
|
||||
|
||||
"""
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '3772f8f828da'
|
||||
down_revision = '4a6c67fa9b7a'
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
def enum_update(table_name, column_name, enum_name, enum_values):
|
||||
if op.get_context().bind.dialect.name != 'postgresql':
|
||||
op.alter_column(table_name, column_name,
|
||||
type_=sa.Enum(*enum_values, name=enum_name))
|
||||
return
|
||||
|
||||
# Postgres requires a few more steps
|
||||
tmp = enum_name + '_tmp'
|
||||
|
||||
op.execute('ALTER TYPE ' + enum_name + ' RENAME TO ' + tmp)
|
||||
|
||||
updated = sa.Enum(*enum_values, name=enum_name)
|
||||
updated.create(op.get_bind(), checkfirst=False)
|
||||
|
||||
op.execute('ALTER TABLE ' + table_name + ' ALTER COLUMN ' + column_name +
|
||||
' TYPE ' + enum_name + ' USING identify_by::text::' + enum_name)
|
||||
|
||||
op.execute('DROP TYPE ' + tmp)
|
||||
|
||||
|
||||
def upgrade():
|
||||
enum_update('ps_endpoints', 'identify_by', 'pjsip_identify_by_values',
|
||||
['username', 'auth_username'])
|
||||
|
||||
|
||||
def downgrade():
|
||||
enum_update('ps_endpoints', 'identify_by', 'pjsip_identify_by_values',
|
||||
['username'])
|
@@ -31,20 +31,18 @@ down_revision = '43956d550a44'
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.create_table(
|
||||
'extensions',
|
||||
sa.Column('id', sa.BigInteger, primary_key=True, nullable=False,
|
||||
unique=True, autoincrement=True),
|
||||
sa.Column('context', sa.String(40), primary_key=True, nullable=False),
|
||||
sa.Column('exten', sa.String(40), primary_key=True, nullable=False),
|
||||
sa.Column('priority', sa.Integer, primary_key=True, nullable=False,
|
||||
autoincrement=True),
|
||||
sa.Column('context', sa.String(40), nullable=False),
|
||||
sa.Column('exten', sa.String(40), nullable=False),
|
||||
sa.Column('priority', sa.Integer, nullable=False),
|
||||
sa.Column('app', sa.String(40), nullable=False),
|
||||
sa.Column('appdata', sa.String(256), nullable=False),
|
||||
sa.UniqueConstraint('context', 'exten', 'priority')
|
||||
)
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.drop_table('extensions')
|
||||
|
58
contrib/realtime/mssql/mssql_cdr.sql
Normal file
58
contrib/realtime/mssql/mssql_cdr.sql
Normal file
@@ -0,0 +1,58 @@
|
||||
BEGIN TRANSACTION;
|
||||
|
||||
CREATE TABLE alembic_version (
|
||||
version_num VARCHAR(32) NOT NULL
|
||||
);
|
||||
|
||||
GO
|
||||
|
||||
-- Running upgrade -> 210693f3123d
|
||||
|
||||
CREATE TABLE cdr (
|
||||
accountcode VARCHAR(20) NULL,
|
||||
src VARCHAR(80) NULL,
|
||||
dst VARCHAR(80) NULL,
|
||||
dcontext VARCHAR(80) NULL,
|
||||
clid VARCHAR(80) NULL,
|
||||
channel VARCHAR(80) NULL,
|
||||
dstchannel VARCHAR(80) NULL,
|
||||
lastapp VARCHAR(80) NULL,
|
||||
lastdata VARCHAR(80) NULL,
|
||||
start DATETIME NULL,
|
||||
answer DATETIME NULL,
|
||||
[end] DATETIME NULL,
|
||||
duration INTEGER NULL,
|
||||
billsec INTEGER NULL,
|
||||
disposition VARCHAR(45) NULL,
|
||||
amaflags VARCHAR(45) NULL,
|
||||
userfield VARCHAR(256) NULL,
|
||||
uniqueid VARCHAR(150) NULL,
|
||||
linkedid VARCHAR(150) NULL,
|
||||
peeraccount VARCHAR(20) NULL,
|
||||
sequence INTEGER NULL
|
||||
);
|
||||
|
||||
GO
|
||||
|
||||
INSERT INTO alembic_version (version_num) VALUES ('210693f3123d');
|
||||
|
||||
GO
|
||||
|
||||
-- Running upgrade 210693f3123d -> 54cde9847798
|
||||
|
||||
ALTER TABLE cdr ALTER COLUMN accountcode VARCHAR(80);
|
||||
|
||||
GO
|
||||
|
||||
ALTER TABLE cdr ALTER COLUMN peeraccount VARCHAR(80);
|
||||
|
||||
GO
|
||||
|
||||
UPDATE alembic_version SET version_num='54cde9847798' WHERE alembic_version.version_num = '210693f3123d';
|
||||
|
||||
GO
|
||||
|
||||
COMMIT;
|
||||
|
||||
GO
|
||||
|
1529
contrib/realtime/mssql/mssql_config.sql
Normal file
1529
contrib/realtime/mssql/mssql_config.sql
Normal file
File diff suppressed because it is too large
Load Diff
54
contrib/realtime/mssql/mssql_voicemail.sql
Normal file
54
contrib/realtime/mssql/mssql_voicemail.sql
Normal file
@@ -0,0 +1,54 @@
|
||||
BEGIN TRANSACTION;
|
||||
|
||||
CREATE TABLE alembic_version (
|
||||
version_num VARCHAR(32) NOT NULL
|
||||
);
|
||||
|
||||
GO
|
||||
|
||||
-- Running upgrade -> a2e9769475e
|
||||
|
||||
CREATE TABLE voicemail_messages (
|
||||
dir VARCHAR(255) NOT NULL,
|
||||
msgnum INTEGER NOT NULL,
|
||||
context VARCHAR(80) NULL,
|
||||
macrocontext VARCHAR(80) NULL,
|
||||
callerid VARCHAR(80) NULL,
|
||||
origtime INTEGER NULL,
|
||||
duration INTEGER NULL,
|
||||
recording IMAGE NULL,
|
||||
flag VARCHAR(30) NULL,
|
||||
category VARCHAR(30) NULL,
|
||||
mailboxuser VARCHAR(30) NULL,
|
||||
mailboxcontext VARCHAR(30) NULL,
|
||||
msg_id VARCHAR(40) NULL
|
||||
);
|
||||
|
||||
GO
|
||||
|
||||
ALTER TABLE voicemail_messages ADD CONSTRAINT voicemail_messages_dir_msgnum PRIMARY KEY (dir, msgnum);
|
||||
|
||||
GO
|
||||
|
||||
CREATE INDEX voicemail_messages_dir ON voicemail_messages (dir);
|
||||
|
||||
GO
|
||||
|
||||
INSERT INTO alembic_version (version_num) VALUES ('a2e9769475e');
|
||||
|
||||
GO
|
||||
|
||||
-- Running upgrade a2e9769475e -> 39428242f7f5
|
||||
|
||||
ALTER TABLE voicemail_messages ALTER COLUMN recording IMAGE;
|
||||
|
||||
GO
|
||||
|
||||
UPDATE alembic_version SET version_num='39428242f7f5' WHERE alembic_version.version_num = 'a2e9769475e';
|
||||
|
||||
GO
|
||||
|
||||
COMMIT;
|
||||
|
||||
GO
|
||||
|
40
contrib/realtime/mysql/mysql_cdr.sql
Normal file
40
contrib/realtime/mysql/mysql_cdr.sql
Normal file
@@ -0,0 +1,40 @@
|
||||
CREATE TABLE alembic_version (
|
||||
version_num VARCHAR(32) NOT NULL
|
||||
);
|
||||
|
||||
-- Running upgrade -> 210693f3123d
|
||||
|
||||
CREATE TABLE cdr (
|
||||
accountcode VARCHAR(20),
|
||||
src VARCHAR(80),
|
||||
dst VARCHAR(80),
|
||||
dcontext VARCHAR(80),
|
||||
clid VARCHAR(80),
|
||||
channel VARCHAR(80),
|
||||
dstchannel VARCHAR(80),
|
||||
lastapp VARCHAR(80),
|
||||
lastdata VARCHAR(80),
|
||||
start DATETIME,
|
||||
answer DATETIME,
|
||||
end DATETIME,
|
||||
duration INTEGER,
|
||||
billsec INTEGER,
|
||||
disposition VARCHAR(45),
|
||||
amaflags VARCHAR(45),
|
||||
userfield VARCHAR(256),
|
||||
uniqueid VARCHAR(150),
|
||||
linkedid VARCHAR(150),
|
||||
peeraccount VARCHAR(20),
|
||||
sequence INTEGER
|
||||
);
|
||||
|
||||
INSERT INTO alembic_version (version_num) VALUES ('210693f3123d');
|
||||
|
||||
-- Running upgrade 210693f3123d -> 54cde9847798
|
||||
|
||||
ALTER TABLE cdr MODIFY accountcode VARCHAR(80) NULL;
|
||||
|
||||
ALTER TABLE cdr MODIFY peeraccount VARCHAR(80) NULL;
|
||||
|
||||
UPDATE alembic_version SET version_num='54cde9847798' WHERE alembic_version.version_num = '210693f3123d';
|
||||
|
946
contrib/realtime/mysql/mysql_config.sql
Normal file
946
contrib/realtime/mysql/mysql_config.sql
Normal file
@@ -0,0 +1,946 @@
|
||||
CREATE TABLE alembic_version (
|
||||
version_num VARCHAR(32) NOT NULL
|
||||
);
|
||||
|
||||
-- Running upgrade -> 4da0c5f79a9c
|
||||
|
||||
CREATE TABLE sippeers (
|
||||
id INTEGER NOT NULL AUTO_INCREMENT,
|
||||
name VARCHAR(40) NOT NULL,
|
||||
ipaddr VARCHAR(45),
|
||||
port INTEGER,
|
||||
regseconds INTEGER,
|
||||
defaultuser VARCHAR(40),
|
||||
fullcontact VARCHAR(80),
|
||||
regserver VARCHAR(20),
|
||||
useragent VARCHAR(20),
|
||||
lastms INTEGER,
|
||||
host VARCHAR(40),
|
||||
type ENUM('friend','user','peer'),
|
||||
context VARCHAR(40),
|
||||
permit VARCHAR(95),
|
||||
deny VARCHAR(95),
|
||||
secret VARCHAR(40),
|
||||
md5secret VARCHAR(40),
|
||||
remotesecret VARCHAR(40),
|
||||
transport ENUM('udp','tcp','tls','ws','wss','udp,tcp','tcp,udp'),
|
||||
dtmfmode ENUM('rfc2833','info','shortinfo','inband','auto'),
|
||||
directmedia ENUM('yes','no','nonat','update'),
|
||||
nat VARCHAR(29),
|
||||
callgroup VARCHAR(40),
|
||||
pickupgroup VARCHAR(40),
|
||||
language VARCHAR(40),
|
||||
disallow VARCHAR(200),
|
||||
allow VARCHAR(200),
|
||||
insecure VARCHAR(40),
|
||||
trustrpid ENUM('yes','no'),
|
||||
progressinband ENUM('yes','no','never'),
|
||||
promiscredir ENUM('yes','no'),
|
||||
useclientcode ENUM('yes','no'),
|
||||
accountcode VARCHAR(40),
|
||||
setvar VARCHAR(200),
|
||||
callerid VARCHAR(40),
|
||||
amaflags VARCHAR(40),
|
||||
callcounter ENUM('yes','no'),
|
||||
busylevel INTEGER,
|
||||
allowoverlap ENUM('yes','no'),
|
||||
allowsubscribe ENUM('yes','no'),
|
||||
videosupport ENUM('yes','no'),
|
||||
maxcallbitrate INTEGER,
|
||||
rfc2833compensate ENUM('yes','no'),
|
||||
mailbox VARCHAR(40),
|
||||
`session-timers` ENUM('accept','refuse','originate'),
|
||||
`session-expires` INTEGER,
|
||||
`session-minse` INTEGER,
|
||||
`session-refresher` ENUM('uac','uas'),
|
||||
t38pt_usertpsource VARCHAR(40),
|
||||
regexten VARCHAR(40),
|
||||
fromdomain VARCHAR(40),
|
||||
fromuser VARCHAR(40),
|
||||
qualify VARCHAR(40),
|
||||
defaultip VARCHAR(45),
|
||||
rtptimeout INTEGER,
|
||||
rtpholdtimeout INTEGER,
|
||||
sendrpid ENUM('yes','no'),
|
||||
outboundproxy VARCHAR(40),
|
||||
callbackextension VARCHAR(40),
|
||||
timert1 INTEGER,
|
||||
timerb INTEGER,
|
||||
qualifyfreq INTEGER,
|
||||
constantssrc ENUM('yes','no'),
|
||||
contactpermit VARCHAR(95),
|
||||
contactdeny VARCHAR(95),
|
||||
usereqphone ENUM('yes','no'),
|
||||
textsupport ENUM('yes','no'),
|
||||
faxdetect ENUM('yes','no'),
|
||||
buggymwi ENUM('yes','no'),
|
||||
auth VARCHAR(40),
|
||||
fullname VARCHAR(40),
|
||||
trunkname VARCHAR(40),
|
||||
cid_number VARCHAR(40),
|
||||
callingpres ENUM('allowed_not_screened','allowed_passed_screen','allowed_failed_screen','allowed','prohib_not_screened','prohib_passed_screen','prohib_failed_screen','prohib'),
|
||||
mohinterpret VARCHAR(40),
|
||||
mohsuggest VARCHAR(40),
|
||||
parkinglot VARCHAR(40),
|
||||
hasvoicemail ENUM('yes','no'),
|
||||
subscribemwi ENUM('yes','no'),
|
||||
vmexten VARCHAR(40),
|
||||
autoframing ENUM('yes','no'),
|
||||
rtpkeepalive INTEGER,
|
||||
`call-limit` INTEGER,
|
||||
g726nonstandard ENUM('yes','no'),
|
||||
ignoresdpversion ENUM('yes','no'),
|
||||
allowtransfer ENUM('yes','no'),
|
||||
dynamic ENUM('yes','no'),
|
||||
path VARCHAR(256),
|
||||
supportpath ENUM('yes','no'),
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE (name)
|
||||
);
|
||||
|
||||
CREATE INDEX sippeers_name ON sippeers (name);
|
||||
|
||||
CREATE INDEX sippeers_name_host ON sippeers (name, host);
|
||||
|
||||
CREATE INDEX sippeers_ipaddr_port ON sippeers (ipaddr, port);
|
||||
|
||||
CREATE INDEX sippeers_host_port ON sippeers (host, port);
|
||||
|
||||
CREATE TABLE iaxfriends (
|
||||
id INTEGER NOT NULL AUTO_INCREMENT,
|
||||
name VARCHAR(40) NOT NULL,
|
||||
type ENUM('friend','user','peer'),
|
||||
username VARCHAR(40),
|
||||
mailbox VARCHAR(40),
|
||||
secret VARCHAR(40),
|
||||
dbsecret VARCHAR(40),
|
||||
context VARCHAR(40),
|
||||
regcontext VARCHAR(40),
|
||||
host VARCHAR(40),
|
||||
ipaddr VARCHAR(40),
|
||||
port INTEGER,
|
||||
defaultip VARCHAR(20),
|
||||
sourceaddress VARCHAR(20),
|
||||
mask VARCHAR(20),
|
||||
regexten VARCHAR(40),
|
||||
regseconds INTEGER,
|
||||
accountcode VARCHAR(20),
|
||||
mohinterpret VARCHAR(20),
|
||||
mohsuggest VARCHAR(20),
|
||||
inkeys VARCHAR(40),
|
||||
outkeys VARCHAR(40),
|
||||
language VARCHAR(10),
|
||||
callerid VARCHAR(100),
|
||||
cid_number VARCHAR(40),
|
||||
sendani ENUM('yes','no'),
|
||||
fullname VARCHAR(40),
|
||||
trunk ENUM('yes','no'),
|
||||
auth VARCHAR(20),
|
||||
maxauthreq INTEGER,
|
||||
requirecalltoken ENUM('yes','no','auto'),
|
||||
encryption ENUM('yes','no','aes128'),
|
||||
transfer ENUM('yes','no','mediaonly'),
|
||||
jitterbuffer ENUM('yes','no'),
|
||||
forcejitterbuffer ENUM('yes','no'),
|
||||
disallow VARCHAR(200),
|
||||
allow VARCHAR(200),
|
||||
codecpriority VARCHAR(40),
|
||||
qualify VARCHAR(10),
|
||||
qualifysmoothing ENUM('yes','no'),
|
||||
qualifyfreqok VARCHAR(10),
|
||||
qualifyfreqnotok VARCHAR(10),
|
||||
timezone VARCHAR(20),
|
||||
adsi ENUM('yes','no'),
|
||||
amaflags VARCHAR(20),
|
||||
setvar VARCHAR(200),
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE (name)
|
||||
);
|
||||
|
||||
CREATE INDEX iaxfriends_name ON iaxfriends (name);
|
||||
|
||||
CREATE INDEX iaxfriends_name_host ON iaxfriends (name, host);
|
||||
|
||||
CREATE INDEX iaxfriends_name_ipaddr_port ON iaxfriends (name, ipaddr, port);
|
||||
|
||||
CREATE INDEX iaxfriends_ipaddr_port ON iaxfriends (ipaddr, port);
|
||||
|
||||
CREATE INDEX iaxfriends_host_port ON iaxfriends (host, port);
|
||||
|
||||
CREATE TABLE voicemail (
|
||||
uniqueid INTEGER NOT NULL AUTO_INCREMENT,
|
||||
context VARCHAR(80) NOT NULL,
|
||||
mailbox VARCHAR(80) NOT NULL,
|
||||
password VARCHAR(80) NOT NULL,
|
||||
fullname VARCHAR(80),
|
||||
alias VARCHAR(80),
|
||||
email VARCHAR(80),
|
||||
pager VARCHAR(80),
|
||||
attach ENUM('yes','no'),
|
||||
attachfmt VARCHAR(10),
|
||||
serveremail VARCHAR(80),
|
||||
language VARCHAR(20),
|
||||
tz VARCHAR(30),
|
||||
deletevoicemail ENUM('yes','no'),
|
||||
saycid ENUM('yes','no'),
|
||||
sendvoicemail ENUM('yes','no'),
|
||||
review ENUM('yes','no'),
|
||||
tempgreetwarn ENUM('yes','no'),
|
||||
operator ENUM('yes','no'),
|
||||
envelope ENUM('yes','no'),
|
||||
sayduration INTEGER,
|
||||
forcename ENUM('yes','no'),
|
||||
forcegreetings ENUM('yes','no'),
|
||||
callback VARCHAR(80),
|
||||
dialout VARCHAR(80),
|
||||
exitcontext VARCHAR(80),
|
||||
maxmsg INTEGER,
|
||||
volgain NUMERIC(5, 2),
|
||||
imapuser VARCHAR(80),
|
||||
imappassword VARCHAR(80),
|
||||
imapserver VARCHAR(80),
|
||||
imapport VARCHAR(8),
|
||||
imapflags VARCHAR(80),
|
||||
stamp DATETIME,
|
||||
PRIMARY KEY (uniqueid)
|
||||
);
|
||||
|
||||
CREATE INDEX voicemail_mailbox ON voicemail (mailbox);
|
||||
|
||||
CREATE INDEX voicemail_context ON voicemail (context);
|
||||
|
||||
CREATE INDEX voicemail_mailbox_context ON voicemail (mailbox, context);
|
||||
|
||||
CREATE INDEX voicemail_imapuser ON voicemail (imapuser);
|
||||
|
||||
CREATE TABLE meetme (
|
||||
bookid INTEGER NOT NULL AUTO_INCREMENT,
|
||||
confno VARCHAR(80) NOT NULL,
|
||||
starttime DATETIME,
|
||||
endtime DATETIME,
|
||||
pin VARCHAR(20),
|
||||
adminpin VARCHAR(20),
|
||||
opts VARCHAR(20),
|
||||
adminopts VARCHAR(20),
|
||||
recordingfilename VARCHAR(80),
|
||||
recordingformat VARCHAR(10),
|
||||
maxusers INTEGER,
|
||||
members INTEGER NOT NULL,
|
||||
PRIMARY KEY (bookid)
|
||||
);
|
||||
|
||||
CREATE INDEX meetme_confno_start_end ON meetme (confno, starttime, endtime);
|
||||
|
||||
CREATE TABLE musiconhold (
|
||||
name VARCHAR(80) NOT NULL,
|
||||
mode ENUM('custom','files','mp3nb','quietmp3nb','quietmp3'),
|
||||
directory VARCHAR(255),
|
||||
application VARCHAR(255),
|
||||
digit VARCHAR(1),
|
||||
sort VARCHAR(10),
|
||||
format VARCHAR(10),
|
||||
stamp DATETIME,
|
||||
PRIMARY KEY (name)
|
||||
);
|
||||
|
||||
INSERT INTO alembic_version (version_num) VALUES ('4da0c5f79a9c');
|
||||
|
||||
-- Running upgrade 4da0c5f79a9c -> 43956d550a44
|
||||
|
||||
CREATE TABLE ps_endpoints (
|
||||
id VARCHAR(40) NOT NULL,
|
||||
transport VARCHAR(40),
|
||||
aors VARCHAR(200),
|
||||
auth VARCHAR(40),
|
||||
context VARCHAR(40),
|
||||
disallow VARCHAR(200),
|
||||
allow VARCHAR(200),
|
||||
direct_media ENUM('yes','no'),
|
||||
connected_line_method ENUM('invite','reinvite','update'),
|
||||
direct_media_method ENUM('invite','reinvite','update'),
|
||||
direct_media_glare_mitigation ENUM('none','outgoing','incoming'),
|
||||
disable_direct_media_on_nat ENUM('yes','no'),
|
||||
dtmf_mode ENUM('rfc4733','inband','info'),
|
||||
external_media_address VARCHAR(40),
|
||||
force_rport ENUM('yes','no'),
|
||||
ice_support ENUM('yes','no'),
|
||||
identify_by ENUM('username'),
|
||||
mailboxes VARCHAR(40),
|
||||
moh_suggest VARCHAR(40),
|
||||
outbound_auth VARCHAR(40),
|
||||
outbound_proxy VARCHAR(40),
|
||||
rewrite_contact ENUM('yes','no'),
|
||||
rtp_ipv6 ENUM('yes','no'),
|
||||
rtp_symmetric ENUM('yes','no'),
|
||||
send_diversion ENUM('yes','no'),
|
||||
send_pai ENUM('yes','no'),
|
||||
send_rpid ENUM('yes','no'),
|
||||
timers_min_se INTEGER,
|
||||
timers ENUM('forced','no','required','yes'),
|
||||
timers_sess_expires INTEGER,
|
||||
callerid VARCHAR(40),
|
||||
callerid_privacy ENUM('allowed_not_screened','allowed_passed_screened','allowed_failed_screened','allowed','prohib_not_screened','prohib_passed_screened','prohib_failed_screened','prohib','unavailable'),
|
||||
callerid_tag VARCHAR(40),
|
||||
`100rel` ENUM('no','required','yes'),
|
||||
aggregate_mwi ENUM('yes','no'),
|
||||
trust_id_inbound ENUM('yes','no'),
|
||||
trust_id_outbound ENUM('yes','no'),
|
||||
use_ptime ENUM('yes','no'),
|
||||
use_avpf ENUM('yes','no'),
|
||||
media_encryption ENUM('no','sdes','dtls'),
|
||||
inband_progress ENUM('yes','no'),
|
||||
call_group VARCHAR(40),
|
||||
pickup_group VARCHAR(40),
|
||||
named_call_group VARCHAR(40),
|
||||
named_pickup_group VARCHAR(40),
|
||||
device_state_busy_at INTEGER,
|
||||
fax_detect ENUM('yes','no'),
|
||||
t38_udptl ENUM('yes','no'),
|
||||
t38_udptl_ec ENUM('none','fec','redundancy'),
|
||||
t38_udptl_maxdatagram INTEGER,
|
||||
t38_udptl_nat ENUM('yes','no'),
|
||||
t38_udptl_ipv6 ENUM('yes','no'),
|
||||
tone_zone VARCHAR(40),
|
||||
language VARCHAR(40),
|
||||
one_touch_recording ENUM('yes','no'),
|
||||
record_on_feature VARCHAR(40),
|
||||
record_off_feature VARCHAR(40),
|
||||
rtp_engine VARCHAR(40),
|
||||
allow_transfer ENUM('yes','no'),
|
||||
allow_subscribe ENUM('yes','no'),
|
||||
sdp_owner VARCHAR(40),
|
||||
sdp_session VARCHAR(40),
|
||||
tos_audio INTEGER,
|
||||
tos_video INTEGER,
|
||||
cos_audio INTEGER,
|
||||
cos_video INTEGER,
|
||||
sub_min_expiry INTEGER,
|
||||
from_domain VARCHAR(40),
|
||||
from_user VARCHAR(40),
|
||||
mwi_fromuser VARCHAR(40),
|
||||
dtls_verify VARCHAR(40),
|
||||
dtls_rekey VARCHAR(40),
|
||||
dtls_cert_file VARCHAR(200),
|
||||
dtls_private_key VARCHAR(200),
|
||||
dtls_cipher VARCHAR(200),
|
||||
dtls_ca_file VARCHAR(200),
|
||||
dtls_ca_path VARCHAR(200),
|
||||
dtls_setup ENUM('active','passive','actpass'),
|
||||
srtp_tag_32 ENUM('yes','no'),
|
||||
UNIQUE (id)
|
||||
);
|
||||
|
||||
CREATE INDEX ps_endpoints_id ON ps_endpoints (id);
|
||||
|
||||
CREATE TABLE ps_auths (
|
||||
id VARCHAR(40) NOT NULL,
|
||||
auth_type ENUM('md5','userpass'),
|
||||
nonce_lifetime INTEGER,
|
||||
md5_cred VARCHAR(40),
|
||||
password VARCHAR(80),
|
||||
realm VARCHAR(40),
|
||||
username VARCHAR(40),
|
||||
UNIQUE (id)
|
||||
);
|
||||
|
||||
CREATE INDEX ps_auths_id ON ps_auths (id);
|
||||
|
||||
CREATE TABLE ps_aors (
|
||||
id VARCHAR(40) NOT NULL,
|
||||
contact VARCHAR(40),
|
||||
default_expiration INTEGER,
|
||||
mailboxes VARCHAR(80),
|
||||
max_contacts INTEGER,
|
||||
minimum_expiration INTEGER,
|
||||
remove_existing ENUM('yes','no'),
|
||||
qualify_frequency INTEGER,
|
||||
authenticate_qualify ENUM('yes','no'),
|
||||
UNIQUE (id)
|
||||
);
|
||||
|
||||
CREATE INDEX ps_aors_id ON ps_aors (id);
|
||||
|
||||
CREATE TABLE ps_contacts (
|
||||
id VARCHAR(40) NOT NULL,
|
||||
uri VARCHAR(40),
|
||||
expiration_time VARCHAR(40),
|
||||
qualify_frequency INTEGER,
|
||||
UNIQUE (id)
|
||||
);
|
||||
|
||||
CREATE INDEX ps_contacts_id ON ps_contacts (id);
|
||||
|
||||
CREATE TABLE ps_domain_aliases (
|
||||
id VARCHAR(40) NOT NULL,
|
||||
domain VARCHAR(80),
|
||||
UNIQUE (id)
|
||||
);
|
||||
|
||||
CREATE INDEX ps_domain_aliases_id ON ps_domain_aliases (id);
|
||||
|
||||
CREATE TABLE ps_endpoint_id_ips (
|
||||
id VARCHAR(40) NOT NULL,
|
||||
endpoint VARCHAR(40),
|
||||
`match` VARCHAR(80),
|
||||
UNIQUE (id)
|
||||
);
|
||||
|
||||
CREATE INDEX ps_endpoint_id_ips_id ON ps_endpoint_id_ips (id);
|
||||
|
||||
UPDATE alembic_version SET version_num='43956d550a44' WHERE alembic_version.version_num = '4da0c5f79a9c';
|
||||
|
||||
-- Running upgrade 43956d550a44 -> 581a4264e537
|
||||
|
||||
CREATE TABLE extensions (
|
||||
id BIGINT NOT NULL AUTO_INCREMENT,
|
||||
context VARCHAR(40) NOT NULL,
|
||||
exten VARCHAR(40) NOT NULL,
|
||||
priority INTEGER NOT NULL,
|
||||
app VARCHAR(40) NOT NULL,
|
||||
appdata VARCHAR(256) NOT NULL,
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE (context, exten, priority),
|
||||
UNIQUE (id)
|
||||
);
|
||||
|
||||
UPDATE alembic_version SET version_num='581a4264e537' WHERE alembic_version.version_num = '43956d550a44';
|
||||
|
||||
-- Running upgrade 581a4264e537 -> 2fc7930b41b3
|
||||
|
||||
CREATE TABLE ps_systems (
|
||||
id VARCHAR(40) NOT NULL,
|
||||
timer_t1 INTEGER,
|
||||
timer_b INTEGER,
|
||||
compact_headers ENUM('yes','no'),
|
||||
threadpool_initial_size INTEGER,
|
||||
threadpool_auto_increment INTEGER,
|
||||
threadpool_idle_timeout INTEGER,
|
||||
threadpool_max_size INTEGER,
|
||||
UNIQUE (id)
|
||||
);
|
||||
|
||||
CREATE INDEX ps_systems_id ON ps_systems (id);
|
||||
|
||||
CREATE TABLE ps_globals (
|
||||
id VARCHAR(40) NOT NULL,
|
||||
max_forwards INTEGER,
|
||||
user_agent VARCHAR(40),
|
||||
default_outbound_endpoint VARCHAR(40),
|
||||
UNIQUE (id)
|
||||
);
|
||||
|
||||
CREATE INDEX ps_globals_id ON ps_globals (id);
|
||||
|
||||
CREATE TABLE ps_transports (
|
||||
id VARCHAR(40) NOT NULL,
|
||||
async_operations INTEGER,
|
||||
bind VARCHAR(40),
|
||||
ca_list_file VARCHAR(200),
|
||||
cert_file VARCHAR(200),
|
||||
cipher VARCHAR(200),
|
||||
domain VARCHAR(40),
|
||||
external_media_address VARCHAR(40),
|
||||
external_signaling_address VARCHAR(40),
|
||||
external_signaling_port INTEGER,
|
||||
method ENUM('default','unspecified','tlsv1','sslv2','sslv3','sslv23'),
|
||||
local_net VARCHAR(40),
|
||||
password VARCHAR(40),
|
||||
priv_key_file VARCHAR(200),
|
||||
protocol ENUM('udp','tcp','tls','ws','wss'),
|
||||
require_client_cert ENUM('yes','no'),
|
||||
verify_client ENUM('yes','no'),
|
||||
verifiy_server ENUM('yes','no'),
|
||||
tos ENUM('yes','no'),
|
||||
cos ENUM('yes','no'),
|
||||
UNIQUE (id)
|
||||
);
|
||||
|
||||
CREATE INDEX ps_transports_id ON ps_transports (id);
|
||||
|
||||
CREATE TABLE ps_registrations (
|
||||
id VARCHAR(40) NOT NULL,
|
||||
auth_rejection_permanent ENUM('yes','no'),
|
||||
client_uri VARCHAR(40),
|
||||
contact_user VARCHAR(40),
|
||||
expiration INTEGER,
|
||||
max_retries INTEGER,
|
||||
outbound_auth VARCHAR(40),
|
||||
outbound_proxy VARCHAR(40),
|
||||
retry_interval INTEGER,
|
||||
forbidden_retry_interval INTEGER,
|
||||
server_uri VARCHAR(40),
|
||||
transport VARCHAR(40),
|
||||
support_path ENUM('yes','no'),
|
||||
UNIQUE (id)
|
||||
);
|
||||
|
||||
CREATE INDEX ps_registrations_id ON ps_registrations (id);
|
||||
|
||||
ALTER TABLE ps_endpoints ADD COLUMN media_address VARCHAR(40);
|
||||
|
||||
ALTER TABLE ps_endpoints ADD COLUMN redirect_method ENUM('user','uri_core','uri_pjsip');
|
||||
|
||||
ALTER TABLE ps_endpoints ADD COLUMN set_var TEXT;
|
||||
|
||||
ALTER TABLE ps_endpoints CHANGE mwi_fromuser mwi_from_user VARCHAR(40) NULL;
|
||||
|
||||
ALTER TABLE ps_contacts ADD COLUMN outbound_proxy VARCHAR(40);
|
||||
|
||||
ALTER TABLE ps_contacts ADD COLUMN path TEXT;
|
||||
|
||||
ALTER TABLE ps_aors ADD COLUMN maximum_expiration INTEGER;
|
||||
|
||||
ALTER TABLE ps_aors ADD COLUMN outbound_proxy VARCHAR(40);
|
||||
|
||||
ALTER TABLE ps_aors ADD COLUMN support_path ENUM('yes','no');
|
||||
|
||||
UPDATE alembic_version SET version_num='2fc7930b41b3' WHERE alembic_version.version_num = '581a4264e537';
|
||||
|
||||
-- Running upgrade 2fc7930b41b3 -> 21e526ad3040
|
||||
|
||||
ALTER TABLE ps_globals ADD COLUMN debug VARCHAR(40);
|
||||
|
||||
UPDATE alembic_version SET version_num='21e526ad3040' WHERE alembic_version.version_num = '2fc7930b41b3';
|
||||
|
||||
-- Running upgrade 21e526ad3040 -> 28887f25a46f
|
||||
|
||||
CREATE TABLE queues (
|
||||
name VARCHAR(128) NOT NULL,
|
||||
musiconhold VARCHAR(128),
|
||||
announce VARCHAR(128),
|
||||
context VARCHAR(128),
|
||||
timeout INTEGER,
|
||||
ringinuse ENUM('yes','no'),
|
||||
setinterfacevar ENUM('yes','no'),
|
||||
setqueuevar ENUM('yes','no'),
|
||||
setqueueentryvar ENUM('yes','no'),
|
||||
monitor_format VARCHAR(8),
|
||||
membermacro VARCHAR(512),
|
||||
membergosub VARCHAR(512),
|
||||
queue_youarenext VARCHAR(128),
|
||||
queue_thereare VARCHAR(128),
|
||||
queue_callswaiting VARCHAR(128),
|
||||
queue_quantity1 VARCHAR(128),
|
||||
queue_quantity2 VARCHAR(128),
|
||||
queue_holdtime VARCHAR(128),
|
||||
queue_minutes VARCHAR(128),
|
||||
queue_minute VARCHAR(128),
|
||||
queue_seconds VARCHAR(128),
|
||||
queue_thankyou VARCHAR(128),
|
||||
queue_callerannounce VARCHAR(128),
|
||||
queue_reporthold VARCHAR(128),
|
||||
announce_frequency INTEGER,
|
||||
announce_to_first_user ENUM('yes','no'),
|
||||
min_announce_frequency INTEGER,
|
||||
announce_round_seconds INTEGER,
|
||||
announce_holdtime VARCHAR(128),
|
||||
announce_position VARCHAR(128),
|
||||
announce_position_limit INTEGER,
|
||||
periodic_announce VARCHAR(50),
|
||||
periodic_announce_frequency INTEGER,
|
||||
relative_periodic_announce ENUM('yes','no'),
|
||||
random_periodic_announce ENUM('yes','no'),
|
||||
retry INTEGER,
|
||||
wrapuptime INTEGER,
|
||||
penaltymemberslimit INTEGER,
|
||||
autofill ENUM('yes','no'),
|
||||
monitor_type VARCHAR(128),
|
||||
autopause ENUM('yes','no','all'),
|
||||
autopausedelay INTEGER,
|
||||
autopausebusy ENUM('yes','no'),
|
||||
autopauseunavail ENUM('yes','no'),
|
||||
maxlen INTEGER,
|
||||
servicelevel INTEGER,
|
||||
strategy ENUM('ringall','leastrecent','fewestcalls','random','rrmemory','linear','wrandom','rrordered'),
|
||||
joinempty VARCHAR(128),
|
||||
leavewhenempty VARCHAR(128),
|
||||
reportholdtime ENUM('yes','no'),
|
||||
memberdelay INTEGER,
|
||||
weight INTEGER,
|
||||
timeoutrestart ENUM('yes','no'),
|
||||
defaultrule VARCHAR(128),
|
||||
timeoutpriority VARCHAR(128),
|
||||
PRIMARY KEY (name)
|
||||
);
|
||||
|
||||
CREATE TABLE queue_members (
|
||||
queue_name VARCHAR(80) NOT NULL,
|
||||
interface VARCHAR(80) NOT NULL,
|
||||
uniqueid VARCHAR(80) NOT NULL,
|
||||
membername VARCHAR(80),
|
||||
state_interface VARCHAR(80),
|
||||
penalty INTEGER,
|
||||
paused INTEGER,
|
||||
PRIMARY KEY (queue_name, interface)
|
||||
);
|
||||
|
||||
UPDATE alembic_version SET version_num='28887f25a46f' WHERE alembic_version.version_num = '21e526ad3040';
|
||||
|
||||
-- Running upgrade 28887f25a46f -> 4c573e7135bd
|
||||
|
||||
ALTER TABLE ps_endpoints MODIFY tos_audio VARCHAR(10) NULL;
|
||||
|
||||
ALTER TABLE ps_endpoints MODIFY tos_video VARCHAR(10) NULL;
|
||||
|
||||
ALTER TABLE ps_endpoints DROP COLUMN cos_audio;
|
||||
|
||||
ALTER TABLE ps_endpoints DROP COLUMN cos_video;
|
||||
|
||||
ALTER TABLE ps_endpoints ADD COLUMN cos_audio INTEGER;
|
||||
|
||||
ALTER TABLE ps_endpoints ADD COLUMN cos_video INTEGER;
|
||||
|
||||
ALTER TABLE ps_transports MODIFY tos VARCHAR(10) NULL;
|
||||
|
||||
ALTER TABLE ps_transports DROP COLUMN cos;
|
||||
|
||||
ALTER TABLE ps_transports ADD COLUMN cos INTEGER;
|
||||
|
||||
UPDATE alembic_version SET version_num='4c573e7135bd' WHERE alembic_version.version_num = '28887f25a46f';
|
||||
|
||||
-- Running upgrade 4c573e7135bd -> 3855ee4e5f85
|
||||
|
||||
ALTER TABLE ps_endpoints ADD COLUMN message_context VARCHAR(40);
|
||||
|
||||
ALTER TABLE ps_contacts ADD COLUMN user_agent VARCHAR(40);
|
||||
|
||||
UPDATE alembic_version SET version_num='3855ee4e5f85' WHERE alembic_version.version_num = '4c573e7135bd';
|
||||
|
||||
-- Running upgrade 3855ee4e5f85 -> e96a0b8071c
|
||||
|
||||
ALTER TABLE ps_globals MODIFY user_agent VARCHAR(255) NULL;
|
||||
|
||||
ALTER TABLE ps_contacts MODIFY id VARCHAR(255) NULL;
|
||||
|
||||
ALTER TABLE ps_contacts MODIFY uri VARCHAR(255) NULL;
|
||||
|
||||
ALTER TABLE ps_contacts MODIFY user_agent VARCHAR(255) NULL;
|
||||
|
||||
ALTER TABLE ps_registrations MODIFY client_uri VARCHAR(255) NULL;
|
||||
|
||||
ALTER TABLE ps_registrations MODIFY server_uri VARCHAR(255) NULL;
|
||||
|
||||
UPDATE alembic_version SET version_num='e96a0b8071c' WHERE alembic_version.version_num = '3855ee4e5f85';
|
||||
|
||||
-- Running upgrade e96a0b8071c -> c6d929b23a8
|
||||
|
||||
CREATE TABLE ps_subscription_persistence (
|
||||
id VARCHAR(40) NOT NULL,
|
||||
packet VARCHAR(2048),
|
||||
src_name VARCHAR(128),
|
||||
src_port INTEGER,
|
||||
transport_key VARCHAR(64),
|
||||
local_name VARCHAR(128),
|
||||
local_port INTEGER,
|
||||
cseq INTEGER,
|
||||
tag VARCHAR(128),
|
||||
endpoint VARCHAR(40),
|
||||
expires INTEGER,
|
||||
UNIQUE (id)
|
||||
);
|
||||
|
||||
CREATE INDEX ps_subscription_persistence_id ON ps_subscription_persistence (id);
|
||||
|
||||
UPDATE alembic_version SET version_num='c6d929b23a8' WHERE alembic_version.version_num = 'e96a0b8071c';
|
||||
|
||||
-- Running upgrade c6d929b23a8 -> 51f8cb66540e
|
||||
|
||||
ALTER TABLE ps_endpoints ADD COLUMN force_avp ENUM('yes','no');
|
||||
|
||||
ALTER TABLE ps_endpoints ADD COLUMN media_use_received_transport ENUM('yes','no');
|
||||
|
||||
UPDATE alembic_version SET version_num='51f8cb66540e' WHERE alembic_version.version_num = 'c6d929b23a8';
|
||||
|
||||
-- Running upgrade 51f8cb66540e -> 1d50859ed02e
|
||||
|
||||
ALTER TABLE ps_endpoints ADD COLUMN accountcode VARCHAR(20);
|
||||
|
||||
UPDATE alembic_version SET version_num='1d50859ed02e' WHERE alembic_version.version_num = '51f8cb66540e';
|
||||
|
||||
-- Running upgrade 1d50859ed02e -> 1758e8bbf6b
|
||||
|
||||
ALTER TABLE sippeers MODIFY useragent VARCHAR(255) NULL;
|
||||
|
||||
UPDATE alembic_version SET version_num='1758e8bbf6b' WHERE alembic_version.version_num = '1d50859ed02e';
|
||||
|
||||
-- Running upgrade 1758e8bbf6b -> 5139253c0423
|
||||
|
||||
ALTER TABLE queue_members DROP COLUMN uniqueid;
|
||||
|
||||
ALTER TABLE queue_members ADD COLUMN uniqueid INTEGER NOT NULL;
|
||||
|
||||
ALTER TABLE queue_members ADD UNIQUE (uniqueid);
|
||||
|
||||
ALTER TABLE queue_members MODIFY uniqueid INTEGER NOT NULL AUTO_INCREMENT;
|
||||
|
||||
UPDATE alembic_version SET version_num='5139253c0423' WHERE alembic_version.version_num = '1758e8bbf6b';
|
||||
|
||||
-- Running upgrade 5139253c0423 -> d39508cb8d8
|
||||
|
||||
CREATE TABLE queue_rules (
|
||||
rule_name VARCHAR(80) NOT NULL,
|
||||
time VARCHAR(32) NOT NULL,
|
||||
min_penalty VARCHAR(32) NOT NULL,
|
||||
max_penalty VARCHAR(32) NOT NULL
|
||||
);
|
||||
|
||||
UPDATE alembic_version SET version_num='d39508cb8d8' WHERE alembic_version.version_num = '5139253c0423';
|
||||
|
||||
-- Running upgrade d39508cb8d8 -> 5950038a6ead
|
||||
|
||||
ALTER TABLE ps_transports CHANGE verifiy_server verify_server ENUM('yes','no') NULL;
|
||||
|
||||
UPDATE alembic_version SET version_num='5950038a6ead' WHERE alembic_version.version_num = 'd39508cb8d8';
|
||||
|
||||
-- Running upgrade 5950038a6ead -> 10aedae86a32
|
||||
|
||||
ALTER TABLE sippeers MODIFY directmedia ENUM('yes','no','nonat','update','outgoing') NULL;
|
||||
|
||||
UPDATE alembic_version SET version_num='10aedae86a32' WHERE alembic_version.version_num = '5950038a6ead';
|
||||
|
||||
-- Running upgrade 10aedae86a32 -> 371a3bf4143e
|
||||
|
||||
ALTER TABLE ps_endpoints ADD COLUMN user_eq_phone ENUM('yes','no');
|
||||
|
||||
UPDATE alembic_version SET version_num='371a3bf4143e' WHERE alembic_version.version_num = '10aedae86a32';
|
||||
|
||||
-- Running upgrade 371a3bf4143e -> 15b1430ad6f1
|
||||
|
||||
ALTER TABLE ps_endpoints ADD COLUMN moh_passthrough ENUM('yes','no');
|
||||
|
||||
UPDATE alembic_version SET version_num='15b1430ad6f1' WHERE alembic_version.version_num = '371a3bf4143e';
|
||||
|
||||
-- Running upgrade 15b1430ad6f1 -> 945b1098bdd
|
||||
|
||||
ALTER TABLE ps_endpoints ADD COLUMN media_encryption_optimistic ENUM('yes','no');
|
||||
|
||||
UPDATE alembic_version SET version_num='945b1098bdd' WHERE alembic_version.version_num = '15b1430ad6f1';
|
||||
|
||||
-- Running upgrade 945b1098bdd -> 45e3f47c6c44
|
||||
|
||||
ALTER TABLE ps_globals ADD COLUMN endpoint_identifier_order VARCHAR(40);
|
||||
|
||||
UPDATE alembic_version SET version_num='45e3f47c6c44' WHERE alembic_version.version_num = '945b1098bdd';
|
||||
|
||||
-- Running upgrade 45e3f47c6c44 -> 23530d604b96
|
||||
|
||||
ALTER TABLE ps_endpoints ADD COLUMN rpid_immediate ENUM('yes','no');
|
||||
|
||||
UPDATE alembic_version SET version_num='23530d604b96' WHERE alembic_version.version_num = '45e3f47c6c44';
|
||||
|
||||
-- Running upgrade 23530d604b96 -> 31cd4f4891ec
|
||||
|
||||
ALTER TABLE ps_endpoints MODIFY dtmf_mode ENUM('rfc4733','inband','info','auto') NULL;
|
||||
|
||||
UPDATE alembic_version SET version_num='31cd4f4891ec' WHERE alembic_version.version_num = '23530d604b96';
|
||||
|
||||
-- Running upgrade 31cd4f4891ec -> 461d7d691209
|
||||
|
||||
ALTER TABLE ps_aors ADD COLUMN qualify_timeout INTEGER;
|
||||
|
||||
ALTER TABLE ps_contacts ADD COLUMN qualify_timeout INTEGER;
|
||||
|
||||
UPDATE alembic_version SET version_num='461d7d691209' WHERE alembic_version.version_num = '31cd4f4891ec';
|
||||
|
||||
-- Running upgrade 461d7d691209 -> a541e0b5e89
|
||||
|
||||
ALTER TABLE ps_globals ADD COLUMN max_initial_qualify_time INTEGER;
|
||||
|
||||
UPDATE alembic_version SET version_num='a541e0b5e89' WHERE alembic_version.version_num = '461d7d691209';
|
||||
|
||||
-- Running upgrade a541e0b5e89 -> 28b8e71e541f
|
||||
|
||||
ALTER TABLE ps_endpoints ADD COLUMN g726_non_standard ENUM('yes','no');
|
||||
|
||||
UPDATE alembic_version SET version_num='28b8e71e541f' WHERE alembic_version.version_num = 'a541e0b5e89';
|
||||
|
||||
-- Running upgrade 28b8e71e541f -> 498357a710ae
|
||||
|
||||
ALTER TABLE ps_endpoints ADD COLUMN rtp_keepalive INTEGER;
|
||||
|
||||
UPDATE alembic_version SET version_num='498357a710ae' WHERE alembic_version.version_num = '28b8e71e541f';
|
||||
|
||||
-- Running upgrade 498357a710ae -> 26f10cadc157
|
||||
|
||||
ALTER TABLE ps_endpoints ADD COLUMN rtp_timeout INTEGER;
|
||||
|
||||
ALTER TABLE ps_endpoints ADD COLUMN rtp_timeout_hold INTEGER;
|
||||
|
||||
UPDATE alembic_version SET version_num='26f10cadc157' WHERE alembic_version.version_num = '498357a710ae';
|
||||
|
||||
-- Running upgrade 26f10cadc157 -> 154177371065
|
||||
|
||||
ALTER TABLE ps_globals ADD COLUMN default_from_user VARCHAR(80);
|
||||
|
||||
UPDATE alembic_version SET version_num='154177371065' WHERE alembic_version.version_num = '26f10cadc157';
|
||||
|
||||
-- Running upgrade 154177371065 -> 28ce1e718f05
|
||||
|
||||
ALTER TABLE ps_registrations ADD COLUMN fatal_retry_interval INTEGER;
|
||||
|
||||
UPDATE alembic_version SET version_num='28ce1e718f05' WHERE alembic_version.version_num = '154177371065';
|
||||
|
||||
-- Running upgrade 28ce1e718f05 -> 339a3bdf53fc
|
||||
|
||||
ALTER TABLE ps_endpoints MODIFY accountcode VARCHAR(80) NULL;
|
||||
|
||||
ALTER TABLE sippeers MODIFY accountcode VARCHAR(80) NULL;
|
||||
|
||||
ALTER TABLE iaxfriends MODIFY accountcode VARCHAR(80) NULL;
|
||||
|
||||
UPDATE alembic_version SET version_num='339a3bdf53fc' WHERE alembic_version.version_num = '28ce1e718f05';
|
||||
|
||||
-- Running upgrade 339a3bdf53fc -> 189a235b3fd7
|
||||
|
||||
ALTER TABLE ps_globals ADD COLUMN keep_alive_interval INTEGER;
|
||||
|
||||
UPDATE alembic_version SET version_num='189a235b3fd7' WHERE alembic_version.version_num = '339a3bdf53fc';
|
||||
|
||||
-- Running upgrade 189a235b3fd7 -> 2d078ec071b7
|
||||
|
||||
ALTER TABLE ps_aors MODIFY contact VARCHAR(255) NULL;
|
||||
|
||||
UPDATE alembic_version SET version_num='2d078ec071b7' WHERE alembic_version.version_num = '189a235b3fd7';
|
||||
|
||||
-- Running upgrade 2d078ec071b7 -> 26d7f3bf0fa5
|
||||
|
||||
ALTER TABLE ps_endpoints ADD COLUMN bind_rtp_to_media_address ENUM('yes','no');
|
||||
|
||||
UPDATE alembic_version SET version_num='26d7f3bf0fa5' WHERE alembic_version.version_num = '2d078ec071b7';
|
||||
|
||||
-- Running upgrade 26d7f3bf0fa5 -> 136885b81223
|
||||
|
||||
ALTER TABLE ps_globals ADD COLUMN regcontext VARCHAR(80);
|
||||
|
||||
UPDATE alembic_version SET version_num='136885b81223' WHERE alembic_version.version_num = '26d7f3bf0fa5';
|
||||
|
||||
-- Running upgrade 136885b81223 -> 423f34ad36e2
|
||||
|
||||
ALTER TABLE ps_aors MODIFY qualify_timeout FLOAT NULL;
|
||||
|
||||
ALTER TABLE ps_contacts MODIFY qualify_timeout FLOAT NULL;
|
||||
|
||||
UPDATE alembic_version SET version_num='423f34ad36e2' WHERE alembic_version.version_num = '136885b81223';
|
||||
|
||||
-- Running upgrade 423f34ad36e2 -> dbc44d5a908
|
||||
|
||||
ALTER TABLE ps_systems ADD COLUMN disable_tcp_switch ENUM('yes','no');
|
||||
|
||||
ALTER TABLE ps_registrations ADD COLUMN line ENUM('yes','no');
|
||||
|
||||
ALTER TABLE ps_registrations ADD COLUMN endpoint VARCHAR(40);
|
||||
|
||||
UPDATE alembic_version SET version_num='dbc44d5a908' WHERE alembic_version.version_num = '423f34ad36e2';
|
||||
|
||||
-- Running upgrade dbc44d5a908 -> 3bcc0b5bc2c9
|
||||
|
||||
ALTER TABLE ps_transports ADD COLUMN allow_reload ENUM('yes','no');
|
||||
|
||||
UPDATE alembic_version SET version_num='3bcc0b5bc2c9' WHERE alembic_version.version_num = 'dbc44d5a908';
|
||||
|
||||
-- Running upgrade 3bcc0b5bc2c9 -> 5813202e92be
|
||||
|
||||
ALTER TABLE ps_globals ADD COLUMN contact_expiration_check_interval INTEGER;
|
||||
|
||||
UPDATE alembic_version SET version_num='5813202e92be' WHERE alembic_version.version_num = '3bcc0b5bc2c9';
|
||||
|
||||
-- Running upgrade 5813202e92be -> 1c688d9a003c
|
||||
|
||||
ALTER TABLE ps_globals ADD COLUMN default_voicemail_extension VARCHAR(40);
|
||||
|
||||
ALTER TABLE ps_aors ADD COLUMN voicemail_extension VARCHAR(40);
|
||||
|
||||
ALTER TABLE ps_endpoints ADD COLUMN voicemail_extension VARCHAR(40);
|
||||
|
||||
ALTER TABLE ps_endpoints ADD COLUMN mwi_subscribe_replaces_unsolicited INTEGER;
|
||||
|
||||
UPDATE alembic_version SET version_num='1c688d9a003c' WHERE alembic_version.version_num = '5813202e92be';
|
||||
|
||||
-- Running upgrade 1c688d9a003c -> 8d478ab86e29
|
||||
|
||||
ALTER TABLE ps_globals ADD COLUMN disable_multi_domain ENUM('yes','no');
|
||||
|
||||
UPDATE alembic_version SET version_num='8d478ab86e29' WHERE alembic_version.version_num = '1c688d9a003c';
|
||||
|
||||
-- Running upgrade 8d478ab86e29 -> 65eb22eb195
|
||||
|
||||
ALTER TABLE ps_globals ADD COLUMN unidentified_request_count INTEGER;
|
||||
|
||||
ALTER TABLE ps_globals ADD COLUMN unidentified_request_period INTEGER;
|
||||
|
||||
ALTER TABLE ps_globals ADD COLUMN unidentified_request_prune_interval INTEGER;
|
||||
|
||||
ALTER TABLE ps_globals ADD COLUMN default_realm VARCHAR(40);
|
||||
|
||||
UPDATE alembic_version SET version_num='65eb22eb195' WHERE alembic_version.version_num = '8d478ab86e29';
|
||||
|
||||
-- Running upgrade 65eb22eb195 -> 81b01a191a46
|
||||
|
||||
ALTER TABLE ps_contacts ADD COLUMN reg_server VARCHAR(20);
|
||||
|
||||
ALTER TABLE ps_contacts ADD CONSTRAINT ps_contacts_uq UNIQUE (id, reg_server);
|
||||
|
||||
UPDATE alembic_version SET version_num='81b01a191a46' WHERE alembic_version.version_num = '65eb22eb195';
|
||||
|
||||
-- Running upgrade 81b01a191a46 -> 6be31516058d
|
||||
|
||||
ALTER TABLE ps_contacts ADD COLUMN authenticate_qualify ENUM('yes','no');
|
||||
|
||||
UPDATE alembic_version SET version_num='6be31516058d' WHERE alembic_version.version_num = '81b01a191a46';
|
||||
|
||||
-- Running upgrade 6be31516058d -> d7e3c73eb2bf
|
||||
|
||||
ALTER TABLE ps_endpoints ADD COLUMN deny VARCHAR(95);
|
||||
|
||||
ALTER TABLE ps_endpoints ADD COLUMN permit VARCHAR(95);
|
||||
|
||||
ALTER TABLE ps_endpoints ADD COLUMN acl VARCHAR(40);
|
||||
|
||||
ALTER TABLE ps_endpoints ADD COLUMN contact_deny VARCHAR(95);
|
||||
|
||||
ALTER TABLE ps_endpoints ADD COLUMN contact_permit VARCHAR(95);
|
||||
|
||||
ALTER TABLE ps_endpoints ADD COLUMN contact_acl VARCHAR(40);
|
||||
|
||||
UPDATE alembic_version SET version_num='d7e3c73eb2bf' WHERE alembic_version.version_num = '6be31516058d';
|
||||
|
||||
-- Running upgrade d7e3c73eb2bf -> a845e4d8ade8
|
||||
|
||||
ALTER TABLE ps_contacts ADD COLUMN via_addr VARCHAR(40);
|
||||
|
||||
ALTER TABLE ps_contacts ADD COLUMN via_port INTEGER;
|
||||
|
||||
ALTER TABLE ps_contacts ADD COLUMN call_id VARCHAR(255);
|
||||
|
||||
UPDATE alembic_version SET version_num='a845e4d8ade8' WHERE alembic_version.version_num = 'd7e3c73eb2bf';
|
||||
|
||||
-- Running upgrade a845e4d8ade8 -> ef7efc2d3964
|
||||
|
||||
ALTER TABLE ps_contacts ADD COLUMN endpoint VARCHAR(40);
|
||||
|
||||
ALTER TABLE ps_contacts MODIFY expiration_time BIGINT NULL;
|
||||
|
||||
CREATE INDEX ps_contacts_qualifyfreq_exp ON ps_contacts (qualify_frequency, expiration_time);
|
||||
|
||||
CREATE INDEX ps_aors_qualifyfreq_contact ON ps_aors (qualify_frequency, contact);
|
||||
|
||||
UPDATE alembic_version SET version_num='ef7efc2d3964' WHERE alembic_version.version_num = 'a845e4d8ade8';
|
||||
|
||||
-- Running upgrade ef7efc2d3964 -> 9deac0ae4717
|
||||
|
||||
ALTER TABLE ps_endpoints ADD COLUMN subscribe_context VARCHAR(40);
|
||||
|
||||
UPDATE alembic_version SET version_num='9deac0ae4717' WHERE alembic_version.version_num = 'ef7efc2d3964';
|
||||
|
||||
-- Running upgrade 9deac0ae4717 -> 4a6c67fa9b7a
|
||||
|
||||
ALTER TABLE ps_endpoints ADD COLUMN fax_detect_timeout INTEGER;
|
||||
|
||||
UPDATE alembic_version SET version_num='4a6c67fa9b7a' WHERE alembic_version.version_num = '9deac0ae4717';
|
||||
|
||||
-- Running upgrade 4a6c67fa9b7a -> 3772f8f828da
|
||||
|
||||
ALTER TABLE ps_endpoints MODIFY identify_by ENUM('username','auth_username') NULL;
|
||||
|
||||
UPDATE alembic_version SET version_num='3772f8f828da' WHERE alembic_version.version_num = '4a6c67fa9b7a';
|
||||
|
34
contrib/realtime/mysql/mysql_voicemail.sql
Normal file
34
contrib/realtime/mysql/mysql_voicemail.sql
Normal file
@@ -0,0 +1,34 @@
|
||||
CREATE TABLE alembic_version (
|
||||
version_num VARCHAR(32) NOT NULL
|
||||
);
|
||||
|
||||
-- Running upgrade -> a2e9769475e
|
||||
|
||||
CREATE TABLE voicemail_messages (
|
||||
dir VARCHAR(255) NOT NULL,
|
||||
msgnum INTEGER NOT NULL,
|
||||
context VARCHAR(80),
|
||||
macrocontext VARCHAR(80),
|
||||
callerid VARCHAR(80),
|
||||
origtime INTEGER,
|
||||
duration INTEGER,
|
||||
recording BLOB,
|
||||
flag VARCHAR(30),
|
||||
category VARCHAR(30),
|
||||
mailboxuser VARCHAR(30),
|
||||
mailboxcontext VARCHAR(30),
|
||||
msg_id VARCHAR(40)
|
||||
);
|
||||
|
||||
ALTER TABLE voicemail_messages ADD CONSTRAINT voicemail_messages_dir_msgnum PRIMARY KEY (dir, msgnum);
|
||||
|
||||
CREATE INDEX voicemail_messages_dir ON voicemail_messages (dir);
|
||||
|
||||
INSERT INTO alembic_version (version_num) VALUES ('a2e9769475e');
|
||||
|
||||
-- Running upgrade a2e9769475e -> 39428242f7f5
|
||||
|
||||
ALTER TABLE voicemail_messages MODIFY recording BLOB(4294967295) NULL;
|
||||
|
||||
UPDATE alembic_version SET version_num='39428242f7f5' WHERE alembic_version.version_num = 'a2e9769475e';
|
||||
|
52
contrib/realtime/oracle/oracle_cdr.sql
Normal file
52
contrib/realtime/oracle/oracle_cdr.sql
Normal file
@@ -0,0 +1,52 @@
|
||||
CREATE TABLE alembic_version (
|
||||
version_num VARCHAR2(32 CHAR) NOT NULL
|
||||
)
|
||||
|
||||
/
|
||||
|
||||
-- Running upgrade -> 210693f3123d
|
||||
|
||||
CREATE TABLE cdr (
|
||||
accountcode VARCHAR2(20 CHAR),
|
||||
src VARCHAR2(80 CHAR),
|
||||
dst VARCHAR2(80 CHAR),
|
||||
dcontext VARCHAR2(80 CHAR),
|
||||
clid VARCHAR2(80 CHAR),
|
||||
channel VARCHAR2(80 CHAR),
|
||||
dstchannel VARCHAR2(80 CHAR),
|
||||
lastapp VARCHAR2(80 CHAR),
|
||||
lastdata VARCHAR2(80 CHAR),
|
||||
"start" DATE,
|
||||
answer DATE,
|
||||
end DATE,
|
||||
duration INTEGER,
|
||||
billsec INTEGER,
|
||||
disposition VARCHAR2(45 CHAR),
|
||||
amaflags VARCHAR2(45 CHAR),
|
||||
userfield VARCHAR2(256 CHAR),
|
||||
uniqueid VARCHAR2(150 CHAR),
|
||||
linkedid VARCHAR2(150 CHAR),
|
||||
peeraccount VARCHAR2(20 CHAR),
|
||||
sequence INTEGER
|
||||
)
|
||||
|
||||
/
|
||||
|
||||
INSERT INTO alembic_version (version_num) VALUES ('210693f3123d')
|
||||
|
||||
/
|
||||
|
||||
-- Running upgrade 210693f3123d -> 54cde9847798
|
||||
|
||||
ALTER TABLE cdr MODIFY accountcode VARCHAR2(80 CHAR)
|
||||
|
||||
/
|
||||
|
||||
ALTER TABLE cdr MODIFY peeraccount VARCHAR2(80 CHAR)
|
||||
|
||||
/
|
||||
|
||||
UPDATE alembic_version SET version_num='54cde9847798' WHERE alembic_version.version_num = '210693f3123d'
|
||||
|
||||
/
|
||||
|
1523
contrib/realtime/oracle/oracle_config.sql
Normal file
1523
contrib/realtime/oracle/oracle_config.sql
Normal file
File diff suppressed because it is too large
Load Diff
48
contrib/realtime/oracle/oracle_voicemail.sql
Normal file
48
contrib/realtime/oracle/oracle_voicemail.sql
Normal file
@@ -0,0 +1,48 @@
|
||||
CREATE TABLE alembic_version (
|
||||
version_num VARCHAR2(32 CHAR) NOT NULL
|
||||
)
|
||||
|
||||
/
|
||||
|
||||
-- Running upgrade -> a2e9769475e
|
||||
|
||||
CREATE TABLE voicemail_messages (
|
||||
dir VARCHAR2(255 CHAR) NOT NULL,
|
||||
msgnum INTEGER NOT NULL,
|
||||
context VARCHAR2(80 CHAR),
|
||||
macrocontext VARCHAR2(80 CHAR),
|
||||
callerid VARCHAR2(80 CHAR),
|
||||
origtime INTEGER,
|
||||
duration INTEGER,
|
||||
recording BLOB,
|
||||
flag VARCHAR2(30 CHAR),
|
||||
category VARCHAR2(30 CHAR),
|
||||
mailboxuser VARCHAR2(30 CHAR),
|
||||
mailboxcontext VARCHAR2(30 CHAR),
|
||||
msg_id VARCHAR2(40 CHAR)
|
||||
)
|
||||
|
||||
/
|
||||
|
||||
ALTER TABLE voicemail_messages ADD CONSTRAINT voicemail_messages_dir_msgnum PRIMARY KEY (dir, msgnum)
|
||||
|
||||
/
|
||||
|
||||
CREATE INDEX voicemail_messages_dir ON voicemail_messages (dir)
|
||||
|
||||
/
|
||||
|
||||
INSERT INTO alembic_version (version_num) VALUES ('a2e9769475e')
|
||||
|
||||
/
|
||||
|
||||
-- Running upgrade a2e9769475e -> 39428242f7f5
|
||||
|
||||
ALTER TABLE voicemail_messages MODIFY recording BLOB
|
||||
|
||||
/
|
||||
|
||||
UPDATE alembic_version SET version_num='39428242f7f5' WHERE alembic_version.version_num = 'a2e9769475e'
|
||||
|
||||
/
|
||||
|
44
contrib/realtime/postgresql/postgresql_cdr.sql
Normal file
44
contrib/realtime/postgresql/postgresql_cdr.sql
Normal file
@@ -0,0 +1,44 @@
|
||||
BEGIN;
|
||||
|
||||
CREATE TABLE alembic_version (
|
||||
version_num VARCHAR(32) NOT NULL
|
||||
);
|
||||
|
||||
-- Running upgrade -> 210693f3123d
|
||||
|
||||
CREATE TABLE cdr (
|
||||
accountcode VARCHAR(20),
|
||||
src VARCHAR(80),
|
||||
dst VARCHAR(80),
|
||||
dcontext VARCHAR(80),
|
||||
clid VARCHAR(80),
|
||||
channel VARCHAR(80),
|
||||
dstchannel VARCHAR(80),
|
||||
lastapp VARCHAR(80),
|
||||
lastdata VARCHAR(80),
|
||||
start TIMESTAMP WITHOUT TIME ZONE,
|
||||
answer TIMESTAMP WITHOUT TIME ZONE,
|
||||
"end" TIMESTAMP WITHOUT TIME ZONE,
|
||||
duration INTEGER,
|
||||
billsec INTEGER,
|
||||
disposition VARCHAR(45),
|
||||
amaflags VARCHAR(45),
|
||||
userfield VARCHAR(256),
|
||||
uniqueid VARCHAR(150),
|
||||
linkedid VARCHAR(150),
|
||||
peeraccount VARCHAR(20),
|
||||
sequence INTEGER
|
||||
);
|
||||
|
||||
INSERT INTO alembic_version (version_num) VALUES ('210693f3123d');
|
||||
|
||||
-- Running upgrade 210693f3123d -> 54cde9847798
|
||||
|
||||
ALTER TABLE cdr ALTER COLUMN accountcode TYPE VARCHAR(80);
|
||||
|
||||
ALTER TABLE cdr ALTER COLUMN peeraccount TYPE VARCHAR(80);
|
||||
|
||||
UPDATE alembic_version SET version_num='54cde9847798' WHERE alembic_version.version_num = '210693f3123d';
|
||||
|
||||
COMMIT;
|
||||
|
1024
contrib/realtime/postgresql/postgresql_config.sql
Normal file
1024
contrib/realtime/postgresql/postgresql_config.sql
Normal file
File diff suppressed because it is too large
Load Diff
38
contrib/realtime/postgresql/postgresql_voicemail.sql
Normal file
38
contrib/realtime/postgresql/postgresql_voicemail.sql
Normal file
@@ -0,0 +1,38 @@
|
||||
BEGIN;
|
||||
|
||||
CREATE TABLE alembic_version (
|
||||
version_num VARCHAR(32) NOT NULL
|
||||
);
|
||||
|
||||
-- Running upgrade -> a2e9769475e
|
||||
|
||||
CREATE TABLE voicemail_messages (
|
||||
dir VARCHAR(255) NOT NULL,
|
||||
msgnum INTEGER NOT NULL,
|
||||
context VARCHAR(80),
|
||||
macrocontext VARCHAR(80),
|
||||
callerid VARCHAR(80),
|
||||
origtime INTEGER,
|
||||
duration INTEGER,
|
||||
recording BYTEA,
|
||||
flag VARCHAR(30),
|
||||
category VARCHAR(30),
|
||||
mailboxuser VARCHAR(30),
|
||||
mailboxcontext VARCHAR(30),
|
||||
msg_id VARCHAR(40)
|
||||
);
|
||||
|
||||
ALTER TABLE voicemail_messages ADD CONSTRAINT voicemail_messages_dir_msgnum PRIMARY KEY (dir, msgnum);
|
||||
|
||||
CREATE INDEX voicemail_messages_dir ON voicemail_messages (dir);
|
||||
|
||||
INSERT INTO alembic_version (version_num) VALUES ('a2e9769475e');
|
||||
|
||||
-- Running upgrade a2e9769475e -> 39428242f7f5
|
||||
|
||||
ALTER TABLE voicemail_messages ALTER COLUMN recording TYPE BYTEA;
|
||||
|
||||
UPDATE alembic_version SET version_num='39428242f7f5' WHERE alembic_version.version_num = 'a2e9769475e';
|
||||
|
||||
COMMIT;
|
||||
|
@@ -1108,6 +1108,9 @@
|
||||
/* Define to 1 if you have the unbound library. */
|
||||
#undef HAVE_UNBOUND
|
||||
|
||||
/* Define if your system has UNBOUND_VERSION_MAJOR declared. */
|
||||
#undef HAVE_UNBOUND_CONST_PARAMS
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
|
@@ -63,6 +63,100 @@ struct ast_sdp_srtp *ast_sdp_srtp_alloc(void);
|
||||
*/
|
||||
void ast_sdp_srtp_destroy(struct ast_sdp_srtp *srtp);
|
||||
|
||||
/*! \brief Destroy a previously allocated ast_sdp_crypto struct */
|
||||
typedef void (*sdp_crypto_destroy_cb)(struct ast_sdp_crypto *crypto);
|
||||
|
||||
/*!
|
||||
* \brief Initialize and return an ast_sdp_crypto struct
|
||||
*
|
||||
* \details
|
||||
* This function allocates a new ast_sdp_crypto struct and initializes its values
|
||||
*
|
||||
* \retval NULL on failure
|
||||
* \retval a pointer to a new ast_sdp_crypto structure
|
||||
*/
|
||||
typedef struct ast_sdp_crypto *(*sdp_crypto_alloc_cb)(void);
|
||||
|
||||
/*!
|
||||
* \brief Generate an SRTP a=crypto offer
|
||||
*
|
||||
* \details
|
||||
* The offer is stored on the ast_sdp_crypto struct in a_crypto
|
||||
*
|
||||
* \param crypto A valid ast_sdp_crypto struct
|
||||
* \param taglen Length
|
||||
*
|
||||
* \retval 0 success
|
||||
* \retval nonzero failure
|
||||
*/
|
||||
typedef int (*sdp_crypto_build_offer_cb)(struct ast_sdp_crypto *crypto, int taglen);
|
||||
|
||||
/*!
|
||||
* \brief Parse the a=crypto line from SDP and set appropriate values on the
|
||||
* ast_sdp_crypto struct.
|
||||
*
|
||||
* The attribute line should already have "a=crypto:" removed.
|
||||
*
|
||||
* \param p A valid ast_sdp_crypto struct
|
||||
* \param attr the a:crypto line from SDP
|
||||
* \param rtp The rtp instance associated with the SDP being parsed
|
||||
* \param srtp SRTP structure
|
||||
*
|
||||
* \retval 0 success
|
||||
* \retval nonzero failure
|
||||
*/
|
||||
typedef int (*sdp_crypto_parse_offer_cb)(struct ast_rtp_instance *rtp, struct ast_sdp_srtp *srtp, const char *attr);
|
||||
|
||||
/*!
|
||||
* \brief Get the crypto attribute line for the srtp structure
|
||||
*
|
||||
* \details
|
||||
* The attribute line does not contain the initial "a=crypto:" and does
|
||||
* not terminate with "\r\n".
|
||||
*
|
||||
* \param srtp The ast_sdp_srtp structure for which to get an attribute line
|
||||
* \param dtls_enabled Whether this connection is encrypted with datagram TLS
|
||||
* \param default_taglen_32 Whether to default to a tag length of 32 instead of 80
|
||||
*
|
||||
* \retval An attribute line containing cryptographic information
|
||||
* \retval NULL if the srtp structure does not require an attribute line containing crypto information
|
||||
*/
|
||||
typedef const char *(*sdp_srtp_get_attr_cb)(struct ast_sdp_srtp *srtp, int dtls_enabled, int default_taglen_32);
|
||||
|
||||
struct ast_sdp_crypto_api {
|
||||
/*! Destroy a crypto struct */
|
||||
sdp_crypto_destroy_cb dtor;
|
||||
/*! Allocate a crypto struct */
|
||||
sdp_crypto_alloc_cb alloc;
|
||||
/*! Build a SDP a=crypto offer line parameter string */
|
||||
sdp_crypto_build_offer_cb build_offer;
|
||||
/*! Parse a SDP a=crypto offer line parameter string */
|
||||
sdp_crypto_parse_offer_cb parse_offer;
|
||||
/*! Get the SDP a=crypto offer line parameter string */
|
||||
sdp_srtp_get_attr_cb get_attr;
|
||||
};
|
||||
|
||||
/*!
|
||||
* \brief Register SDP SRTP crypto processing routines.
|
||||
* \since 14.0.0
|
||||
*
|
||||
* \param api Callbacks to register.
|
||||
*
|
||||
* \retval 0 on success.
|
||||
* \retval -1 on error.
|
||||
*/
|
||||
int ast_sdp_crypto_register(struct ast_sdp_crypto_api *api);
|
||||
|
||||
/*!
|
||||
* \brief Unregister SDP SRTP crypto processing routines.
|
||||
* \since 14.0.0
|
||||
*
|
||||
* \param api Callbacks to unregister.
|
||||
*
|
||||
* \return Nothing
|
||||
*/
|
||||
void ast_sdp_crypto_unregister(struct ast_sdp_crypto_api *api);
|
||||
|
||||
/*! \brief Initialize an return an ast_sdp_crypto struct
|
||||
*
|
||||
* \details
|
||||
@@ -104,7 +198,6 @@ int ast_sdp_crypto_process(struct ast_rtp_instance *rtp, struct ast_sdp_srtp *sr
|
||||
*/
|
||||
int ast_sdp_crypto_build_offer(struct ast_sdp_crypto *p, int taglen);
|
||||
|
||||
|
||||
/*! \brief Get the crypto attribute line for the srtp structure
|
||||
*
|
||||
* The attribute line does not contain the initial "a=crypto:" and does
|
||||
|
@@ -983,6 +983,7 @@ int ast_rtp_codecs_payloads_set_rtpmap_type_rate(struct ast_rtp_codecs *codecs,
|
||||
} else {
|
||||
new_type->format = t->payload_type.format;
|
||||
}
|
||||
|
||||
if (new_type->format) {
|
||||
/* SDP parsing automatically increases the reference count */
|
||||
new_type->format = ast_format_parse_sdp_fmtp(new_type->format, "");
|
||||
@@ -2257,7 +2258,11 @@ static void add_static_payload(int map, struct ast_format *format, int rtp_code)
|
||||
int x;
|
||||
struct ast_rtp_payload_type *type;
|
||||
|
||||
ast_assert(map < ARRAY_LEN(static_RTP_PT));
|
||||
/*
|
||||
* ARRAY_LEN's result is cast to an int so 'map' is not autocast to a size_t,
|
||||
* which if negative would cause an assertion.
|
||||
*/
|
||||
ast_assert(map < (int)ARRAY_LEN(static_RTP_PT));
|
||||
|
||||
ast_rwlock_wrlock(&static_RTP_PT_lock);
|
||||
if (map < 0) {
|
||||
@@ -2268,6 +2273,7 @@ static void add_static_payload(int map, struct ast_format *format, int rtp_code)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (map < 0) {
|
||||
if (format) {
|
||||
ast_log(LOG_WARNING, "No Dynamic RTP mapping available for format %s\n",
|
||||
@@ -2300,14 +2306,10 @@ static void add_static_payload(int map, struct ast_format *format, int rtp_code)
|
||||
|
||||
int ast_rtp_engine_load_format(struct ast_format *format)
|
||||
{
|
||||
char *codec_name = ast_strdupa(ast_format_get_name(format));
|
||||
|
||||
codec_name = ast_str_to_upper(codec_name);
|
||||
|
||||
set_next_mime_type(format,
|
||||
0,
|
||||
ast_codec_media_type2str(ast_format_get_type(format)),
|
||||
codec_name,
|
||||
ast_format_get_codec_name(format),
|
||||
ast_format_get_sample_rate(format));
|
||||
add_static_payload(-1, format, 0);
|
||||
|
||||
@@ -2690,11 +2692,6 @@ int ast_rtp_engine_init(void)
|
||||
/* Opus and VP8 */
|
||||
set_next_mime_type(ast_format_opus, 0, "audio", "opus", 48000);
|
||||
set_next_mime_type(ast_format_vp8, 0, "video", "VP8", 90000);
|
||||
/* DA SILK */
|
||||
set_next_mime_type(ast_format_silk8, 0, "audio", "silk", 8000);
|
||||
set_next_mime_type(ast_format_silk12, 0, "audio", "silk", 12000);
|
||||
set_next_mime_type(ast_format_silk16, 0, "audio", "silk", 16000);
|
||||
set_next_mime_type(ast_format_silk24, 0, "audio", "silk", 24000);
|
||||
|
||||
/* Define the static rtp payload mappings */
|
||||
add_static_payload(0, ast_format_ulaw, 0);
|
||||
@@ -2748,11 +2745,6 @@ int ast_rtp_engine_init(void)
|
||||
add_static_payload(100, ast_format_vp8, 0);
|
||||
add_static_payload(107, ast_format_opus, 0);
|
||||
|
||||
add_static_payload(108, ast_format_silk8, 0);
|
||||
add_static_payload(109, ast_format_silk12, 0);
|
||||
add_static_payload(113, ast_format_silk16, 0);
|
||||
add_static_payload(114, ast_format_silk24, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
606
main/sdp_srtp.c
606
main/sdp_srtp.c
@@ -33,18 +33,12 @@
|
||||
|
||||
ASTERISK_REGISTER_FILE()
|
||||
|
||||
#include <math.h> /* for pow */
|
||||
#include <srtp/srtp.h> /* for SRTP_MAX_KEY_LEN, etc */
|
||||
|
||||
#include "asterisk/linkedlists.h" /* for AST_LIST_NEXT, etc */
|
||||
#include "asterisk/logger.h" /* for ast_log, LOG_ERROR, etc */
|
||||
#include "asterisk/rtp_engine.h" /* for ast_rtp_engine_dtls, etc */
|
||||
#include "asterisk/sdp_srtp.h" /* for ast_sdp_srtp, etc */
|
||||
#include "asterisk/strings.h" /* for ast_strlen_zero */
|
||||
#include "asterisk/utils.h" /* for ast_set_flag, ast_test_flag, etc */
|
||||
|
||||
extern struct ast_srtp_res *res_srtp;
|
||||
extern struct ast_srtp_policy_res *res_srtp_policy;
|
||||
/*! Registered SDP crypto API */
|
||||
static struct ast_sdp_crypto_api *sdp_crypto_api;
|
||||
|
||||
struct ast_sdp_srtp *ast_sdp_srtp_alloc(void)
|
||||
{
|
||||
@@ -63,603 +57,49 @@ void ast_sdp_srtp_destroy(struct ast_sdp_srtp *srtp)
|
||||
for (next = AST_LIST_NEXT(srtp, sdp_srtp_list);
|
||||
srtp;
|
||||
srtp = next, next = srtp ? AST_LIST_NEXT(srtp, sdp_srtp_list) : NULL) {
|
||||
if (srtp->crypto) {
|
||||
ast_sdp_crypto_destroy(srtp->crypto);
|
||||
}
|
||||
ast_sdp_crypto_destroy(srtp->crypto);
|
||||
srtp->crypto = NULL;
|
||||
ast_free(srtp);
|
||||
}
|
||||
}
|
||||
|
||||
struct ast_sdp_crypto {
|
||||
char *a_crypto;
|
||||
unsigned char local_key[SRTP_MAX_KEY_LEN];
|
||||
int tag;
|
||||
char local_key64[((SRTP_MAX_KEY_LEN) * 8 + 5) / 6 + 1];
|
||||
unsigned char remote_key[SRTP_MAX_KEY_LEN];
|
||||
int key_len;
|
||||
};
|
||||
|
||||
static struct ast_sdp_crypto *sdp_crypto_alloc(const int key_len);
|
||||
static struct ast_sdp_crypto *crypto_init_keys(struct ast_sdp_crypto *p, const int key_len);
|
||||
static int set_crypto_policy(struct ast_srtp_policy *policy, int suite_val, const unsigned char *master_key, int key_len, unsigned long ssrc, int inbound);
|
||||
|
||||
void ast_sdp_crypto_destroy(struct ast_sdp_crypto *crypto)
|
||||
{
|
||||
ast_free(crypto->a_crypto);
|
||||
crypto->a_crypto = NULL;
|
||||
ast_free(crypto);
|
||||
}
|
||||
|
||||
static struct ast_sdp_crypto *crypto_init_keys(struct ast_sdp_crypto *p, const int key_len)
|
||||
{
|
||||
unsigned char remote_key[key_len];
|
||||
|
||||
if (res_srtp->get_random(p->local_key, key_len) < 0) {
|
||||
return NULL;
|
||||
if (sdp_crypto_api) {
|
||||
sdp_crypto_api->dtor(crypto);
|
||||
}
|
||||
|
||||
ast_base64encode(p->local_key64, p->local_key, key_len, sizeof(p->local_key64));
|
||||
|
||||
p->key_len = ast_base64decode(remote_key, p->local_key64, sizeof(remote_key));
|
||||
|
||||
if (p->key_len != key_len) {
|
||||
ast_log(LOG_ERROR, "base64 encode/decode bad len %d != %d\n", p->key_len, key_len);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (memcmp(remote_key, p->local_key, p->key_len)) {
|
||||
ast_log(LOG_ERROR, "base64 encode/decode bad key\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ast_debug(1 , "local_key64 %s len %zu\n", p->local_key64, strlen(p->local_key64));
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
static struct ast_sdp_crypto *sdp_crypto_alloc(const int key_len)
|
||||
{
|
||||
struct ast_sdp_crypto *p, *result;
|
||||
|
||||
if (!ast_rtp_engine_srtp_is_registered()) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!(p = ast_calloc(1, sizeof(*p)))) {
|
||||
return NULL;
|
||||
}
|
||||
p->tag = 1;
|
||||
|
||||
/* default is a key which uses AST_AES_CM_128_HMAC_SHA1_xx */
|
||||
result = crypto_init_keys(p, key_len);
|
||||
if (!result) {
|
||||
ast_sdp_crypto_destroy(p);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
struct ast_sdp_crypto *ast_sdp_crypto_alloc(void)
|
||||
{
|
||||
return sdp_crypto_alloc(SRTP_MASTER_KEY_LEN);
|
||||
}
|
||||
|
||||
static int set_crypto_policy(struct ast_srtp_policy *policy, int suite_val, const unsigned char *master_key, int key_len, unsigned long ssrc, int inbound)
|
||||
{
|
||||
if (!ast_rtp_engine_srtp_is_registered()) {
|
||||
return -1;
|
||||
if (!sdp_crypto_api) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (res_srtp_policy->set_master_key(policy, master_key, key_len, NULL, 0) < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (res_srtp_policy->set_suite(policy, suite_val)) {
|
||||
ast_log(LOG_WARNING, "Could not set remote SRTP suite\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
res_srtp_policy->set_ssrc(policy, ssrc, inbound);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int crypto_activate(struct ast_sdp_crypto *p, int suite_val, unsigned char *remote_key, int key_len, struct ast_rtp_instance *rtp)
|
||||
{
|
||||
struct ast_srtp_policy *local_policy = NULL;
|
||||
struct ast_srtp_policy *remote_policy = NULL;
|
||||
struct ast_rtp_instance_stats stats = {0,};
|
||||
int res = -1;
|
||||
|
||||
if (!ast_rtp_engine_srtp_is_registered()) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!p) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!(local_policy = res_srtp_policy->alloc())) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!(remote_policy = res_srtp_policy->alloc())) {
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (ast_rtp_instance_get_stats(rtp, &stats, AST_RTP_INSTANCE_STAT_LOCAL_SSRC)) {
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (set_crypto_policy(local_policy, suite_val, p->local_key, key_len, stats.local_ssrc, 0) < 0) {
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (set_crypto_policy(remote_policy, suite_val, remote_key, key_len, 0, 1) < 0) {
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* Add the SRTP policies */
|
||||
if (ast_rtp_instance_add_srtp_policy(rtp, remote_policy, local_policy, 0)) {
|
||||
ast_log(LOG_WARNING, "Could not set SRTP policies\n");
|
||||
goto err;
|
||||
}
|
||||
|
||||
ast_debug(1 , "SRTP policy activated\n");
|
||||
res = 0;
|
||||
|
||||
err:
|
||||
if (local_policy) {
|
||||
res_srtp_policy->destroy(local_policy);
|
||||
}
|
||||
|
||||
if (remote_policy) {
|
||||
res_srtp_policy->destroy(remote_policy);
|
||||
}
|
||||
|
||||
return res;
|
||||
return sdp_crypto_api->alloc();
|
||||
}
|
||||
|
||||
int ast_sdp_crypto_process(struct ast_rtp_instance *rtp, struct ast_sdp_srtp *srtp, const char *attr)
|
||||
{
|
||||
char *str = NULL;
|
||||
char *tag = NULL;
|
||||
char *suite = NULL;
|
||||
char *key_params = NULL;
|
||||
char *key_param = NULL;
|
||||
char *session_params = NULL;
|
||||
char *key_salt = NULL; /* The actual master key and key salt */
|
||||
char *lifetime = NULL; /* Key lifetime (# of RTP packets) */
|
||||
char *mki = NULL; /* Master Key Index */
|
||||
int found = 0;
|
||||
int key_len_from_sdp;
|
||||
int key_len_expected;
|
||||
int tag_from_sdp;
|
||||
int suite_val = 0;
|
||||
unsigned char remote_key[SRTP_MAX_KEY_LEN];
|
||||
int taglen;
|
||||
double sdes_lifetime;
|
||||
struct ast_sdp_crypto *crypto;
|
||||
struct ast_sdp_srtp *tmp;
|
||||
|
||||
if (!ast_rtp_engine_srtp_is_registered()) {
|
||||
if (!sdp_crypto_api) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
str = ast_strdupa(attr);
|
||||
|
||||
tag = strsep(&str, " ");
|
||||
suite = strsep(&str, " ");
|
||||
key_params = strsep(&str, " ");
|
||||
session_params = strsep(&str, " ");
|
||||
|
||||
if (!tag || !suite) {
|
||||
ast_log(LOG_WARNING, "Unrecognized crypto attribute a=%s\n", attr);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* RFC4568 9.1 - tag is 1-9 digits, greater than zero */
|
||||
if (sscanf(tag, "%30d", &tag_from_sdp) != 1 || tag_from_sdp <= 0 || tag_from_sdp > 999999999) {
|
||||
ast_log(LOG_WARNING, "Unacceptable a=crypto tag: %s\n", tag);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!ast_strlen_zero(session_params)) {
|
||||
ast_log(LOG_WARNING, "Unsupported crypto parameters: %s\n", session_params);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* On egress, Asterisk sent several crypto lines in the SIP/SDP offer
|
||||
The remote party might have choosen another line than the first */
|
||||
for (tmp = srtp; tmp && tmp->crypto && tmp->crypto->tag != tag_from_sdp;) {
|
||||
tmp = AST_LIST_NEXT(tmp, sdp_srtp_list);
|
||||
}
|
||||
if (tmp) { /* tag matched an already created crypto line */
|
||||
unsigned int flags = tmp->flags;
|
||||
|
||||
/* Make that crypto line the head of the list, not by changing the
|
||||
list structure but by exchanging the content of the list members */
|
||||
crypto = tmp->crypto;
|
||||
tmp->crypto = srtp->crypto;
|
||||
tmp->flags = srtp->flags;
|
||||
srtp->crypto = crypto;
|
||||
srtp->flags = flags;
|
||||
} else {
|
||||
crypto = srtp->crypto;
|
||||
crypto->tag = tag_from_sdp;
|
||||
}
|
||||
|
||||
if (!strcmp(suite, "AES_CM_128_HMAC_SHA1_80")) {
|
||||
suite_val = AST_AES_CM_128_HMAC_SHA1_80;
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_TAG_80);
|
||||
key_len_expected = 30;
|
||||
} else if (!strcmp(suite, "AES_CM_128_HMAC_SHA1_32")) {
|
||||
suite_val = AST_AES_CM_128_HMAC_SHA1_32;
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_TAG_32);
|
||||
key_len_expected = 30;
|
||||
#ifdef HAVE_SRTP_192
|
||||
} else if (!strcmp(suite, "AES_192_CM_HMAC_SHA1_80")) {
|
||||
suite_val = AST_AES_CM_192_HMAC_SHA1_80;
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_TAG_80);
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_AES_192);
|
||||
key_len_expected = 38;
|
||||
} else if (!strcmp(suite, "AES_192_CM_HMAC_SHA1_32")) {
|
||||
suite_val = AST_AES_CM_192_HMAC_SHA1_32;
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_TAG_32);
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_AES_192);
|
||||
key_len_expected = 38;
|
||||
/* RFC used a different name while in draft, some still use that */
|
||||
} else if (!strcmp(suite, "AES_CM_192_HMAC_SHA1_80")) {
|
||||
suite_val = AST_AES_CM_192_HMAC_SHA1_80;
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_TAG_80);
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_AES_192);
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_OLD_NAME);
|
||||
key_len_expected = 38;
|
||||
} else if (!strcmp(suite, "AES_CM_192_HMAC_SHA1_32")) {
|
||||
suite_val = AST_AES_CM_192_HMAC_SHA1_32;
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_TAG_32);
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_AES_192);
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_OLD_NAME);
|
||||
key_len_expected = 38;
|
||||
#endif
|
||||
#ifdef HAVE_SRTP_256
|
||||
} else if (!strcmp(suite, "AES_256_CM_HMAC_SHA1_80")) {
|
||||
suite_val = AST_AES_CM_256_HMAC_SHA1_80;
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_TAG_80);
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_AES_256);
|
||||
key_len_expected = 46;
|
||||
} else if (!strcmp(suite, "AES_256_CM_HMAC_SHA1_32")) {
|
||||
suite_val = AST_AES_CM_256_HMAC_SHA1_32;
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_TAG_32);
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_AES_256);
|
||||
key_len_expected = 46;
|
||||
/* RFC used a different name while in draft, some still use that */
|
||||
} else if (!strcmp(suite, "AES_CM_256_HMAC_SHA1_80")) {
|
||||
suite_val = AST_AES_CM_256_HMAC_SHA1_80;
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_TAG_80);
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_AES_256);
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_OLD_NAME);
|
||||
key_len_expected = 46;
|
||||
} else if (!strcmp(suite, "AES_CM_256_HMAC_SHA1_32")) {
|
||||
suite_val = AST_AES_CM_256_HMAC_SHA1_32;
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_TAG_32);
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_AES_256);
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_OLD_NAME);
|
||||
key_len_expected = 46;
|
||||
#endif
|
||||
#ifdef HAVE_SRTP_GCM
|
||||
} else if (!strcmp(suite, "AEAD_AES_128_GCM")) {
|
||||
suite_val = AST_AES_GCM_128;
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_TAG_16);
|
||||
key_len_expected = AES_128_GCM_KEYSIZE_WSALT;
|
||||
} else if (!strcmp(suite, "AEAD_AES_256_GCM")) {
|
||||
suite_val = AST_AES_GCM_256;
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_TAG_16);
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_AES_256);
|
||||
key_len_expected = AES_256_GCM_KEYSIZE_WSALT;
|
||||
/* RFC contained a (too) short auth tag for RTP media, some still use that */
|
||||
} else if (!strcmp(suite, "AEAD_AES_128_GCM_8")) {
|
||||
suite_val = AST_AES_GCM_128_8;
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_TAG_8);
|
||||
key_len_expected = AES_128_GCM_KEYSIZE_WSALT;
|
||||
} else if (!strcmp(suite, "AEAD_AES_256_GCM_8")) {
|
||||
suite_val = AST_AES_GCM_256_8;
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_TAG_8);
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_AES_256);
|
||||
key_len_expected = AES_256_GCM_KEYSIZE_WSALT;
|
||||
#endif
|
||||
} else {
|
||||
ast_verb(1, "Unsupported crypto suite: %s\n", suite);
|
||||
return -1;
|
||||
}
|
||||
|
||||
while ((key_param = strsep(&key_params, ";"))) {
|
||||
unsigned int n_lifetime;
|
||||
char *method = NULL;
|
||||
char *info = NULL;
|
||||
|
||||
method = strsep(&key_param, ":");
|
||||
info = strsep(&key_param, ";");
|
||||
sdes_lifetime = 0;
|
||||
|
||||
if (strcmp(method, "inline")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
key_salt = strsep(&info, "|");
|
||||
|
||||
/* The next parameter can be either lifetime or MKI */
|
||||
lifetime = strsep(&info, "|");
|
||||
if (!lifetime) {
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
mki = strchr(lifetime, ':');
|
||||
if (mki) {
|
||||
mki = lifetime;
|
||||
lifetime = NULL;
|
||||
} else {
|
||||
mki = strsep(&info, "|");
|
||||
}
|
||||
|
||||
if (mki && *mki != '1') {
|
||||
ast_log(LOG_NOTICE, "Crypto MKI handling is not supported: ignoring attribute %s\n", attr);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (lifetime) {
|
||||
if (!strncmp(lifetime, "2^", 2)) {
|
||||
char *lifetime_val = lifetime + 2;
|
||||
|
||||
/* Exponential lifetime */
|
||||
if (sscanf(lifetime_val, "%30u", &n_lifetime) != 1) {
|
||||
ast_log(LOG_NOTICE, "Failed to parse lifetime value in crypto attribute: %s\n", attr);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (n_lifetime > 48) {
|
||||
/* Yeah... that's a bit big. */
|
||||
ast_log(LOG_NOTICE, "Crypto lifetime exponent of '%u' is a bit large; using 48\n", n_lifetime);
|
||||
n_lifetime = 48;
|
||||
}
|
||||
sdes_lifetime = pow(2, n_lifetime);
|
||||
} else {
|
||||
/* Decimal lifetime */
|
||||
if (sscanf(lifetime, "%30u", &n_lifetime) != 1) {
|
||||
ast_log(LOG_NOTICE, "Failed to parse lifetime value in crypto attribute: %s\n", attr);
|
||||
continue;
|
||||
}
|
||||
sdes_lifetime = n_lifetime;
|
||||
}
|
||||
|
||||
/* Accept anything above 10 hours. Less than 10; reject. */
|
||||
if (sdes_lifetime < 1800000) {
|
||||
ast_log(LOG_NOTICE, "Rejecting crypto attribute '%s': lifetime '%f' too short\n", attr, sdes_lifetime);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
ast_debug(2, "Crypto attribute '%s' accepted with lifetime '%f', MKI '%s'\n",
|
||||
attr, sdes_lifetime, mki ? mki : "-");
|
||||
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
ast_log(LOG_NOTICE, "SRTP crypto offer not acceptable: '%s'\n", attr);
|
||||
return -1;
|
||||
}
|
||||
|
||||
key_len_from_sdp = ast_base64decode(remote_key, key_salt, sizeof(remote_key));
|
||||
if (key_len_from_sdp != key_len_expected) {
|
||||
ast_log(LOG_WARNING, "SRTP descriptions key length is '%d', not '%d'\n",
|
||||
key_len_from_sdp, key_len_expected);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* on default, the key is 30 (AES-128); throw that away (only) when the suite changed actually */
|
||||
/* ingress: optional, but saves one expensive call to get_random(.) */
|
||||
/* egress: required, because the local key was communicated before the remote key is processed */
|
||||
if (crypto->key_len != key_len_from_sdp) {
|
||||
if (!crypto_init_keys(crypto, key_len_from_sdp)) {
|
||||
return -1;
|
||||
}
|
||||
} else if (!memcmp(crypto->remote_key, remote_key, key_len_from_sdp)) {
|
||||
ast_debug(1, "SRTP remote key unchanged; maintaining current policy\n");
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_OFFER_OK);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (key_len_from_sdp > sizeof(crypto->remote_key)) {
|
||||
ast_log(LOG_ERROR,
|
||||
"SRTP key buffer is %zu although it must be at least %d bytes\n",
|
||||
sizeof(crypto->remote_key), key_len_from_sdp);
|
||||
return -1;
|
||||
}
|
||||
memcpy(crypto->remote_key, remote_key, key_len_from_sdp);
|
||||
|
||||
if (crypto_activate(crypto, suite_val, remote_key, key_len_from_sdp, rtp) < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (ast_test_flag(srtp, AST_SRTP_CRYPTO_TAG_32)) {
|
||||
taglen = 32;
|
||||
} else if (ast_test_flag(srtp, AST_SRTP_CRYPTO_TAG_16)) {
|
||||
taglen = 16;
|
||||
} else if (ast_test_flag(srtp, AST_SRTP_CRYPTO_TAG_8)) {
|
||||
taglen = 8;
|
||||
} else {
|
||||
taglen = 80;
|
||||
}
|
||||
if (ast_test_flag(srtp, AST_SRTP_CRYPTO_AES_256)) {
|
||||
taglen |= 0x0200;
|
||||
} else if (ast_test_flag(srtp, AST_SRTP_CRYPTO_AES_192)) {
|
||||
taglen |= 0x0100;
|
||||
}
|
||||
if (ast_test_flag(srtp, AST_SRTP_CRYPTO_OLD_NAME)) {
|
||||
taglen |= 0x0080;
|
||||
}
|
||||
|
||||
/* Finally, rebuild the crypto line */
|
||||
if (ast_sdp_crypto_build_offer(crypto, taglen)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_OFFER_OK);
|
||||
return 0;
|
||||
return sdp_crypto_api->parse_offer(rtp, srtp, attr);
|
||||
}
|
||||
|
||||
int ast_sdp_crypto_build_offer(struct ast_sdp_crypto *p, int taglen)
|
||||
{
|
||||
/* Rebuild the crypto line */
|
||||
if (p->a_crypto) {
|
||||
ast_free(p->a_crypto);
|
||||
if (!sdp_crypto_api) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((taglen & 0x007f) == 8) {
|
||||
if (ast_asprintf(&p->a_crypto, "%d AEAD_AES_%d_GCM_%d inline:%s",
|
||||
p->tag, 128 + ((taglen & 0x0300) >> 2), taglen & 0x007f, p->local_key64) == -1) {
|
||||
ast_log(LOG_ERROR, "Could not allocate memory for crypto line\n");
|
||||
return -1;
|
||||
}
|
||||
} else if ((taglen & 0x007f) == 16) {
|
||||
if (ast_asprintf(&p->a_crypto, "%d AEAD_AES_%d_GCM inline:%s",
|
||||
p->tag, 128 + ((taglen & 0x0300) >> 2), p->local_key64) == -1) {
|
||||
ast_log(LOG_ERROR, "Could not allocate memory for crypto line\n");
|
||||
return -1;
|
||||
}
|
||||
} else if ((taglen & 0x0300) && !(taglen & 0x0080)) {
|
||||
if (ast_asprintf(&p->a_crypto, "%d AES_%d_CM_HMAC_SHA1_%d inline:%s",
|
||||
p->tag, 128 + ((taglen & 0x0300) >> 2), taglen & 0x007f, p->local_key64) == -1) {
|
||||
ast_log(LOG_ERROR, "Could not allocate memory for crypto line\n");
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
if (ast_asprintf(&p->a_crypto, "%d AES_CM_%d_HMAC_SHA1_%d inline:%s",
|
||||
p->tag, 128 + ((taglen & 0x0300) >> 2), taglen & 0x007f, p->local_key64) == -1) {
|
||||
ast_log(LOG_ERROR, "Could not allocate memory for crypto line\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
ast_debug(1, "Crypto line: a=crypto:%s\n", p->a_crypto);
|
||||
|
||||
return 0;
|
||||
return sdp_crypto_api->build_offer(p, taglen);
|
||||
}
|
||||
|
||||
const char *ast_sdp_srtp_get_attrib(struct ast_sdp_srtp *srtp, int dtls_enabled, int default_taglen_32)
|
||||
{
|
||||
int taglen;
|
||||
|
||||
if (!srtp) {
|
||||
if (!sdp_crypto_api) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Set encryption properties */
|
||||
if (!srtp->crypto) {
|
||||
|
||||
if (AST_LIST_NEXT(srtp, sdp_srtp_list)) {
|
||||
srtp->crypto = ast_sdp_crypto_alloc();
|
||||
ast_log(LOG_ERROR, "SRTP SDP list was not empty\n");
|
||||
} else {
|
||||
const int len = default_taglen_32 ? AST_SRTP_CRYPTO_TAG_32 : AST_SRTP_CRYPTO_TAG_80;
|
||||
const int attr[][3] = {
|
||||
/* This array creates the following list:
|
||||
* a=crypto:1 AES_CM_128_HMAC_SHA1_ ...
|
||||
* a=crypto:2 AEAD_AES_128_GCM ...
|
||||
* a=crypto:3 AES_256_CM_HMAC_SHA1_ ...
|
||||
* a=crypto:4 AEAD_AES_256_GCM ...
|
||||
* a=crypto:5 AES_192_CM_HMAC_SHA1_ ...
|
||||
* something like 'AEAD_AES_192_GCM' is not specified by the RFCs
|
||||
*
|
||||
* If you want to prefer another crypto suite or you want to
|
||||
* exclude a suite, change this array and recompile Asterisk.
|
||||
* This list cannot be changed from rtp.conf because you should
|
||||
* know what you are doing. Especially AES-192 and AES-GCM are
|
||||
* broken in many VoIP clients, see
|
||||
* https://github.com/cisco/libsrtp/pull/170
|
||||
* https://github.com/cisco/libsrtp/pull/184
|
||||
* Furthermore, AES-GCM uses a shorter crypto-suite string which
|
||||
* causes Nokia phones based on Symbian/S60 to reject the whole
|
||||
* INVITE with status 500, even if a matching suite was offered.
|
||||
* AES-256 might just waste your processor cycles, especially if
|
||||
* your TLS transport is not secured with equivalent grade, see
|
||||
* https://security.stackexchange.com/q/61361
|
||||
* Therefore, AES-128 was preferred here.
|
||||
*
|
||||
* If you want to enable one of those defines, please, go for
|
||||
* CFLAGS='-DENABLE_SRTP_AES_GCM' ./configure && sudo make install
|
||||
*/
|
||||
{ len, 0, 30 },
|
||||
#if defined(HAVE_SRTP_GCM) && defined(ENABLE_SRTP_AES_GCM)
|
||||
{ AST_SRTP_CRYPTO_TAG_16, 0, AES_128_GCM_KEYSIZE_WSALT },
|
||||
#endif
|
||||
#if defined(HAVE_SRTP_256) && defined(ENABLE_SRTP_AES_256)
|
||||
{ len, AST_SRTP_CRYPTO_AES_256, 46 },
|
||||
#endif
|
||||
#if defined(HAVE_SRTP_GCM) && defined(ENABLE_SRTP_AES_GCM) && defined(ENABLE_SRTP_AES_256)
|
||||
{ AST_SRTP_CRYPTO_TAG_16, AST_SRTP_CRYPTO_AES_256, AES_256_GCM_KEYSIZE_WSALT },
|
||||
#endif
|
||||
#if defined(HAVE_SRTP_192) && defined(ENABLE_SRTP_AES_192)
|
||||
{ len, AST_SRTP_CRYPTO_AES_192, 38 },
|
||||
#endif
|
||||
};
|
||||
struct ast_sdp_srtp *tmp = srtp;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_LEN(attr); i++) {
|
||||
if (attr[i][0]) {
|
||||
ast_set_flag(tmp, attr[i][0]);
|
||||
}
|
||||
if (attr[i][1]) {
|
||||
ast_set_flag(tmp, attr[i][1]);
|
||||
}
|
||||
tmp->crypto = sdp_crypto_alloc(attr[i][2]); /* key_len */
|
||||
tmp->crypto->tag = (i + 1); /* tag starts at 1 */
|
||||
|
||||
if (i < ARRAY_LEN(attr) - 1) {
|
||||
AST_LIST_NEXT(tmp, sdp_srtp_list) = ast_sdp_srtp_alloc();
|
||||
tmp = AST_LIST_NEXT(tmp, sdp_srtp_list);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (dtls_enabled) {
|
||||
/* If DTLS-SRTP is enabled the key details will be pulled from TLS */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* set the key length based on INVITE or settings */
|
||||
if (ast_test_flag(srtp, AST_SRTP_CRYPTO_TAG_80)) {
|
||||
taglen = 80;
|
||||
} else if (ast_test_flag(srtp, AST_SRTP_CRYPTO_TAG_32)) {
|
||||
taglen = 32;
|
||||
} else if (ast_test_flag(srtp, AST_SRTP_CRYPTO_TAG_16)) {
|
||||
taglen = 16;
|
||||
} else if (ast_test_flag(srtp, AST_SRTP_CRYPTO_TAG_8)) {
|
||||
taglen = 8;
|
||||
} else {
|
||||
taglen = default_taglen_32 ? 32 : 80;
|
||||
}
|
||||
if (ast_test_flag(srtp, AST_SRTP_CRYPTO_AES_256)) {
|
||||
taglen |= 0x0200;
|
||||
} else if (ast_test_flag(srtp, AST_SRTP_CRYPTO_AES_192)) {
|
||||
taglen |= 0x0100;
|
||||
}
|
||||
if (ast_test_flag(srtp, AST_SRTP_CRYPTO_OLD_NAME)) {
|
||||
taglen |= 0x0080;
|
||||
}
|
||||
|
||||
if (srtp->crypto && (ast_sdp_crypto_build_offer(srtp->crypto, taglen) >= 0)) {
|
||||
return srtp->crypto->a_crypto;
|
||||
}
|
||||
|
||||
ast_log(LOG_WARNING, "No SRTP key management enabled\n");
|
||||
return NULL;
|
||||
return sdp_crypto_api->get_attr(srtp, dtls_enabled, default_taglen_32);
|
||||
}
|
||||
|
||||
char *ast_sdp_get_rtp_profile(unsigned int sdes_active, struct ast_rtp_instance *instance, unsigned int using_avpf,
|
||||
@@ -682,3 +122,19 @@ char *ast_sdp_get_rtp_profile(unsigned int sdes_active, struct ast_rtp_instance
|
||||
}
|
||||
}
|
||||
|
||||
int ast_sdp_crypto_register(struct ast_sdp_crypto_api *api)
|
||||
{
|
||||
if (sdp_crypto_api) {
|
||||
return -1;
|
||||
}
|
||||
sdp_crypto_api = api;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ast_sdp_crypto_unregister(struct ast_sdp_crypto_api *api)
|
||||
{
|
||||
if (sdp_crypto_api == api) {
|
||||
sdp_crypto_api = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -398,6 +398,11 @@ static int process_xml_use_node(xmlNode *node, struct member *mem)
|
||||
return process_xml_ref_node(node, mem, &mem->uses);
|
||||
}
|
||||
|
||||
static int process_xml_member_data_node(xmlNode *node, struct member *mem)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int process_xml_unknown_node(xmlNode *node, struct member *mem)
|
||||
{
|
||||
fprintf(stderr, "Encountered unknown node: %s\n", node->name);
|
||||
@@ -416,6 +421,7 @@ static const struct {
|
||||
{ "depend", process_xml_depend_node },
|
||||
{ "conflict", process_xml_conflict_node },
|
||||
{ "use", process_xml_use_node },
|
||||
{ "member_data", process_xml_member_data_node },
|
||||
};
|
||||
|
||||
static node_handler lookup_node_handler(xmlNode *node)
|
||||
|
@@ -70,6 +70,8 @@ struct member {
|
||||
const char *touch_on_change;
|
||||
const char *support_level;
|
||||
const char *replacement;
|
||||
/*! member_data is just an opaque, member-specific string */
|
||||
const char *member_data;
|
||||
/*! This module is currently selected */
|
||||
unsigned int enabled:1;
|
||||
/*! This module was enabled when the config was loaded */
|
||||
|
@@ -106,6 +106,18 @@ static int global_apply(const struct ast_sorcery *sorcery, void *obj)
|
||||
struct global_config *cfg = obj;
|
||||
char max_forwards[10];
|
||||
|
||||
if (ast_strlen_zero(cfg->debug)) {
|
||||
ast_log(LOG_ERROR,
|
||||
"Global option 'debug' can't be empty. Set it to a valid value or remove the entry to accept 'no' as the default\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (ast_strlen_zero(cfg->default_from_user)) {
|
||||
ast_log(LOG_ERROR,
|
||||
"Global option 'default_from_user' can't be empty. Set it to a valid value or remove the entry to accept 'asterisk' as the default\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
snprintf(max_forwards, sizeof(max_forwards), "%u", cfg->max_forwards);
|
||||
|
||||
ast_sip_add_global_request_header("Max-Forwards", max_forwards, 1);
|
||||
|
@@ -413,7 +413,7 @@ static pjsip_fromto_hdr *create_new_id_hdr(const pj_str_t *hdr_name, pjsip_fromt
|
||||
id_hdr = pjsip_from_hdr_create(tdata->pool);
|
||||
id_hdr->type = PJSIP_H_OTHER;
|
||||
pj_strdup(tdata->pool, &id_hdr->name, hdr_name);
|
||||
id_hdr->sname.slen = 0;
|
||||
id_hdr->sname = id_hdr->name;
|
||||
|
||||
id_name_addr = pjsip_uri_clone(tdata->pool, base->uri);
|
||||
id_uri = pjsip_uri_get_uri(id_name_addr->uri);
|
||||
|
@@ -305,7 +305,7 @@ static void add_diversion_header(pjsip_tx_data *tdata, struct ast_party_redirect
|
||||
hdr = pjsip_from_hdr_create(tdata->pool);
|
||||
hdr->type = PJSIP_H_OTHER;
|
||||
pj_strdup(tdata->pool, &hdr->name, &diversion_name);
|
||||
hdr->sname.slen = 0;
|
||||
hdr->sname = hdr->name;
|
||||
|
||||
name_addr = pjsip_uri_clone(tdata->pool, base);
|
||||
uri = pjsip_uri_get_uri(name_addr->uri);
|
||||
|
@@ -79,6 +79,17 @@ ASTERISK_REGISTER_FILE()
|
||||
</configInfo>
|
||||
***/
|
||||
|
||||
/*!
|
||||
* Unbound versions <= 1.4.20 declare string function parameters as 'char *'
|
||||
* but versions >= 1.4.21 declare them as 'const char *'. Since CentOS6 is still
|
||||
* at 1.4.20, we need to cast away the 'const' if we detect the earlier version.
|
||||
*/
|
||||
#ifdef HAVE_UNBOUND_CONST_PARAMS
|
||||
#define UNBOUND_CHAR const char
|
||||
#else
|
||||
#define UNBOUND_CHAR char
|
||||
#endif
|
||||
|
||||
/*! \brief Structure for an unbound resolver */
|
||||
struct unbound_resolver {
|
||||
/*! \brief Resolver context itself */
|
||||
@@ -292,7 +303,7 @@ static int unbound_resolver_resolve(struct ast_dns_query *query)
|
||||
data->resolver = ao2_bump(cfg->global->state->resolver);
|
||||
ast_dns_resolver_set_data(query, data);
|
||||
|
||||
res = ub_resolve_async(data->resolver->context, ast_dns_query_get_name(query),
|
||||
res = ub_resolve_async(data->resolver->context, (UNBOUND_CHAR *)ast_dns_query_get_name(query),
|
||||
ast_dns_query_get_rr_type(query), ast_dns_query_get_rr_class(query),
|
||||
ao2_bump(query), unbound_resolver_callback, &data->id);
|
||||
|
||||
@@ -404,7 +415,7 @@ static int unbound_config_preapply(struct unbound_config *cfg)
|
||||
if (!strcmp(cfg->global->hosts, "system")) {
|
||||
res = ub_ctx_hosts(cfg->global->state->resolver->context, NULL);
|
||||
} else if (!ast_strlen_zero(cfg->global->hosts)) {
|
||||
res = ub_ctx_hosts(cfg->global->state->resolver->context, cfg->global->hosts);
|
||||
res = ub_ctx_hosts(cfg->global->state->resolver->context, (UNBOUND_CHAR *)cfg->global->hosts);
|
||||
}
|
||||
|
||||
if (res) {
|
||||
@@ -419,7 +430,7 @@ static int unbound_config_preapply(struct unbound_config *cfg)
|
||||
|
||||
it_nameservers = ao2_iterator_init(cfg->global->nameservers, 0);
|
||||
while ((nameserver = ao2_iterator_next(&it_nameservers))) {
|
||||
res = ub_ctx_set_fwd(cfg->global->state->resolver->context, nameserver);
|
||||
res = ub_ctx_set_fwd(cfg->global->state->resolver->context, (UNBOUND_CHAR *)nameserver);
|
||||
|
||||
if (res) {
|
||||
ast_log(LOG_ERROR, "Failed to add nameserver '%s' to unbound resolver: %s\n",
|
||||
@@ -434,7 +445,7 @@ static int unbound_config_preapply(struct unbound_config *cfg)
|
||||
if (!strcmp(cfg->global->resolv, "system")) {
|
||||
res = ub_ctx_resolvconf(cfg->global->state->resolver->context, NULL);
|
||||
} else if (!ast_strlen_zero(cfg->global->resolv)) {
|
||||
res = ub_ctx_resolvconf(cfg->global->state->resolver->context, cfg->global->resolv);
|
||||
res = ub_ctx_resolvconf(cfg->global->state->resolver->context, (UNBOUND_CHAR *)cfg->global->resolv);
|
||||
}
|
||||
|
||||
if (res) {
|
||||
@@ -444,7 +455,7 @@ static int unbound_config_preapply(struct unbound_config *cfg)
|
||||
}
|
||||
|
||||
if (!ast_strlen_zero(cfg->global->ta_file)) {
|
||||
res = ub_ctx_add_ta_file(cfg->global->state->resolver->context, cfg->global->ta_file);
|
||||
res = ub_ctx_add_ta_file(cfg->global->state->resolver->context, (UNBOUND_CHAR *)cfg->global->ta_file);
|
||||
|
||||
if (res) {
|
||||
ast_log(LOG_ERROR, "Failed to set trusted anchor file to '%s' in unbound resolver: %s\n",
|
||||
@@ -740,13 +751,13 @@ static enum ast_test_result_state nominal_test(struct ast_test *test, resolve_fn
|
||||
static const size_t V4_SIZE = sizeof(struct in_addr);
|
||||
static const size_t V6_SIZE = sizeof(struct in6_addr);
|
||||
|
||||
static const char *DOMAIN1 = "goose.feathers";
|
||||
static const char *DOMAIN2 = "duck.feathers";
|
||||
static UNBOUND_CHAR *DOMAIN1 = "goose.feathers";
|
||||
static UNBOUND_CHAR *DOMAIN2 = "duck.feathers";
|
||||
|
||||
static const char *ADDR1 = "127.0.0.2";
|
||||
static const char *ADDR2 = "127.0.0.3";
|
||||
static const char *ADDR3 = "::1";
|
||||
static const char *ADDR4 = "127.0.0.4";
|
||||
static UNBOUND_CHAR *ADDR1 = "127.0.0.2";
|
||||
static UNBOUND_CHAR *ADDR2 = "127.0.0.3";
|
||||
static UNBOUND_CHAR *ADDR3 = "::1";
|
||||
static UNBOUND_CHAR *ADDR4 = "127.0.0.4";
|
||||
|
||||
char addr1_buf[V4_SIZE];
|
||||
char addr2_buf[V4_SIZE];
|
||||
@@ -786,7 +797,7 @@ static enum ast_test_result_state nominal_test(struct ast_test *test, resolve_fn
|
||||
ub_ctx_zone_add(resolver->context, DOMAIN2, "static");
|
||||
|
||||
for (i = 0; i < ARRAY_LEN(records); ++i) {
|
||||
ub_ctx_data_add(resolver->context, records[i].as_string);
|
||||
ub_ctx_data_add(resolver->context, (UNBOUND_CHAR *)records[i].as_string);
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_LEN(runs); ++i) {
|
||||
@@ -808,7 +819,7 @@ static enum ast_test_result_state nominal_test(struct ast_test *test, resolve_fn
|
||||
|
||||
cleanup:
|
||||
for (i = 0; i < ARRAY_LEN(records); ++i) {
|
||||
ub_ctx_data_remove(resolver->context, records[i].as_string);
|
||||
ub_ctx_data_remove(resolver->context, (UNBOUND_CHAR *)records[i].as_string);
|
||||
}
|
||||
ub_ctx_zone_remove(resolver->context, DOMAIN1);
|
||||
ub_ctx_zone_remove(resolver->context, DOMAIN2);
|
||||
@@ -1012,10 +1023,10 @@ static enum ast_test_result_state off_nominal_test(struct ast_test *test,
|
||||
|
||||
static const size_t V4_SIZE = sizeof(struct in_addr);
|
||||
|
||||
static const char *DOMAIN1 = "goose.feathers";
|
||||
static const char *DOMAIN2 = "duck.feathers";
|
||||
static UNBOUND_CHAR *DOMAIN1 = "goose.feathers";
|
||||
static UNBOUND_CHAR *DOMAIN2 = "duck.feathers";
|
||||
|
||||
static const char *ADDR1 = "127.0.0.2";
|
||||
static UNBOUND_CHAR *ADDR1 = "127.0.0.2";
|
||||
|
||||
char addr1_buf[V4_SIZE];
|
||||
|
||||
@@ -1046,7 +1057,7 @@ static enum ast_test_result_state off_nominal_test(struct ast_test *test,
|
||||
ub_ctx_zone_add(resolver->context, DOMAIN2, "static");
|
||||
|
||||
for (i = 0; i < ARRAY_LEN(records); ++i) {
|
||||
ub_ctx_data_add(resolver->context, records[i].as_string);
|
||||
ub_ctx_data_add(resolver->context, (UNBOUND_CHAR *)records[i].as_string);
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_LEN(runs); ++i) {
|
||||
@@ -1196,7 +1207,7 @@ AST_TEST_DEFINE(resolve_naptr)
|
||||
|
||||
const struct ast_dns_record *record;
|
||||
|
||||
static const char * DOMAIN1 = "goose.feathers";
|
||||
static char * DOMAIN1 = "goose.feathers";
|
||||
int i;
|
||||
enum ast_test_result_state res = AST_TEST_PASS;
|
||||
|
||||
@@ -1234,7 +1245,7 @@ AST_TEST_DEFINE(resolve_naptr)
|
||||
ub_ctx_zone_add(resolver->context, DOMAIN1, "static");
|
||||
|
||||
for (i = 0; i < ARRAY_LEN(records); ++i) {
|
||||
ub_ctx_data_add(resolver->context, records[i].zone_entry);
|
||||
ub_ctx_data_add(resolver->context, (UNBOUND_CHAR *)records[i].zone_entry);
|
||||
}
|
||||
|
||||
if (ast_dns_resolve(DOMAIN1, ns_t_naptr, ns_c_in, &result)) {
|
||||
@@ -1311,8 +1322,8 @@ AST_TEST_DEFINE(resolve_srv)
|
||||
RAII_VAR(struct unbound_config *, cfg, NULL, ao2_cleanup);
|
||||
RAII_VAR(struct ast_dns_result *, result, NULL, ast_dns_result_free);
|
||||
const struct ast_dns_record *record;
|
||||
static const char *DOMAIN1 = "taco.bananas";
|
||||
static const char *DOMAIN1_SRV = "taco.bananas 12345 IN SRV 10 20 5060 sip.taco.bananas";
|
||||
static UNBOUND_CHAR *DOMAIN1 = "taco.bananas";
|
||||
static UNBOUND_CHAR *DOMAIN1_SRV = "taco.bananas 12345 IN SRV 10 20 5060 sip.taco.bananas";
|
||||
enum ast_test_result_state res = AST_TEST_PASS;
|
||||
|
||||
switch (cmd) {
|
||||
|
587
res/res_srtp.c
587
res/res_srtp.c
@@ -39,6 +39,7 @@
|
||||
|
||||
ASTERISK_REGISTER_FILE()
|
||||
|
||||
#include <math.h> /* for pow */
|
||||
#include <srtp/srtp.h>
|
||||
#ifdef HAVE_OPENSSL
|
||||
#include <openssl/rand.h>
|
||||
@@ -50,6 +51,7 @@ ASTERISK_REGISTER_FILE()
|
||||
#include "asterisk/frame.h" /* for AST_FRIENDLY_OFFSET */
|
||||
#include "asterisk/logger.h" /* for ast_log, ast_debug, etc */
|
||||
#include "asterisk/module.h" /* for ast_module_info, etc */
|
||||
#include "asterisk/sdp_srtp.h"
|
||||
#include "asterisk/res_srtp.h" /* for ast_srtp_cb, ast_srtp_suite, etc */
|
||||
#include "asterisk/rtp_engine.h" /* for ast_rtp_engine_register_srtp, etc */
|
||||
#include "asterisk/utils.h" /* for ast_free, ast_calloc */
|
||||
@@ -578,10 +580,587 @@ static int ast_srtp_change_source(struct ast_srtp *srtp, unsigned int from_ssrc,
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct ast_sdp_crypto {
|
||||
char *a_crypto;
|
||||
unsigned char local_key[SRTP_MAX_KEY_LEN];
|
||||
int tag;
|
||||
char local_key64[((SRTP_MAX_KEY_LEN) * 8 + 5) / 6 + 1];
|
||||
unsigned char remote_key[SRTP_MAX_KEY_LEN];
|
||||
int key_len;
|
||||
};
|
||||
|
||||
static void res_sdp_crypto_dtor(struct ast_sdp_crypto *crypto)
|
||||
{
|
||||
if (crypto) {
|
||||
ast_free(crypto->a_crypto);
|
||||
crypto->a_crypto = NULL;
|
||||
ast_free(crypto);
|
||||
|
||||
ast_module_unref(ast_module_info->self);
|
||||
}
|
||||
}
|
||||
|
||||
static struct ast_sdp_crypto *crypto_init_keys(struct ast_sdp_crypto *p, const int key_len)
|
||||
{
|
||||
unsigned char remote_key[key_len];
|
||||
|
||||
if (srtp_res.get_random(p->local_key, key_len) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ast_base64encode(p->local_key64, p->local_key, key_len, sizeof(p->local_key64));
|
||||
|
||||
p->key_len = ast_base64decode(remote_key, p->local_key64, sizeof(remote_key));
|
||||
|
||||
if (p->key_len != key_len) {
|
||||
ast_log(LOG_ERROR, "base64 encode/decode bad len %d != %d\n", p->key_len, key_len);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (memcmp(remote_key, p->local_key, p->key_len)) {
|
||||
ast_log(LOG_ERROR, "base64 encode/decode bad key\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ast_debug(1 , "local_key64 %s len %zu\n", p->local_key64, strlen(p->local_key64));
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
static struct ast_sdp_crypto *sdp_crypto_alloc(const int key_len)
|
||||
{
|
||||
struct ast_sdp_crypto *p, *result;
|
||||
|
||||
if (!(p = ast_calloc(1, sizeof(*p)))) {
|
||||
return NULL;
|
||||
}
|
||||
p->tag = 1;
|
||||
ast_module_ref(ast_module_info->self);
|
||||
|
||||
/* default is a key which uses AST_AES_CM_128_HMAC_SHA1_xx */
|
||||
result = crypto_init_keys(p, key_len);
|
||||
if (!result) {
|
||||
res_sdp_crypto_dtor(p);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static struct ast_sdp_crypto *res_sdp_crypto_alloc(void)
|
||||
{
|
||||
return sdp_crypto_alloc(SRTP_MASTER_KEY_LEN);
|
||||
}
|
||||
|
||||
static int res_sdp_crypto_build_offer(struct ast_sdp_crypto *p, int taglen)
|
||||
{
|
||||
int res;
|
||||
|
||||
/* Rebuild the crypto line */
|
||||
ast_free(p->a_crypto);
|
||||
p->a_crypto = NULL;
|
||||
|
||||
if ((taglen & 0x007f) == 8) {
|
||||
res = ast_asprintf(&p->a_crypto, "%d AEAD_AES_%d_GCM_%d inline:%s",
|
||||
p->tag, 128 + ((taglen & 0x0300) >> 2), taglen & 0x007f, p->local_key64);
|
||||
} else if ((taglen & 0x007f) == 16) {
|
||||
res = ast_asprintf(&p->a_crypto, "%d AEAD_AES_%d_GCM inline:%s",
|
||||
p->tag, 128 + ((taglen & 0x0300) >> 2), p->local_key64);
|
||||
} else if ((taglen & 0x0300) && !(taglen & 0x0080)) {
|
||||
res = ast_asprintf(&p->a_crypto, "%d AES_%d_CM_HMAC_SHA1_%d inline:%s",
|
||||
p->tag, 128 + ((taglen & 0x0300) >> 2), taglen & 0x007f, p->local_key64);
|
||||
} else {
|
||||
res = ast_asprintf(&p->a_crypto, "%d AES_CM_%d_HMAC_SHA1_%d inline:%s",
|
||||
p->tag, 128 + ((taglen & 0x0300) >> 2), taglen & 0x007f, p->local_key64);
|
||||
}
|
||||
if (res == -1 || !p->a_crypto) {
|
||||
ast_log(LOG_ERROR, "Could not allocate memory for crypto line\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
ast_debug(1, "Crypto line: a=crypto:%s\n", p->a_crypto);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int set_crypto_policy(struct ast_srtp_policy *policy, int suite_val, const unsigned char *master_key, int key_len, unsigned long ssrc, int inbound)
|
||||
{
|
||||
if (policy_res.set_master_key(policy, master_key, key_len, NULL, 0) < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (policy_res.set_suite(policy, suite_val)) {
|
||||
ast_log(LOG_WARNING, "Could not set remote SRTP suite\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
policy_res.set_ssrc(policy, ssrc, inbound);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int crypto_activate(struct ast_sdp_crypto *p, int suite_val, unsigned char *remote_key, int key_len, struct ast_rtp_instance *rtp)
|
||||
{
|
||||
struct ast_srtp_policy *local_policy = NULL;
|
||||
struct ast_srtp_policy *remote_policy = NULL;
|
||||
struct ast_rtp_instance_stats stats = {0,};
|
||||
int res = -1;
|
||||
|
||||
if (!p) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!(local_policy = policy_res.alloc())) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!(remote_policy = policy_res.alloc())) {
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (ast_rtp_instance_get_stats(rtp, &stats, AST_RTP_INSTANCE_STAT_LOCAL_SSRC)) {
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (set_crypto_policy(local_policy, suite_val, p->local_key, key_len, stats.local_ssrc, 0) < 0) {
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (set_crypto_policy(remote_policy, suite_val, remote_key, key_len, 0, 1) < 0) {
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* Add the SRTP policies */
|
||||
if (ast_rtp_instance_add_srtp_policy(rtp, remote_policy, local_policy, 0)) {
|
||||
ast_log(LOG_WARNING, "Could not set SRTP policies\n");
|
||||
goto err;
|
||||
}
|
||||
|
||||
ast_debug(1 , "SRTP policy activated\n");
|
||||
res = 0;
|
||||
|
||||
err:
|
||||
if (local_policy) {
|
||||
policy_res.destroy(local_policy);
|
||||
}
|
||||
|
||||
if (remote_policy) {
|
||||
policy_res.destroy(remote_policy);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static int res_sdp_crypto_parse_offer(struct ast_rtp_instance *rtp, struct ast_sdp_srtp *srtp, const char *attr)
|
||||
{
|
||||
char *str = NULL;
|
||||
char *tag = NULL;
|
||||
char *suite = NULL;
|
||||
char *key_params = NULL;
|
||||
char *key_param = NULL;
|
||||
char *session_params = NULL;
|
||||
char *key_salt = NULL; /* The actual master key and key salt */
|
||||
char *lifetime = NULL; /* Key lifetime (# of RTP packets) */
|
||||
char *mki = NULL; /* Master Key Index */
|
||||
int found = 0;
|
||||
int key_len_from_sdp;
|
||||
int key_len_expected;
|
||||
int tag_from_sdp;
|
||||
int suite_val = 0;
|
||||
unsigned char remote_key[SRTP_MAX_KEY_LEN];
|
||||
int taglen;
|
||||
double sdes_lifetime;
|
||||
struct ast_sdp_crypto *crypto;
|
||||
struct ast_sdp_srtp *tmp;
|
||||
|
||||
str = ast_strdupa(attr);
|
||||
|
||||
tag = strsep(&str, " ");
|
||||
suite = strsep(&str, " ");
|
||||
key_params = strsep(&str, " ");
|
||||
session_params = strsep(&str, " ");
|
||||
|
||||
if (!tag || !suite) {
|
||||
ast_log(LOG_WARNING, "Unrecognized crypto attribute a=%s\n", attr);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* RFC4568 9.1 - tag is 1-9 digits, greater than zero */
|
||||
if (sscanf(tag, "%30d", &tag_from_sdp) != 1 || tag_from_sdp <= 0 || tag_from_sdp > 999999999) {
|
||||
ast_log(LOG_WARNING, "Unacceptable a=crypto tag: %s\n", tag);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!ast_strlen_zero(session_params)) {
|
||||
ast_log(LOG_WARNING, "Unsupported crypto parameters: %s\n", session_params);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* On egress, Asterisk sent several crypto lines in the SIP/SDP offer
|
||||
The remote party might have choosen another line than the first */
|
||||
for (tmp = srtp; tmp && tmp->crypto && tmp->crypto->tag != tag_from_sdp;) {
|
||||
tmp = AST_LIST_NEXT(tmp, sdp_srtp_list);
|
||||
}
|
||||
if (tmp) { /* tag matched an already created crypto line */
|
||||
unsigned int flags = tmp->flags;
|
||||
|
||||
/* Make that crypto line the head of the list, not by changing the
|
||||
list structure but by exchanging the content of the list members */
|
||||
crypto = tmp->crypto;
|
||||
tmp->crypto = srtp->crypto;
|
||||
tmp->flags = srtp->flags;
|
||||
srtp->crypto = crypto;
|
||||
srtp->flags = flags;
|
||||
} else {
|
||||
crypto = srtp->crypto;
|
||||
crypto->tag = tag_from_sdp;
|
||||
}
|
||||
|
||||
if (!strcmp(suite, "AES_CM_128_HMAC_SHA1_80")) {
|
||||
suite_val = AST_AES_CM_128_HMAC_SHA1_80;
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_TAG_80);
|
||||
key_len_expected = 30;
|
||||
} else if (!strcmp(suite, "AES_CM_128_HMAC_SHA1_32")) {
|
||||
suite_val = AST_AES_CM_128_HMAC_SHA1_32;
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_TAG_32);
|
||||
key_len_expected = 30;
|
||||
#ifdef HAVE_SRTP_192
|
||||
} else if (!strcmp(suite, "AES_192_CM_HMAC_SHA1_80")) {
|
||||
suite_val = AST_AES_CM_192_HMAC_SHA1_80;
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_TAG_80);
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_AES_192);
|
||||
key_len_expected = 38;
|
||||
} else if (!strcmp(suite, "AES_192_CM_HMAC_SHA1_32")) {
|
||||
suite_val = AST_AES_CM_192_HMAC_SHA1_32;
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_TAG_32);
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_AES_192);
|
||||
key_len_expected = 38;
|
||||
/* RFC used a different name while in draft, some still use that */
|
||||
} else if (!strcmp(suite, "AES_CM_192_HMAC_SHA1_80")) {
|
||||
suite_val = AST_AES_CM_192_HMAC_SHA1_80;
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_TAG_80);
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_AES_192);
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_OLD_NAME);
|
||||
key_len_expected = 38;
|
||||
} else if (!strcmp(suite, "AES_CM_192_HMAC_SHA1_32")) {
|
||||
suite_val = AST_AES_CM_192_HMAC_SHA1_32;
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_TAG_32);
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_AES_192);
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_OLD_NAME);
|
||||
key_len_expected = 38;
|
||||
#endif
|
||||
#ifdef HAVE_SRTP_256
|
||||
} else if (!strcmp(suite, "AES_256_CM_HMAC_SHA1_80")) {
|
||||
suite_val = AST_AES_CM_256_HMAC_SHA1_80;
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_TAG_80);
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_AES_256);
|
||||
key_len_expected = 46;
|
||||
} else if (!strcmp(suite, "AES_256_CM_HMAC_SHA1_32")) {
|
||||
suite_val = AST_AES_CM_256_HMAC_SHA1_32;
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_TAG_32);
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_AES_256);
|
||||
key_len_expected = 46;
|
||||
/* RFC used a different name while in draft, some still use that */
|
||||
} else if (!strcmp(suite, "AES_CM_256_HMAC_SHA1_80")) {
|
||||
suite_val = AST_AES_CM_256_HMAC_SHA1_80;
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_TAG_80);
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_AES_256);
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_OLD_NAME);
|
||||
key_len_expected = 46;
|
||||
} else if (!strcmp(suite, "AES_CM_256_HMAC_SHA1_32")) {
|
||||
suite_val = AST_AES_CM_256_HMAC_SHA1_32;
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_TAG_32);
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_AES_256);
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_OLD_NAME);
|
||||
key_len_expected = 46;
|
||||
#endif
|
||||
#ifdef HAVE_SRTP_GCM
|
||||
} else if (!strcmp(suite, "AEAD_AES_128_GCM")) {
|
||||
suite_val = AST_AES_GCM_128;
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_TAG_16);
|
||||
key_len_expected = AES_128_GCM_KEYSIZE_WSALT;
|
||||
} else if (!strcmp(suite, "AEAD_AES_256_GCM")) {
|
||||
suite_val = AST_AES_GCM_256;
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_TAG_16);
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_AES_256);
|
||||
key_len_expected = AES_256_GCM_KEYSIZE_WSALT;
|
||||
/* RFC contained a (too) short auth tag for RTP media, some still use that */
|
||||
} else if (!strcmp(suite, "AEAD_AES_128_GCM_8")) {
|
||||
suite_val = AST_AES_GCM_128_8;
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_TAG_8);
|
||||
key_len_expected = AES_128_GCM_KEYSIZE_WSALT;
|
||||
} else if (!strcmp(suite, "AEAD_AES_256_GCM_8")) {
|
||||
suite_val = AST_AES_GCM_256_8;
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_TAG_8);
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_AES_256);
|
||||
key_len_expected = AES_256_GCM_KEYSIZE_WSALT;
|
||||
#endif
|
||||
} else {
|
||||
ast_verb(1, "Unsupported crypto suite: %s\n", suite);
|
||||
return -1;
|
||||
}
|
||||
|
||||
while ((key_param = strsep(&key_params, ";"))) {
|
||||
unsigned int n_lifetime;
|
||||
char *method = NULL;
|
||||
char *info = NULL;
|
||||
|
||||
method = strsep(&key_param, ":");
|
||||
info = strsep(&key_param, ";");
|
||||
sdes_lifetime = 0;
|
||||
|
||||
if (strcmp(method, "inline")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
key_salt = strsep(&info, "|");
|
||||
|
||||
/* The next parameter can be either lifetime or MKI */
|
||||
lifetime = strsep(&info, "|");
|
||||
if (!lifetime) {
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
mki = strchr(lifetime, ':');
|
||||
if (mki) {
|
||||
mki = lifetime;
|
||||
lifetime = NULL;
|
||||
} else {
|
||||
mki = strsep(&info, "|");
|
||||
}
|
||||
|
||||
if (mki && *mki != '1') {
|
||||
ast_log(LOG_NOTICE, "Crypto MKI handling is not supported: ignoring attribute %s\n", attr);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (lifetime) {
|
||||
if (!strncmp(lifetime, "2^", 2)) {
|
||||
char *lifetime_val = lifetime + 2;
|
||||
|
||||
/* Exponential lifetime */
|
||||
if (sscanf(lifetime_val, "%30u", &n_lifetime) != 1) {
|
||||
ast_log(LOG_NOTICE, "Failed to parse lifetime value in crypto attribute: %s\n", attr);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (n_lifetime > 48) {
|
||||
/* Yeah... that's a bit big. */
|
||||
ast_log(LOG_NOTICE, "Crypto lifetime exponent of '%u' is a bit large; using 48\n", n_lifetime);
|
||||
n_lifetime = 48;
|
||||
}
|
||||
sdes_lifetime = pow(2, n_lifetime);
|
||||
} else {
|
||||
/* Decimal lifetime */
|
||||
if (sscanf(lifetime, "%30u", &n_lifetime) != 1) {
|
||||
ast_log(LOG_NOTICE, "Failed to parse lifetime value in crypto attribute: %s\n", attr);
|
||||
continue;
|
||||
}
|
||||
sdes_lifetime = n_lifetime;
|
||||
}
|
||||
|
||||
/* Accept anything above 10 hours. Less than 10; reject. */
|
||||
if (sdes_lifetime < 1800000) {
|
||||
ast_log(LOG_NOTICE, "Rejecting crypto attribute '%s': lifetime '%f' too short\n", attr, sdes_lifetime);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
ast_debug(2, "Crypto attribute '%s' accepted with lifetime '%f', MKI '%s'\n",
|
||||
attr, sdes_lifetime, mki ? mki : "-");
|
||||
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
ast_log(LOG_NOTICE, "SRTP crypto offer not acceptable: '%s'\n", attr);
|
||||
return -1;
|
||||
}
|
||||
|
||||
key_len_from_sdp = ast_base64decode(remote_key, key_salt, sizeof(remote_key));
|
||||
if (key_len_from_sdp != key_len_expected) {
|
||||
ast_log(LOG_WARNING, "SRTP descriptions key length is '%d', not '%d'\n",
|
||||
key_len_from_sdp, key_len_expected);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* on default, the key is 30 (AES-128); throw that away (only) when the suite changed actually */
|
||||
/* ingress: optional, but saves one expensive call to get_random(.) */
|
||||
/* egress: required, because the local key was communicated before the remote key is processed */
|
||||
if (crypto->key_len != key_len_from_sdp) {
|
||||
if (!crypto_init_keys(crypto, key_len_from_sdp)) {
|
||||
return -1;
|
||||
}
|
||||
} else if (!memcmp(crypto->remote_key, remote_key, key_len_from_sdp)) {
|
||||
ast_debug(1, "SRTP remote key unchanged; maintaining current policy\n");
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_OFFER_OK);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (key_len_from_sdp > sizeof(crypto->remote_key)) {
|
||||
ast_log(LOG_ERROR,
|
||||
"SRTP key buffer is %zu although it must be at least %d bytes\n",
|
||||
sizeof(crypto->remote_key), key_len_from_sdp);
|
||||
return -1;
|
||||
}
|
||||
memcpy(crypto->remote_key, remote_key, key_len_from_sdp);
|
||||
|
||||
if (crypto_activate(crypto, suite_val, remote_key, key_len_from_sdp, rtp) < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (ast_test_flag(srtp, AST_SRTP_CRYPTO_TAG_32)) {
|
||||
taglen = 32;
|
||||
} else if (ast_test_flag(srtp, AST_SRTP_CRYPTO_TAG_16)) {
|
||||
taglen = 16;
|
||||
} else if (ast_test_flag(srtp, AST_SRTP_CRYPTO_TAG_8)) {
|
||||
taglen = 8;
|
||||
} else {
|
||||
taglen = 80;
|
||||
}
|
||||
if (ast_test_flag(srtp, AST_SRTP_CRYPTO_AES_256)) {
|
||||
taglen |= 0x0200;
|
||||
} else if (ast_test_flag(srtp, AST_SRTP_CRYPTO_AES_192)) {
|
||||
taglen |= 0x0100;
|
||||
}
|
||||
if (ast_test_flag(srtp, AST_SRTP_CRYPTO_OLD_NAME)) {
|
||||
taglen |= 0x0080;
|
||||
}
|
||||
|
||||
/* Finally, rebuild the crypto line */
|
||||
if (res_sdp_crypto_build_offer(crypto, taglen)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
ast_set_flag(srtp, AST_SRTP_CRYPTO_OFFER_OK);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const char *res_sdp_srtp_get_attr(struct ast_sdp_srtp *srtp, int dtls_enabled, int default_taglen_32)
|
||||
{
|
||||
int taglen;
|
||||
|
||||
if (!srtp) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Set encryption properties */
|
||||
if (!srtp->crypto) {
|
||||
if (AST_LIST_NEXT(srtp, sdp_srtp_list)) {
|
||||
srtp->crypto = res_sdp_crypto_alloc();
|
||||
ast_log(LOG_ERROR, "SRTP SDP list was not empty\n");
|
||||
} else {
|
||||
const int len = default_taglen_32 ? AST_SRTP_CRYPTO_TAG_32 : AST_SRTP_CRYPTO_TAG_80;
|
||||
const int attr[][3] = {
|
||||
/* This array creates the following list:
|
||||
* a=crypto:1 AES_CM_128_HMAC_SHA1_ ...
|
||||
* a=crypto:2 AEAD_AES_128_GCM ...
|
||||
* a=crypto:3 AES_256_CM_HMAC_SHA1_ ...
|
||||
* a=crypto:4 AEAD_AES_256_GCM ...
|
||||
* a=crypto:5 AES_192_CM_HMAC_SHA1_ ...
|
||||
* something like 'AEAD_AES_192_GCM' is not specified by the RFCs
|
||||
*
|
||||
* If you want to prefer another crypto suite or you want to
|
||||
* exclude a suite, change this array and recompile Asterisk.
|
||||
* This list cannot be changed from rtp.conf because you should
|
||||
* know what you are doing. Especially AES-192 and AES-GCM are
|
||||
* broken in many VoIP clients, see
|
||||
* https://github.com/cisco/libsrtp/pull/170
|
||||
* https://github.com/cisco/libsrtp/pull/184
|
||||
* Furthermore, AES-GCM uses a shorter crypto-suite string which
|
||||
* causes Nokia phones based on Symbian/S60 to reject the whole
|
||||
* INVITE with status 500, even if a matching suite was offered.
|
||||
* AES-256 might just waste your processor cycles, especially if
|
||||
* your TLS transport is not secured with equivalent grade, see
|
||||
* https://security.stackexchange.com/q/61361
|
||||
* Therefore, AES-128 was preferred here.
|
||||
*
|
||||
* If you want to enable one of those defines, please, go for
|
||||
* CFLAGS='-DENABLE_SRTP_AES_GCM' ./configure && sudo make install
|
||||
*/
|
||||
{ len, 0, 30 },
|
||||
#if defined(HAVE_SRTP_GCM) && defined(ENABLE_SRTP_AES_GCM)
|
||||
{ AST_SRTP_CRYPTO_TAG_16, 0, AES_128_GCM_KEYSIZE_WSALT },
|
||||
#endif
|
||||
#if defined(HAVE_SRTP_256) && defined(ENABLE_SRTP_AES_256)
|
||||
{ len, AST_SRTP_CRYPTO_AES_256, 46 },
|
||||
#endif
|
||||
#if defined(HAVE_SRTP_GCM) && defined(ENABLE_SRTP_AES_GCM) && defined(ENABLE_SRTP_AES_256)
|
||||
{ AST_SRTP_CRYPTO_TAG_16, AST_SRTP_CRYPTO_AES_256, AES_256_GCM_KEYSIZE_WSALT },
|
||||
#endif
|
||||
#if defined(HAVE_SRTP_192) && defined(ENABLE_SRTP_AES_192)
|
||||
{ len, AST_SRTP_CRYPTO_AES_192, 38 },
|
||||
#endif
|
||||
};
|
||||
struct ast_sdp_srtp *tmp = srtp;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_LEN(attr); i++) {
|
||||
if (attr[i][0]) {
|
||||
ast_set_flag(tmp, attr[i][0]);
|
||||
}
|
||||
if (attr[i][1]) {
|
||||
ast_set_flag(tmp, attr[i][1]);
|
||||
}
|
||||
tmp->crypto = sdp_crypto_alloc(attr[i][2]); /* key_len */
|
||||
tmp->crypto->tag = (i + 1); /* tag starts at 1 */
|
||||
|
||||
if (i < ARRAY_LEN(attr) - 1) {
|
||||
AST_LIST_NEXT(tmp, sdp_srtp_list) = ast_sdp_srtp_alloc();
|
||||
tmp = AST_LIST_NEXT(tmp, sdp_srtp_list);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (dtls_enabled) {
|
||||
/* If DTLS-SRTP is enabled the key details will be pulled from TLS */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* set the key length based on INVITE or settings */
|
||||
if (ast_test_flag(srtp, AST_SRTP_CRYPTO_TAG_80)) {
|
||||
taglen = 80;
|
||||
} else if (ast_test_flag(srtp, AST_SRTP_CRYPTO_TAG_32)) {
|
||||
taglen = 32;
|
||||
} else if (ast_test_flag(srtp, AST_SRTP_CRYPTO_TAG_16)) {
|
||||
taglen = 16;
|
||||
} else if (ast_test_flag(srtp, AST_SRTP_CRYPTO_TAG_8)) {
|
||||
taglen = 8;
|
||||
} else {
|
||||
taglen = default_taglen_32 ? 32 : 80;
|
||||
}
|
||||
if (ast_test_flag(srtp, AST_SRTP_CRYPTO_AES_256)) {
|
||||
taglen |= 0x0200;
|
||||
} else if (ast_test_flag(srtp, AST_SRTP_CRYPTO_AES_192)) {
|
||||
taglen |= 0x0100;
|
||||
}
|
||||
if (ast_test_flag(srtp, AST_SRTP_CRYPTO_OLD_NAME)) {
|
||||
taglen |= 0x0080;
|
||||
}
|
||||
|
||||
if (srtp->crypto && (res_sdp_crypto_build_offer(srtp->crypto, taglen) >= 0)) {
|
||||
return srtp->crypto->a_crypto;
|
||||
}
|
||||
|
||||
ast_log(LOG_WARNING, "No SRTP key management enabled\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static struct ast_sdp_crypto_api res_sdp_crypto_api = {
|
||||
.dtor = res_sdp_crypto_dtor,
|
||||
.alloc = res_sdp_crypto_alloc,
|
||||
.build_offer = res_sdp_crypto_build_offer,
|
||||
.parse_offer = res_sdp_crypto_parse_offer,
|
||||
.get_attr = res_sdp_srtp_get_attr,
|
||||
};
|
||||
|
||||
static void res_srtp_shutdown(void)
|
||||
{
|
||||
srtp_install_event_handler(NULL);
|
||||
ast_sdp_crypto_unregister(&res_sdp_crypto_api);
|
||||
ast_rtp_engine_unregister_srtp();
|
||||
srtp_install_event_handler(NULL);
|
||||
#ifdef HAVE_SRTP_SHUTDOWN
|
||||
srtp_shutdown();
|
||||
#endif
|
||||
@@ -607,6 +1186,12 @@ static int res_srtp_init(void)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (ast_sdp_crypto_register(&res_sdp_crypto_api)) {
|
||||
ast_log(AST_LOG_WARNING, "Failed to register SDP SRTP crypto API\n");
|
||||
res_srtp_shutdown();
|
||||
return -1;
|
||||
}
|
||||
|
||||
g_initialized = 1;
|
||||
return 0;
|
||||
}
|
||||
|
31
third-party/pjproject/Makefile.rules
vendored
31
third-party/pjproject/Makefile.rules
vendored
@@ -1,9 +1,34 @@
|
||||
PJPROJECT_URL = http://www.pjsip.org/release/$(PJPROJECT_VERSION)
|
||||
|
||||
# Even though we're not installing pjproject, we're setting prefix to /opt/pjproject to be safe
|
||||
PJPROJECT_CONFIG_OPTS = --prefix=/opt/pjproject --disable-speex-codec --disable-speex-aec \
|
||||
--disable-gsm-codec --disable-video --disable-v4l2 --disable-sound --disable-opencore-amr \
|
||||
--disable-ilbc-codec --without-libyuv --disable-g7221-codec --disable-resample
|
||||
|
||||
PJPROJECT_CONFIG_OPTS = --prefix=/opt/pjproject \
|
||||
--disable-speex-codec \
|
||||
--disable-speex-aec \
|
||||
--disable-speex-aec \
|
||||
--disable-gsm-codec \
|
||||
--disable-ilbc-codec \
|
||||
--disable-l16-codec \
|
||||
--disable-g711-codec \
|
||||
--disable-g722-codec \
|
||||
--disable-g7221-codec \
|
||||
--disable-opencore-amr \
|
||||
--disable-webrtc \
|
||||
--disable-silk \
|
||||
--disable-opus \
|
||||
--disable-video \
|
||||
--disable-v4l2 \
|
||||
--disable-sound \
|
||||
--disable-ext-sound \
|
||||
--disable-oss \
|
||||
--disable-sdl \
|
||||
--disable-libyuv \
|
||||
--disable-resample \
|
||||
--disable-ffmpeg \
|
||||
--disable-openh264 \
|
||||
--disable-ipp \
|
||||
--without-external-pa \
|
||||
--with-external-srtp
|
||||
|
||||
ifeq ($(shell uname -s),Linux)
|
||||
PJPROJECT_CONFIG_OPTS += --enable-epoll
|
||||
|
@@ -1,73 +0,0 @@
|
||||
From a5030c9b33b2c936879fbacb1d2ea5edc2979181 Mon Sep 17 00:00:00 2001
|
||||
From: George Joseph <gjoseph@digium.com>
|
||||
Date: Sat, 18 Jun 2016 10:14:34 -0600
|
||||
Subject: [PATCH] evsub: Add APIs to add/decrement an event subscription's
|
||||
group lock
|
||||
|
||||
These APIs can be used to ensure that the evsub isn't destroyed before
|
||||
an application is finished using it.
|
||||
---
|
||||
pjsip/include/pjsip-simple/evsub.h | 20 ++++++++++++++++++++
|
||||
pjsip/src/pjsip-simple/evsub.c | 14 ++++++++++++++
|
||||
2 files changed, 34 insertions(+)
|
||||
|
||||
diff --git a/pjsip/include/pjsip-simple/evsub.h b/pjsip/include/pjsip-simple/evsub.h
|
||||
index 2dc4d69..31f85f8 100644
|
||||
--- a/pjsip/include/pjsip-simple/evsub.h
|
||||
+++ b/pjsip/include/pjsip-simple/evsub.h
|
||||
@@ -490,6 +490,26 @@ PJ_DECL(void) pjsip_evsub_set_mod_data( pjsip_evsub *sub, unsigned mod_id,
|
||||
PJ_DECL(void*) pjsip_evsub_get_mod_data( pjsip_evsub *sub, unsigned mod_id );
|
||||
|
||||
|
||||
+/**
|
||||
+ * Increment the event subscription's group lock.
|
||||
+ *
|
||||
+ * @param sub The server subscription instance.
|
||||
+ *
|
||||
+ * @return PJ_SUCCESS on success.
|
||||
+ */
|
||||
+PJ_DEF(pj_status_t) pjsip_evsub_add_ref(pjsip_evsub *sub);
|
||||
+
|
||||
+
|
||||
+/**
|
||||
+ * Decrement the event subscription's group lock.
|
||||
+ *
|
||||
+ * @param sub The server subscription instance.
|
||||
+ *
|
||||
+ * @return PJ_SUCCESS on success.
|
||||
+ */
|
||||
+PJ_DEF(pj_status_t) pjsip_evsub_dec_ref(pjsip_evsub *sub);
|
||||
+
|
||||
+
|
||||
|
||||
PJ_END_DECL
|
||||
|
||||
diff --git a/pjsip/src/pjsip-simple/evsub.c b/pjsip/src/pjsip-simple/evsub.c
|
||||
index 7cd8859..68a9564 100644
|
||||
--- a/pjsip/src/pjsip-simple/evsub.c
|
||||
+++ b/pjsip/src/pjsip-simple/evsub.c
|
||||
@@ -831,7 +831,21 @@ static pj_status_t evsub_create( pjsip_dialog *dlg,
|
||||
return PJ_SUCCESS;
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * Increment the event subscription's group lock.
|
||||
+ */
|
||||
+PJ_DEF(pj_status_t) pjsip_evsub_add_ref(pjsip_evsub *sub)
|
||||
+{
|
||||
+ return pj_grp_lock_add_ref(sub->grp_lock);
|
||||
+}
|
||||
|
||||
+/*
|
||||
+ * Decrement the event subscription's group lock.
|
||||
+ */
|
||||
+PJ_DEF(pj_status_t) pjsip_evsub_dec_ref(pjsip_evsub *sub)
|
||||
+{
|
||||
+ return pj_grp_lock_dec_ref(sub->grp_lock);
|
||||
+}
|
||||
|
||||
/*
|
||||
* Create client subscription session.
|
||||
--
|
||||
2.5.5
|
||||
|
@@ -1,48 +0,0 @@
|
||||
From b7cb93b0e1729589a71e8b30d9a9893f0918e2a2 Mon Sep 17 00:00:00 2001
|
||||
From: George Joseph <george.joseph@fairview5.com>
|
||||
Date: Mon, 30 May 2016 11:58:22 -0600
|
||||
Subject: [PATCH] sip_transport_tcp/tls: Set factory on transports created
|
||||
from accept
|
||||
|
||||
The ability to re-use tcp and tls transports when a factory is
|
||||
specified now depends on transport->factory being set which is a new field
|
||||
in 2.5. This was being set only on new outgoing sockets not on
|
||||
incoming sockets. The result was that a client REGISTER created a new
|
||||
socket but without the factory set, the next outgoing request to the
|
||||
client, OPTIONS, INVITE, etc, would attempt to create another socket
|
||||
which the client would refuse.
|
||||
|
||||
This patch sets the factory on transports created as a result of an
|
||||
accept.
|
||||
---
|
||||
pjsip/src/pjsip/sip_transport_tcp.c | 1 +
|
||||
pjsip/src/pjsip/sip_transport_tls.c | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/pjsip/src/pjsip/sip_transport_tcp.c b/pjsip/src/pjsip/sip_transport_tcp.c
|
||||
index 1bbb324..00eb8fc 100644
|
||||
--- a/pjsip/src/pjsip/sip_transport_tcp.c
|
||||
+++ b/pjsip/src/pjsip/sip_transport_tcp.c
|
||||
@@ -713,6 +713,7 @@ static pj_status_t tcp_create( struct tcp_listener *listener,
|
||||
tcp->base.send_msg = &tcp_send_msg;
|
||||
tcp->base.do_shutdown = &tcp_shutdown;
|
||||
tcp->base.destroy = &tcp_destroy_transport;
|
||||
+ tcp->base.factory = &listener->factory;
|
||||
|
||||
/* Create group lock */
|
||||
status = pj_grp_lock_create(pool, NULL, &tcp->grp_lock);
|
||||
diff --git a/pjsip/src/pjsip/sip_transport_tls.c b/pjsip/src/pjsip/sip_transport_tls.c
|
||||
index a83ac32..36ee70d 100644
|
||||
--- a/pjsip/src/pjsip/sip_transport_tls.c
|
||||
+++ b/pjsip/src/pjsip/sip_transport_tls.c
|
||||
@@ -742,6 +742,7 @@ static pj_status_t tls_create( struct tls_listener *listener,
|
||||
tls->base.send_msg = &tls_send_msg;
|
||||
tls->base.do_shutdown = &tls_shutdown;
|
||||
tls->base.destroy = &tls_destroy_transport;
|
||||
+ tls->base.factory = &listener->factory;
|
||||
|
||||
tls->ssock = ssock;
|
||||
|
||||
--
|
||||
2.5.5
|
||||
|
56
third-party/pjproject/patches/0002-Fix-1946-Avoid-deinitialization-of-uninitialized-cli.patch
vendored
Normal file
56
third-party/pjproject/patches/0002-Fix-1946-Avoid-deinitialization-of-uninitialized-cli.patch
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
From 33fd755e819dc85a96718abc0ae26a9b46f14800 Mon Sep 17 00:00:00 2001
|
||||
From: nanang <nanang@localhost>
|
||||
Date: Thu, 28 Jul 2016 08:21:45 +0000
|
||||
Subject: [PATCH 2/3] Fix #1946: Avoid deinitialization of uninitialized client
|
||||
auth session.
|
||||
|
||||
---
|
||||
pjsip/src/pjsip/sip_dialog.c | 18 ++++++------------
|
||||
1 file changed, 6 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/pjsip/src/pjsip/sip_dialog.c b/pjsip/src/pjsip/sip_dialog.c
|
||||
index f03885d..421ddc4 100644
|
||||
--- a/pjsip/src/pjsip/sip_dialog.c
|
||||
+++ b/pjsip/src/pjsip/sip_dialog.c
|
||||
@@ -92,6 +92,12 @@ static pj_status_t create_dialog( pjsip_user_agent *ua,
|
||||
pj_list_init(&dlg->inv_hdr);
|
||||
pj_list_init(&dlg->rem_cap_hdr);
|
||||
|
||||
+ /* Init client authentication session. */
|
||||
+ status = pjsip_auth_clt_init(&dlg->auth_sess, dlg->endpt,
|
||||
+ dlg->pool, 0);
|
||||
+ if (status != PJ_SUCCESS)
|
||||
+ goto on_error;
|
||||
+
|
||||
status = pj_mutex_create_recursive(pool, dlg->obj_name, &dlg->mutex_);
|
||||
if (status != PJ_SUCCESS)
|
||||
goto on_error;
|
||||
@@ -283,12 +289,6 @@ PJ_DEF(pj_status_t) pjsip_dlg_create_uac( pjsip_user_agent *ua,
|
||||
/* Initial route set is empty. */
|
||||
pj_list_init(&dlg->route_set);
|
||||
|
||||
- /* Init client authentication session. */
|
||||
- status = pjsip_auth_clt_init(&dlg->auth_sess, dlg->endpt,
|
||||
- dlg->pool, 0);
|
||||
- if (status != PJ_SUCCESS)
|
||||
- goto on_error;
|
||||
-
|
||||
/* Register this dialog to user agent. */
|
||||
status = pjsip_ua_register_dlg( ua, dlg );
|
||||
if (status != PJ_SUCCESS)
|
||||
@@ -506,12 +506,6 @@ pj_status_t create_uas_dialog( pjsip_user_agent *ua,
|
||||
}
|
||||
dlg->route_set_frozen = PJ_TRUE;
|
||||
|
||||
- /* Init client authentication session. */
|
||||
- status = pjsip_auth_clt_init(&dlg->auth_sess, dlg->endpt,
|
||||
- dlg->pool, 0);
|
||||
- if (status != PJ_SUCCESS)
|
||||
- goto on_error;
|
||||
-
|
||||
/* Increment the dialog's lock since tsx may cause the dialog to be
|
||||
* destroyed prematurely (such as in case of transport error).
|
||||
*/
|
||||
--
|
||||
2.7.4
|
||||
|
2
third-party/pjproject/patches/config_site.h
vendored
2
third-party/pjproject/patches/config_site.h
vendored
@@ -19,7 +19,7 @@
|
||||
#define PJ_SCANNER_USE_BITWISE 0
|
||||
#define PJ_OS_HAS_CHECK_STACK 0
|
||||
#define PJ_LOG_MAX_LEVEL 3
|
||||
#define PJ_ENABLE_EXTRA_CHECK 0
|
||||
#define PJ_ENABLE_EXTRA_CHECK 1
|
||||
#define PJSIP_MAX_TSX_COUNT ((64*1024)-1)
|
||||
#define PJSIP_MAX_DIALOG_COUNT ((64*1024)-1)
|
||||
#define PJSIP_UDP_SO_SNDBUF_SIZE (512*1024)
|
||||
|
2
third-party/versions.mak
vendored
2
third-party/versions.mak
vendored
@@ -1,2 +1,2 @@
|
||||
|
||||
PJPROJECT_VERSION = 2.5
|
||||
PJPROJECT_VERSION = 2.5.5
|
||||
|
Reference in New Issue
Block a user