Compare commits

...

3 Commits

Author SHA1 Message Date
Asterisk Development Team
6fd94258f8 Update for 18.0.0-rc2 2020-10-13 11:24:42 -05:00
Joshua C. Colp
5cc4a391b3 res_pjsip: Adjust outgoing offer call pref.
This changes the outgoing offer call preference
default option to match the behavior of previous
versions of Asterisk.

The additional advanced codec negotiation options
have also been removed from the sample configuration
and marked as reserved for future functionality in
XML documentation.

The codec preference options have also been fixed to
enforce local codec configuration.

ASTERISK-29109

Change-Id: Iad19347bd5f3d89900c15ecddfebf5e20950a1c2
2020-10-13 09:43:03 -05:00
Asterisk Development Team
704cb88799 Update for 18.0.0-rc1 2020-09-09 10:43:27 -05:00
16 changed files with 95141 additions and 77 deletions

1
.lastclean Normal file
View File

@@ -0,0 +1 @@
40

1
.version Normal file
View File

@@ -0,0 +1 @@
18.0.0-rc2

92145
ChangeLog Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,15 @@
<!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-18.0.0-rc2</title><h1 align="center"><a name="top">Release Summary</a></h1><h3 align="center">asterisk-18.0.0-rc2</h3><h3 align="center">Date: 2020-10-13</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="#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-18.0.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%">1 Joshua C. Colp <jcolp@sangoma.com><br/></td><td width="33%"><td width="33%">1 Ross Beer <ross.beer@voicehost.co.uk><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: Resources/res_pjsip_session</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-29109">ASTERISK-29109</a>: res_pjsip_session: Asterisk 18 does not progress calls due to codec negotiation after upgrading from Asterisk 16<br/>Reported by: Ross Beer<ul>
<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=5cc4a391b3db21198178093f0c65550d5eabb7ec">[5cc4a391b3]</a> Joshua C. Colp -- res_pjsip: Adjust outgoing offer call pref.</li>
</ul><br><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>configs/samples/pjsip.conf.sample | 66 +++--------------------------
res/res_pjsip.c | 20 ++++----
res/res_pjsip/pjsip_configuration.c | 2
res/res_pjsip_session/pjsip_session_caps.c | 18 +++++--
4 files changed, 32 insertions(+), 74 deletions(-)</pre><br></html>

View File

@@ -0,0 +1,83 @@
Release Summary
asterisk-18.0.0-rc2
Date: 2020-10-13
<asteriskteam@digium.com>
----------------------------------------------------------------------
Table of Contents
1. Summary
2. Contributors
3. Closed Issues
4. 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-18.0.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
1 Joshua C. Colp 1 Ross Beer
----------------------------------------------------------------------
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: Resources/res_pjsip_session
ASTERISK-29109: res_pjsip_session: Asterisk 18 does not progress calls due
to codec negotiation after upgrading from Asterisk 16
Reported by: Ross Beer
* [5cc4a391b3] Joshua C. Colp -- res_pjsip: Adjust outgoing offer call
pref.
----------------------------------------------------------------------
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.
configs/samples/pjsip.conf.sample | 66 +++--------------------------
res/res_pjsip.c | 20 ++++----
res/res_pjsip/pjsip_configuration.c | 2
res/res_pjsip_session/pjsip_session_caps.c | 18 +++++--
4 files changed, 32 insertions(+), 74 deletions(-)

View File

@@ -828,69 +828,17 @@
; local - Include all codecs in the local list that
; are also in the remote list preserving the local
; order.
; local_merge - Include all codecs in BOTH lists
; preserving the local list order. Codes in the
; remote list not in the local list will be placed
; at the end of the joint list.
; local_merge - Include all codecs in the local list
; preserving the local order.
; local_first - Include only the first codec in the
; local list.
; remote - Include all codecs in the remote list that
; are also in the local list preserving remote list
; order. (default)
; remote_merge - Include all codecs in BOTH lists
; preserving the remote list order. Codes in the
; local list not in the remote list will be placed
; at the end of the joint list.
; remote_first - Include only the first codec in
; the remote list.
;codec_prefs_incoming_offer=; This is a string that describes how the codecs
; specified on an incoming SDP offer (pending) are
; reconciled with the codecs specified on an endpoint
; (configured) before being sent to the Asterisk core.
; The string actually specifies 4 name:value pair
; parameters separated by commas. Whitespace is
; ignored and they may be specified in any order.
; prefer: <pending | configured>,
; operation: <intersect | only_preferred
; | only_nonpreferred>,
; keep: <first | all>,
; transcode: <allow | prevent>
;codec_prefs_outgoing_offer=; This is a string that describes how the codecs
; specified in the topology that comes from the
; Asterisk core (pending) are reconciled with the
; codecs specified on an endpoint (configured)
; when sending an SDP offer.
; The string actually specifies 4 name:value pair
; parameters separated by commas. Whitespace is
; ignored and they may be specified in any order.
; prefer: <pending | configured>,
; operation: <intersect | union
; | only_preferred | only_nonpreferred>,
; keep: <first | all>,
; transcode: <allow | prevent>
;codec_prefs_incoming_answer=; This is a string that describes how the codecs
; specified in an incoming SDP answer (pending)
; are reconciled with the codecs specified on an
; endpoint (configured) when receiving an SDP
; answer.
; The string actually specifies 4 name:value pair
; parameters separated by commas. Whitespace is
; ignored and they may be specified in any order.
; prefer: <pending | configured>,
; operation: <intersect | union
; | only_preferred | only_nonpreferred>,
; keep: <first | all>
;codec_prefs_outgoing_answer=; This is a string that describes how the codecs
; that come from the core (pending) are reconciled
; with the codecs specified on an endpoint
; (configured) when sending an SDP answer.
; The string actually specifies 4 name:value pair
; parameters separated by commas. Whitespace is
; ignored and they may be specified in any order.
; prefer: <pending | configured>,
; operation: <intersect | union
; | only_preferred | only_nonpreferred>,
; keep: <first | all>
; order.
; remote_merge - Include all codecs in the local list
; preserving the remote list order. (default)
; remote_first - Include only the first codec in the
; remote list that is also in the local list.
;preferred_codec_only=no ; Respond to a SIP invite with the single most
; preferred codec rather than advertising all joint
; codec capabilities. This limits the other side's

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

@@ -111,6 +111,7 @@
on an endpoint (configured) before being sent to the Asterisk core.
The string actually specifies 4 <literal>name:value</literal> pair parameters
separated by commas. Whitespace is ignored and they may be specified in any order.
Note that this option is reserved for future functionality.
</para>
<para>
@@ -171,6 +172,7 @@
endpoint (configured) when sending an SDP offer.
The string actually specifies 4 <literal>name:value</literal> pair parameters
separated by commas. Whitespace is ignored and they may be specified in any order.
Note that this option is reserved for future functionality.
</para>
<para>
@@ -232,6 +234,8 @@
when receiving an SDP answer.
The string actually specifies 4 <literal>name:value</literal> pair parameters
separated by commas. Whitespace is ignored and they may be specified in any order.
Note that this option is reserved for future functionality.
</para>
<para>
Parameters:
@@ -288,6 +292,8 @@
when sending an SDP answer.
The string actually specifies 4 <literal>name:value</literal> pair parameters
separated by commas. Whitespace is ignored and they may be specified in any order.
Note that this option is reserved for future functionality.
</para>
<para>
Parameters:
@@ -1210,7 +1216,7 @@
</enumlist>
</description>
</configOption>
<configOption name="outgoing_call_offer_pref" default="local">
<configOption name="outgoing_call_offer_pref" default="remote_merge">
<synopsis>Preferences for selecting codecs for an outgoing call.</synopsis>
<description>
<para>Based on this setting, a joint list of preferred codecs between
@@ -1223,24 +1229,20 @@
preserving the local order.
</para></enum>
<enum name="local_merge"><para>
Include all codecs in BOTH lists preserving the local order.
Remote codecs not in the local list will be placed at the end
of the joint list.
Include all codecs in the local list preserving the local order.
</para></enum>
<enum name="local_first"><para>
Include only the first codec in the local list.
</para></enum>
<enum name="remote"><para>
Include all codecs in the remote list that are also in the local list
preserving the remote order. (default)
preserving the remote order.
</para></enum>
<enum name="remote_merge"><para>
Include all codecs in BOTH lists preserving the remote order.
Local codecs not in the remote list will be placed at the end
of the joint list.
Include all codecs in the local list preserving the remote order. (default)
</para></enum>
<enum name="remote_first"><para>
Include only the first codec in the remote list.
Include only the first codec in the remote list that is also in the local list.
</para></enum>
</enumlist>
</description>

View File

@@ -2137,7 +2137,7 @@ int ast_res_pjsip_initialize_configuration(void)
ast_sorcery_object_field_register(sip_sorcery, "endpoint", "ignore_183_without_sdp", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, ignore_183_without_sdp));
ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "incoming_call_offer_pref", "local",
call_offer_pref_handler, incoming_call_offer_pref_to_str, NULL, 0, 0);
ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "outgoing_call_offer_pref", "remote",
ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "outgoing_call_offer_pref", "remote_merge",
call_offer_pref_handler, outgoing_call_offer_pref_to_str, NULL, 0, 0);
ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "codec_prefs_incoming_offer",
"prefer: pending, operation: intersect, keep: all, transcode: allow",

View File

@@ -68,34 +68,43 @@ struct ast_format_cap *ast_sip_create_joint_call_cap(const struct ast_format_cap
{
struct ast_format_cap *joint = ast_format_cap_alloc(AST_FORMAT_CAP_FLAG_DEFAULT);
struct ast_format_cap *local_filtered = ast_format_cap_alloc(AST_FORMAT_CAP_FLAG_DEFAULT);
struct ast_format_cap *remote_filtered = ast_format_cap_alloc(AST_FORMAT_CAP_FLAG_DEFAULT);
if (!joint || !local_filtered) {
if (!joint || !local_filtered || !remote_filtered) {
ast_log(LOG_ERROR, "Failed to allocate %s call offer capabilities\n",
ast_codec_media_type2str(media_type));
ao2_cleanup(joint);
ao2_cleanup(local_filtered);
ao2_cleanup(remote_filtered);
return NULL;
}
ast_format_cap_append_from_cap(local_filtered, local, media_type);
/* Remote should always be a subset of local, as local is what defines the underlying
* permitted formats.
*/
ast_format_cap_get_compatible(remote, local_filtered, remote_filtered);
if (ast_sip_call_codec_pref_test(codec_pref, LOCAL)) {
if (ast_sip_call_codec_pref_test(codec_pref, INTERSECT)) {
ast_format_cap_get_compatible(local_filtered, remote, joint); /* Get common, prefer local */
ast_format_cap_get_compatible(local_filtered, remote_filtered, joint); /* Get common, prefer local */
} else {
ast_format_cap_append_from_cap(joint, local_filtered, media_type); /* Add local */
ast_format_cap_append_from_cap(joint, remote, media_type); /* Then remote */
ast_format_cap_append_from_cap(joint, remote_filtered, media_type); /* Then remote */
}
} else {
if (ast_sip_call_codec_pref_test(codec_pref, INTERSECT)) {
ast_format_cap_get_compatible(remote, local_filtered, joint); /* Get common, prefer remote */
joint = remote_filtered; /* Get common, prefer remote - as was done when filtering initially */
remote_filtered = NULL;
} else {
ast_format_cap_append_from_cap(joint, remote, media_type); /* Add remote */
ast_format_cap_append_from_cap(joint, remote_filtered, media_type); /* Add remote */
ast_format_cap_append_from_cap(joint, local_filtered, media_type); /* Then local */
}
}
ao2_ref(local_filtered, -1);
ao2_cleanup(remote_filtered);
if (ast_format_cap_empty(joint)) {
return joint;

View File

@@ -147,11 +147,11 @@ AST_TEST_DEFINE(low_level)
ast_test_status_update(test, "Testing outgoing expected pass\n");
RUN_CREATE_JOINT("ulaw,alaw,g722", "g722,g729,alaw", "local", 1, "alaw,g722", AST_TEST_PASS);
RUN_CREATE_JOINT("ulaw,alaw,g722", "g722,g729,alaw", "local_first", 1, "alaw", AST_TEST_PASS);
RUN_CREATE_JOINT("ulaw,alaw,g722", "g722,g729,alaw", "local_merge", 1, "ulaw,alaw,g722,g729", AST_TEST_PASS);
RUN_CREATE_JOINT("ulaw,alaw,g722", "g722,g729,alaw", "local_merge", 1, "ulaw,alaw,g722", AST_TEST_PASS);
RUN_CREATE_JOINT("ulaw,alaw,g722", "g722,g729,alaw", "remote", 1, "g722,alaw", AST_TEST_PASS);
RUN_CREATE_JOINT("ulaw,alaw,g722", "g722,g729,alaw", "remote_first", 1, "g722", AST_TEST_PASS);
RUN_CREATE_JOINT("ulaw,alaw,g722", "g722,g729,alaw", "remote_merge", 1, "g722,g729,alaw,ulaw", AST_TEST_PASS);
RUN_CREATE_JOINT("!all", "g722,g729,alaw", "remote_merge", 1, "g722,g729,alaw", AST_TEST_PASS);
RUN_CREATE_JOINT("ulaw,alaw,g722", "g722,g729,alaw", "remote_merge", 1, "g722,alaw,ulaw", AST_TEST_PASS);
RUN_CREATE_JOINT("!all", "g722,g729,alaw", "remote_merge", 1, "nothing", AST_TEST_PASS);
return rc >= 1 ? AST_TEST_FAIL : AST_TEST_PASS;
}