Compare commits

...

8 Commits

Author SHA1 Message Date
Asterisk Development Team
03762290c4 Update for 16.7.0-rc2 2019-12-18 10:50:32 -05:00
Friendly Automation
8cc89c98a7 Merge "Revert "chan_dahdi: set CHANNEL(hangupsource) when a PRI channel hangs up"" into 16.7 2019-12-18 09:37:23 -06:00
George Joseph
c8720cf153 Revert "chan_dahdi: set CHANNEL(hangupsource) when a PRI channel hangs up"
There are reports that this commit causes deadlocks when issuing
a "pri show" CLI command and a channel is in the process of being
hung up.  Further work is in progress to determine the cause of
the deadlock and provide a permanent fix.

ASTERISK~28605  #keeping open
Reported by: Dirk Wendland

This reverts commit c6b17b5212.

Change-Id: Iddd900c1abdd5074ff39c17cdce855f2f436cef9
2019-12-18 07:39:06 -07:00
George Joseph
e3038c3629 res_rtp_asterisk: Add frame list cleanups to ast_rtp_read
In Asterisk 16+, there are a few places in ast_rtp_read where we've
allocated a frame list but return a null frame instead of the list.
In these cases, any frames left in the list won't be freed.  In the
vast majority of the cases, the list is empty when we return so
there's nothing to free but there have been leaks reported in the
wild that can be traced back to frames left in the list before
returning.

The escape paths now all have logic to free frames left in the
list.

ASTERISK-28609
Reported by: Ted G

Change-Id: Ia1d7075857ebd26b47183c44b1aebb0d8f985f7a
2019-12-18 08:04:53 -06:00
Friendly Automation
1cb7dd49a7 Merge "configure: Add check for MySQL client bool and my_bool type usage." into 16.7 2019-12-18 06:57:45 -06:00
Joshua C. Colp
f4ac2c5cef configure: Add check for MySQL client bool and my_bool type usage.
Instead of trying to use the defined MySQL client version from the
header use a configure check to determine whether the bool or my_bool
type should be used for defining a boolean.

ASTERISK-28604

Change-Id: Id2225b3785115de074c50c123ff1a68005b4a9c7
2019-12-16 10:35:57 -06:00
Joshua C. Colp
ef0bca0a05 res_pjsip_session: Set stream state on created streams for incoming SDP.
A previous review, 13174, made a change whereby on an incoming offer SDP
the pending topology was initialized to the configured. This caused a problem
for bundle with WebRTC where bundle could reference a stream that did not
actually exist if the configuration had both audio and video but the
offer SDP only contained audio.

This change undoes that review and instead fixes the original problem it
sought to solve by setting the state of created streams based on the
contents of the offer SDP. This way the stream state is not inactive
until negotiation later completes.

ASTERISK-28659

Change-Id: Ic5ae5a86437d3e686ac5afd91d133cc916198355
2019-12-16 05:24:03 -06:00
Asterisk Development Team
0aa75cd2cb Update for 16.7.0-rc1 2019-12-12 06:18:24 -05:00
18 changed files with 89913 additions and 31 deletions

1
.lastclean Normal file
View File

@@ -0,0 +1 @@
40

1
.version Normal file
View File

@@ -0,0 +1 @@
16.7.0-rc2

86839
ChangeLog Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -173,9 +173,9 @@ static int mysql_log(struct ast_cdr *cdr)
{
struct ast_str *sql1 = ast_str_thread_get(&sql1_buf, 1024), *sql2 = ast_str_thread_get(&sql2_buf, 1024);
int retries = 5;
#if MYSQL_VERSION_ID >= 80001
#ifdef HAVE_MYSQLCLIENT_BOOL
bool my_bool_true = 1;
#elif MYSQL_VERSION_ID >= 50013
#elif HAVE_MYSQLCLIENT_MY_BOOL
my_bool my_bool_true = 1;
#endif
@@ -470,9 +470,9 @@ static int my_connect_db(struct ast_config *cfg)
MYSQL_ROW row;
MYSQL_RES *result;
char sqldesc[128];
#if MYSQL_VERSION_ID >= 80001
#ifdef HAVE_MYSQLCLIENT_BOOL
bool my_bool_true = 1;
#elif MYSQL_VERSION_ID >= 50013
#elif HAVE_MYSQLCLIENT_MY_BOOL
my_bool my_bool_true = 1;
#endif

View File

@@ -0,0 +1,28 @@
<!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-16.7.0-rc2</title><h1 align="center"><a name="top">Release Summary</a></h1><h3 align="center">asterisk-16.7.0-rc2</h3><h3 align="center">Date: 2019-12-18</h3><h3 align="center">&lt;asteriskteam@digium.com&gt;</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 release is a point release of an existing major version. The changes included were made to address problems that have been identified in this release series, or are minor, backwards compatible new features or improvements. Users should be able to safely upgrade to this version if this release series is already in use. Users considering upgrading from a previous version are strongly encouraged to review the UPGRADE.txt document as well as the CHANGES document for information about upgrading to this release series.</p><p>The data in this summary reflects changes that have been made since the previous release, asterisk-16.7.0-rc1.</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%">2 Joshua C. Colp <jcolp@sangoma.com><br/>2 George Joseph <gjoseph@digium.com><br/></td><td width="33%"><td width="33%">1 nappsoft <infos@nappsoft.ch><br/>1 Ted G <tgwaste@gmail.com><br/>1 Ted G<br/>1 George Joseph <gjoseph@digium.com><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: Applications/app_meetme</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-28604">ASTERISK-28604</a>: app_meetme, chan_ooh323 and cdr_mysql don't build on 17.0.0<br/>Reported by: George Joseph<ul>
<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=f4ac2c5cef64f95e4c1ef8923c1202657c9743ac">[f4ac2c5cef]</a> Joshua C. Colp -- configure: Add check for MySQL client bool and my_bool type usage.</li>
</ul><br><h4>Category: General</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-28609">ASTERISK-28609</a>: Memory Leak in res_rtp_asterisk.c<br/>Reported by: Ted G<ul>
<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=e3038c3629344b42fa4d19a743ba35d37bc53959">[e3038c3629]</a> George Joseph -- res_rtp_asterisk: Add frame list cleanups to ast_rtp_read</li>
</ul><br><h4>Category: Resources/res_pjsip_sdp_rtp</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-28659">ASTERISK-28659</a>: res_pjsip_sdp_rtp: Bundle includes non-existent media stream if codecs create additional streams and offer does not have them<br/>Reported by: nappsoft<ul>
<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=ef0bca0a05f48a986a71b535e2631dc1240a3c7f">[ef0bca0a05]</a> Joshua C. Colp -- res_pjsip_session: Set stream state on created streams for incoming SDP.</li>
</ul><br><h4>Category: Resources/res_pjsip_session</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-28659">ASTERISK-28659</a>: res_pjsip_sdp_rtp: Bundle includes non-existent media stream if codecs create additional streams and offer does not have them<br/>Reported by: nappsoft<ul>
<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=ef0bca0a05f48a986a71b535e2631dc1240a3c7f">[ef0bca0a05]</a> Joshua C. Colp -- res_pjsip_session: Set stream state on created streams for incoming SDP.</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=c8720cf15361f649e79b75e00839267651a07094">c8720cf153</a></td><td>George Joseph</td><td>Revert "chan_dahdi: set CHANNEL(hangupsource) when a PRI channel hangs up"</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>addons/cdr_mysql.c | 8 +--
channels/sig_pri.c | 17 +-------
configure | 82 ++++++++++++++++++++++++++++++++++++---
configure.ac | 20 +++++++++
include/asterisk/autoconfig.h.in | 6 ++
res/res_pjsip_session.c | 20 +++++++++
res/res_rtp_asterisk.c | 2
7 files changed, 129 insertions(+), 26 deletions(-)</pre><br></html>

View File

@@ -0,0 +1,133 @@
Release Summary
asterisk-16.7.0-rc2
Date: 2019-12-18
<asteriskteam@digium.com>
----------------------------------------------------------------------
Table of Contents
1. Summary
2. Contributors
3. Closed Issues
4. Other Changes
5. Diffstat
----------------------------------------------------------------------
Summary
[Back to Top]
This release is a point release of an existing major version. The changes
included were made to address problems that have been identified in this
release series, or are minor, backwards compatible new features or
improvements. Users should be able to safely upgrade to this version if
this release series is already in use. Users considering upgrading from a
previous version are strongly encouraged to review the UPGRADE.txt
document as well as the CHANGES document for information about upgrading
to this release series.
The data in this summary reflects changes that have been made since the
previous release, asterisk-16.7.0-rc1.
----------------------------------------------------------------------
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
2 Joshua C. Colp 1 nappsoft
2 George Joseph 1 Ted G
1 Ted G
1 George Joseph
----------------------------------------------------------------------
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: Applications/app_meetme
ASTERISK-28604: app_meetme, chan_ooh323 and cdr_mysql don't build on
17.0.0
Reported by: George Joseph
* [f4ac2c5cef] Joshua C. Colp -- configure: Add check for MySQL client
bool and my_bool type usage.
Category: General
ASTERISK-28609: Memory Leak in res_rtp_asterisk.c
Reported by: Ted G
* [e3038c3629] George Joseph -- res_rtp_asterisk: Add frame list
cleanups to ast_rtp_read
Category: Resources/res_pjsip_sdp_rtp
ASTERISK-28659: res_pjsip_sdp_rtp: Bundle includes non-existent media
stream if codecs create additional streams and offer does not have them
Reported by: nappsoft
* [ef0bca0a05] Joshua C. Colp -- res_pjsip_session: Set stream state on
created streams for incoming SDP.
Category: Resources/res_pjsip_session
ASTERISK-28659: res_pjsip_sdp_rtp: Bundle includes non-existent media
stream if codecs create additional streams and offer does not have them
Reported by: nappsoft
* [ef0bca0a05] Joshua C. Colp -- res_pjsip_session: Set stream state on
created streams for incoming SDP.
----------------------------------------------------------------------
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 |
|------------+---------------+-------------------------------------------|
| | | Revert "chan_dahdi: set |
| c8720cf153 | George Joseph | CHANNEL(hangupsource) when a PRI channel |
| | | hangs up" |
+------------------------------------------------------------------------+
----------------------------------------------------------------------
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.
addons/cdr_mysql.c | 8 +--
channels/sig_pri.c | 17 +-------
configure | 82 ++++++++++++++++++++++++++++++++++++---
configure.ac | 20 +++++++++
include/asterisk/autoconfig.h.in | 6 ++
res/res_pjsip_session.c | 20 +++++++++
res/res_rtp_asterisk.c | 2
7 files changed, 129 insertions(+), 26 deletions(-)

View File

@@ -1391,25 +1391,14 @@ static void pri_queue_control(struct sig_pri_span *pri, int chanpos, int subclas
*/
static void sig_pri_queue_hangup(struct sig_pri_span *pri, int chanpos)
{
struct ast_channel *owner;
if (sig_pri_callbacks.queue_control) {
sig_pri_callbacks.queue_control(pri->pvts[chanpos]->chan_pvt, AST_CONTROL_HANGUP);
}
sig_pri_lock_owner(pri, chanpos);
owner = pri->pvts[chanpos]->owner;
if (owner) {
ao2_ref(owner, +1);
ast_queue_hangup(owner);
ast_channel_unlock(owner);
/* Tell the CDR this DAHDI channel hung up */
sig_pri_unlock_private(pri->pvts[chanpos]);
ast_set_hangupsource(owner, ast_channel_name(owner), 0);
sig_pri_lock_private(pri->pvts[chanpos]);
ao2_ref(owner, -1);
if (pri->pvts[chanpos]->owner) {
ast_queue_hangup(pri->pvts[chanpos]->owner);
ast_channel_unlock(pri->pvts[chanpos]->owner);
}
}

82
configure vendored
View File

@@ -1342,6 +1342,7 @@ infodir
docdir
oldincludedir
includedir
runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -1530,6 +1531,7 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1782,6 +1784,15 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
-runstatedir | --runstatedir | --runstatedi | --runstated \
| --runstate | --runstat | --runsta | --runst | --runs \
| --run | --ru | --r)
ac_prev=runstatedir ;;
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
| --run=* | --ru=* | --r=*)
runstatedir=$ac_optarg ;;
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1919,7 +1930,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
libdir localedir mandir
libdir localedir mandir runstatedir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -2072,6 +2083,7 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -14908,7 +14920,7 @@ else
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -14954,7 +14966,7 @@ else
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -14978,7 +14990,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -15023,7 +15035,7 @@ else
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -15047,7 +15059,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
We can't simply define LARGE_OFF_T to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
@@ -16347,6 +16359,8 @@ main ()
if (*(data + i) != *(data3 + i))
return 14;
close (fd);
free (data);
free (data3);
return 0;
}
_ACEOF
@@ -22920,6 +22934,7 @@ fi
fi
if test "x${PBX_MYSQLCLIENT}" != "x1" -a "${USE_MYSQLCLIENT}" != "no"; then
PBX_MYSQLCLIENT=0
if test -n "$ac_tool_prefix"; then
@@ -23039,6 +23054,61 @@ $as_echo "#define HAVE_MYSQLCLIENT 1" >>confdefs.h
fi
if test "${PBX_MYSQLCLIENT}" = 1; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MySQL client bool support" >&5
$as_echo_n "checking for MySQL client bool support... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <mysql/mysql.h>
int
main ()
{
bool test = 1;
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
$as_echo "#define HAVE_MYSQLCLIENT_BOOL 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_exeext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MySQL client my_bool support" >&5
$as_echo_n "checking for MySQL client my_bool support... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <mysql/mysql.h>
int
main ()
{
my_bool test = 1;
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
$as_echo "#define HAVE_MYSQLCLIENT_MY_BOOL 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_exeext conftest.$ac_ext
fi
if test "x${PBX_NBS}" != "x1" -a "${USE_NBS}" != "no"; then
pbxlibdir=""

View File

@@ -2277,8 +2277,28 @@ if test "${PBX_MISDN}" = 1; then
AC_CHECK_MEMBER([Q931_info_t.redirect_dn], [], [PBX_MISDN=0], [#include <mISDNuser/mISDNlib.h>])
fi
AST_EXT_TOOL_CHECK([MYSQLCLIENT], [mysql_config])
if test "${PBX_MYSQLCLIENT}" = 1; then
AC_MSG_CHECKING(for MySQL client bool support)
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([#include <mysql/mysql.h>],
[bool test = 1;])],
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_MYSQLCLIENT_BOOL, 1, [Define to 1 if mysql/mysql.h has bool defined.]),
AC_MSG_RESULT(no)
)
AC_MSG_CHECKING(for MySQL client my_bool support)
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([#include <mysql/mysql.h>],
[my_bool test = 1;])],
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_MYSQLCLIENT_MY_BOOL, 1, [Define to 1 if mysql/mysql.h has my_bool defined.]),
AC_MSG_RESULT(no)
)
fi
AST_EXT_LIB_CHECK([NBS], [nbs], [nbs_connect], [nbs.h])
AST_EXT_TOOL_CHECK([NEON], [neon-config])

View File

@@ -0,0 +1,41 @@
CREATE TABLE alembic_version (
version_num VARCHAR(32) NOT NULL,
CONSTRAINT alembic_version_pkc PRIMARY KEY (version_num)
);
-- 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';

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,35 @@
CREATE TABLE alembic_version (
version_num VARCHAR(32) NOT NULL,
CONSTRAINT alembic_version_pkc PRIMARY KEY (version_num)
);
-- 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';

View File

@@ -0,0 +1,45 @@
BEGIN;
CREATE TABLE alembic_version (
version_num VARCHAR(32) NOT NULL,
CONSTRAINT alembic_version_pkc PRIMARY KEY (version_num)
);
-- 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;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,39 @@
BEGIN;
CREATE TABLE alembic_version (
version_num VARCHAR(32) NOT NULL,
CONSTRAINT alembic_version_pkc PRIMARY KEY (version_num)
);
-- 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;

View File

@@ -537,6 +537,12 @@
/* Define if your system has the MYSQLCLIENT libraries. */
#undef HAVE_MYSQLCLIENT
/* Define to 1 if mysql/mysql.h has bool defined. */
#undef HAVE_MYSQLCLIENT_BOOL
/* Define to 1 if mysql/mysql.h has my_bool defined. */
#undef HAVE_MYSQLCLIENT_MY_BOOL
/* Define to 1 if you have the Network Broadcast Sound library. */
#undef HAVE_NBS

View File

@@ -712,7 +712,7 @@ static int handle_incoming_sdp(struct ast_sip_session *session, const pjmedia_sd
/* It is possible for SDP deferral to have already created a pending topology */
if (!session->pending_media_state->topology) {
session->pending_media_state->topology = ast_stream_topology_clone(session->endpoint->media.topology);
session->pending_media_state->topology = ast_stream_topology_alloc();
if (!session->pending_media_state->topology) {
return -1;
}
@@ -753,6 +753,24 @@ static int handle_incoming_sdp(struct ast_sip_session *session, const pjmedia_sd
ast_stream_free(stream);
return -1;
}
/* For backwards compatibility with the core default streams are always sendrecv */
if (!ast_sip_session_is_pending_stream_default(session, stream)) {
if (pjmedia_sdp_media_find_attr2(remote_stream, "sendonly", NULL)) {
/* Stream state reflects our state of a stream, so in the case of
* sendonly and recvonly we store the opposite since that is what ours
* is.
*/
ast_stream_set_state(stream, AST_STREAM_STATE_RECVONLY);
} else if (pjmedia_sdp_media_find_attr2(remote_stream, "recvonly", NULL)) {
ast_stream_set_state(stream, AST_STREAM_STATE_SENDONLY);
} else if (pjmedia_sdp_media_find_attr2(remote_stream, "inactive", NULL)) {
ast_stream_set_state(stream, AST_STREAM_STATE_INACTIVE);
} else {
ast_stream_set_state(stream, AST_STREAM_STATE_SENDRECV);
}
} else {
ast_stream_set_state(stream, AST_STREAM_STATE_SENDRECV);
}
}
session_media = ast_sip_session_media_state_add(session, session->pending_media_state, ast_media_type_from_str(media), i);

View File

@@ -7561,7 +7561,9 @@ static struct ast_frame *ast_rtp_read(struct ast_rtp_instance *instance, int rtc
if (!rtp->recv_buffer) {
/* If there is no receive buffer then we can pass back the frame directly */
return ast_rtp_interpret(instance, srtp, &addr, read_area, res, prev_seqno);
frame = ast_rtp_interpret(instance, srtp, &addr, read_area, res, prev_seqno);
AST_LIST_INSERT_TAIL(&frames, frame, frame_list);
return AST_LIST_FIRST(&frames);
} else if (rtp->expectedrxseqno == -1 || seqno == rtp->expectedrxseqno) {
rtp->expectedrxseqno = seqno + 1;
@@ -7569,7 +7571,9 @@ static struct ast_frame *ast_rtp_read(struct ast_rtp_instance *instance, int rtc
* return it directly without duplicating it.
*/
if (!ast_data_buffer_count(rtp->recv_buffer)) {
return ast_rtp_interpret(instance, srtp, &addr, read_area, res, prev_seqno);
frame = ast_rtp_interpret(instance, srtp, &addr, read_area, res, prev_seqno);
AST_LIST_INSERT_TAIL(&frames, frame, frame_list);
return AST_LIST_FIRST(&frames);
}
if (!AST_VECTOR_REMOVE_CMP_ORDERED(&rtp->missing_seqno, seqno, find_by_value,
@@ -7582,7 +7586,9 @@ static struct ast_frame *ast_rtp_read(struct ast_rtp_instance *instance, int rtc
* chance it will be overwritten.
*/
if (!ast_data_buffer_get(rtp->recv_buffer, seqno + 1)) {
return ast_rtp_interpret(instance, srtp, &addr, read_area, res, prev_seqno);
frame = ast_rtp_interpret(instance, srtp, &addr, read_area, res, prev_seqno);
AST_LIST_INSERT_TAIL(&frames, frame, frame_list);
return AST_LIST_FIRST(&frames);
}
/* Otherwise we need to dupe the frame so that the potential processing of frames placed after
@@ -7696,7 +7702,12 @@ static struct ast_frame *ast_rtp_read(struct ast_rtp_instance *instance, int rtc
AST_VECTOR_RESET(&rtp->missing_seqno, AST_VECTOR_ELEM_CLEANUP_NOOP);
return AST_LIST_FIRST(&frames);
} else if (seqno < rtp->expectedrxseqno) {
}
/* We're finished with the frames list */
ast_frame_free(AST_LIST_FIRST(&frames), 0);
if (seqno < rtp->expectedrxseqno) {
/* If this is a packet from the past then we have received a duplicate packet, so just drop it */
ast_debug(2, "Received an old packet with sequence number '%d' on RTP instance '%p', dropping it\n",
seqno, instance);
@@ -7807,8 +7818,6 @@ static struct ast_frame *ast_rtp_read(struct ast_rtp_instance *instance, int rtc
ast_rtcp_calculate_sr_rr_statistics(instance, rtcp_report, remote_address, ice, sr);
}
}
return &ast_null_frame;
}
return &ast_null_frame;