mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-13 00:04:53 +00:00
Compare commits
6 Commits
20.16.0-rc
...
20.0.0
Author | SHA1 | Date | |
---|---|---|---|
|
c6c7103efa | ||
|
dfadc09bf5 | ||
|
e7dd8f5bcb | ||
|
ab9d57a3dd | ||
|
45f1fd30a7 | ||
|
687f394572 |
1
.lastclean
Normal file
1
.lastclean
Normal file
@@ -0,0 +1 @@
|
|||||||
|
40
|
1836
asterisk-20.0.0-summary.html
Normal file
1836
asterisk-20.0.0-summary.html
Normal file
File diff suppressed because one or more lines are too long
3804
asterisk-20.0.0-summary.txt
Normal file
3804
asterisk-20.0.0-summary.txt
Normal file
File diff suppressed because it is too large
Load Diff
41
contrib/realtime/mysql/mysql_cdr.sql
Normal file
41
contrib/realtime/mysql/mysql_cdr.sql
Normal 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';
|
||||||
|
|
1372
contrib/realtime/mysql/mysql_config.sql
Normal file
1372
contrib/realtime/mysql/mysql_config.sql
Normal file
File diff suppressed because it is too large
Load Diff
35
contrib/realtime/mysql/mysql_voicemail.sql
Normal file
35
contrib/realtime/mysql/mysql_voicemail.sql
Normal 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';
|
||||||
|
|
45
contrib/realtime/postgresql/postgresql_cdr.sql
Normal file
45
contrib/realtime/postgresql/postgresql_cdr.sql
Normal 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;
|
||||||
|
|
1488
contrib/realtime/postgresql/postgresql_config.sql
Normal file
1488
contrib/realtime/postgresql/postgresql_config.sql
Normal file
File diff suppressed because it is too large
Load Diff
39
contrib/realtime/postgresql/postgresql_voicemail.sql
Normal file
39
contrib/realtime/postgresql/postgresql_voicemail.sql
Normal 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;
|
||||||
|
|
11
main/test.c
11
main/test.c
@@ -316,9 +316,13 @@ void ast_test_set_result(struct ast_test *test, enum ast_test_result_state state
|
|||||||
void ast_test_capture_free(struct ast_test_capture *capture)
|
void ast_test_capture_free(struct ast_test_capture *capture)
|
||||||
{
|
{
|
||||||
if (capture) {
|
if (capture) {
|
||||||
free(capture->outbuf);
|
/*
|
||||||
|
* Need to use ast_std_free because this memory wasn't
|
||||||
|
* allocated by the astmm functions.
|
||||||
|
*/
|
||||||
|
ast_std_free(capture->outbuf);
|
||||||
capture->outbuf = NULL;
|
capture->outbuf = NULL;
|
||||||
free(capture->errbuf);
|
ast_std_free(capture->errbuf);
|
||||||
capture->errbuf = NULL;
|
capture->errbuf = NULL;
|
||||||
}
|
}
|
||||||
capture->pid = -1;
|
capture->pid = -1;
|
||||||
@@ -330,6 +334,7 @@ int ast_test_capture_command(struct ast_test_capture *capture, const char *file,
|
|||||||
int fd0[2] = { -1, -1 }, fd1[2] = { -1, -1 }, fd2[2] = { -1, -1 };
|
int fd0[2] = { -1, -1 }, fd1[2] = { -1, -1 }, fd2[2] = { -1, -1 };
|
||||||
pid_t pid = -1;
|
pid_t pid = -1;
|
||||||
int status = 0;
|
int status = 0;
|
||||||
|
FILE *cmd = NULL, *out = NULL, *err = NULL;
|
||||||
|
|
||||||
memset(capture, 0, sizeof(*capture));
|
memset(capture, 0, sizeof(*capture));
|
||||||
capture->pid = capture->exitcode = -1;
|
capture->pid = capture->exitcode = -1;
|
||||||
@@ -379,8 +384,6 @@ int ast_test_capture_command(struct ast_test_capture *capture, const char *file,
|
|||||||
exit(1);
|
exit(1);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
FILE *cmd = NULL, *out = NULL, *err = NULL;
|
|
||||||
|
|
||||||
char buf[BUFSIZ];
|
char buf[BUFSIZ];
|
||||||
int wstatus, n, nfds;
|
int wstatus, n, nfds;
|
||||||
fd_set readfds, writefds;
|
fd_set readfds, writefds;
|
||||||
|
@@ -187,7 +187,7 @@ static int geoloc_profile_apply_handler(const struct ast_sorcery *sorcery, void
|
|||||||
struct ast_geoloc_location *location;
|
struct ast_geoloc_location *location;
|
||||||
const char *id = ast_sorcery_object_get_id(profile);
|
const char *id = ast_sorcery_object_get_id(profile);
|
||||||
enum ast_geoloc_validate_result result;
|
enum ast_geoloc_validate_result result;
|
||||||
enum ast_geoloc_format format;
|
enum ast_geoloc_format format = AST_GEOLOC_FORMAT_NONE;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
if (!ast_strlen_zero(profile->location_reference)) {
|
if (!ast_strlen_zero(profile->location_reference)) {
|
||||||
|
@@ -145,7 +145,7 @@ static int handle_incoming_request(struct ast_sip_session *session, struct pjsip
|
|||||||
char *geoloc_routing_hdr_value = NULL;
|
char *geoloc_routing_hdr_value = NULL;
|
||||||
char *geoloc_uri = NULL;
|
char *geoloc_uri = NULL;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
RAII_VAR(struct ast_str *, buf, ast_str_create(1024), ast_free);
|
RAII_VAR(struct ast_str *, buf, NULL, ast_free);
|
||||||
pjsip_generic_string_hdr *geoloc_hdr = NULL;
|
pjsip_generic_string_hdr *geoloc_hdr = NULL;
|
||||||
pjsip_generic_string_hdr *geoloc_routing_hdr = NULL;
|
pjsip_generic_string_hdr *geoloc_routing_hdr = NULL;
|
||||||
SCOPE_ENTER(3, "%s\n", session_name);
|
SCOPE_ENTER(3, "%s\n", session_name);
|
||||||
@@ -191,7 +191,7 @@ static int handle_incoming_request(struct ast_sip_session *session, struct pjsip
|
|||||||
"Done.\n", session_name,
|
"Done.\n", session_name,
|
||||||
PJSTR_PRINTF_VAR(geoloc_hdr->hvalue));
|
PJSTR_PRINTF_VAR(geoloc_hdr->hvalue));
|
||||||
} else {
|
} else {
|
||||||
SCOPE_EXIT_LOG_RTN_VALUE(0, LOG_NOTICE, "%s: Endpoint has no geoloc_incoming_call_profile. "
|
SCOPE_EXIT_RTN_VALUE(0, "%s: Endpoint has no geoloc_incoming_call_profile. "
|
||||||
"Done.\n", session_name);
|
"Done.\n", session_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -209,6 +209,11 @@ static int handle_incoming_request(struct ast_sip_session *session, struct pjsip
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
buf = ast_str_create(1024);
|
||||||
|
if (!buf) {
|
||||||
|
SCOPE_EXIT_LOG_RTN_VALUE(0, LOG_WARNING, "%s: Unable to allocate buf\n", session_name);
|
||||||
|
}
|
||||||
|
|
||||||
if (config_profile->precedence != AST_GEOLOC_PRECED_DISCARD_CONFIG) {
|
if (config_profile->precedence != AST_GEOLOC_PRECED_DISCARD_CONFIG) {
|
||||||
config_eprofile = ast_geoloc_eprofile_create_from_profile(config_profile);
|
config_eprofile = ast_geoloc_eprofile_create_from_profile(config_profile);
|
||||||
if (!config_eprofile) {
|
if (!config_eprofile) {
|
||||||
@@ -469,7 +474,7 @@ static void handle_outgoing_request(struct ast_sip_session *session, struct pjsi
|
|||||||
RAII_VAR(struct ast_geoloc_eprofile *, config_eprofile, NULL, ao2_cleanup);
|
RAII_VAR(struct ast_geoloc_eprofile *, config_eprofile, NULL, ao2_cleanup);
|
||||||
RAII_VAR(struct ast_geoloc_eprofile *, incoming_eprofile, NULL, ao2_cleanup);
|
RAII_VAR(struct ast_geoloc_eprofile *, incoming_eprofile, NULL, ao2_cleanup);
|
||||||
struct ast_geoloc_eprofile *final_eprofile = NULL;
|
struct ast_geoloc_eprofile *final_eprofile = NULL;
|
||||||
RAII_VAR(struct ast_str *, buf, ast_str_create(1024), ast_free);
|
RAII_VAR(struct ast_str *, buf, NULL, ast_free);
|
||||||
struct ast_datastore *ds = NULL; /* The channel cleans up ds */
|
struct ast_datastore *ds = NULL; /* The channel cleans up ds */
|
||||||
pjsip_msg_body *orig_body = NULL;
|
pjsip_msg_body *orig_body = NULL;
|
||||||
pjsip_generic_string_hdr *geoloc_hdr = NULL;
|
pjsip_generic_string_hdr *geoloc_hdr = NULL;
|
||||||
@@ -478,11 +483,6 @@ static void handle_outgoing_request(struct ast_sip_session *session, struct pjsi
|
|||||||
const char *uri;
|
const char *uri;
|
||||||
SCOPE_ENTER(3, "%s\n", session_name);
|
SCOPE_ENTER(3, "%s\n", session_name);
|
||||||
|
|
||||||
if (!buf) {
|
|
||||||
SCOPE_EXIT_LOG_RTN(LOG_WARNING, "%s: Unable to allocate buf\n",
|
|
||||||
session_name);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!endpoint) {
|
if (!endpoint) {
|
||||||
SCOPE_EXIT_LOG_RTN(LOG_WARNING, "%s: Session has no endpoint. Skipping.\n",
|
SCOPE_EXIT_LOG_RTN(LOG_WARNING, "%s: Session has no endpoint. Skipping.\n",
|
||||||
session_name);
|
session_name);
|
||||||
@@ -494,8 +494,8 @@ static void handle_outgoing_request(struct ast_sip_session *session, struct pjsi
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ast_strlen_zero(endpoint->geoloc_outgoing_call_profile)) {
|
if (ast_strlen_zero(endpoint->geoloc_outgoing_call_profile)) {
|
||||||
SCOPE_EXIT_LOG_RTN(LOG_NOTICE, "%s: Endpoint has no geoloc_outgoing_call_profile. "
|
SCOPE_EXIT_RTN("%s: Endpoint has no geoloc_outgoing_call_profile. Skipping.\n",
|
||||||
"Skipping.\n", session_name);
|
session_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
config_profile = ast_geoloc_get_profile(endpoint->geoloc_outgoing_call_profile);
|
config_profile = ast_geoloc_get_profile(endpoint->geoloc_outgoing_call_profile);
|
||||||
@@ -578,6 +578,11 @@ static void handle_outgoing_request(struct ast_sip_session *session, struct pjsi
|
|||||||
ast_geoloc_eprofile_refresh_location(final_eprofile);
|
ast_geoloc_eprofile_refresh_location(final_eprofile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
buf = ast_str_create(1024);
|
||||||
|
if (!buf) {
|
||||||
|
SCOPE_EXIT_LOG_RTN(LOG_WARNING, "%s: Unable to allocate buf\n", session_name);
|
||||||
|
}
|
||||||
|
|
||||||
if (final_eprofile->format == AST_GEOLOC_FORMAT_URI) {
|
if (final_eprofile->format == AST_GEOLOC_FORMAT_URI) {
|
||||||
uri = ast_geoloc_eprofile_to_uri(final_eprofile, channel, &buf, session_name);
|
uri = ast_geoloc_eprofile_to_uri(final_eprofile, channel, &buf, session_name);
|
||||||
if (!uri) {
|
if (!uri) {
|
||||||
|
@@ -49,7 +49,7 @@ static const char *old_key_dir = NULL;
|
|||||||
|
|
||||||
static char *hexstring(const unsigned char *data, unsigned datalen)
|
static char *hexstring(const unsigned char *data, unsigned datalen)
|
||||||
{
|
{
|
||||||
char *buf = alloca(datalen * 2 + 1);
|
char *buf = ast_malloc(datalen * 2 + 1);
|
||||||
unsigned n;
|
unsigned n;
|
||||||
|
|
||||||
for (n = 0; n < datalen; ++n) {
|
for (n = 0; n < datalen; ++n) {
|
||||||
@@ -532,6 +532,7 @@ AST_TEST_DEFINE(crypto_aes_encrypt)
|
|||||||
res = AST_TEST_PASS;
|
res = AST_TEST_PASS;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
ast_free(args[KEY]);
|
||||||
ast_test_capture_free(&cap);
|
ast_test_capture_free(&cap);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@@ -610,6 +611,7 @@ AST_TEST_DEFINE(crypto_aes_decrypt)
|
|||||||
res = AST_TEST_PASS;
|
res = AST_TEST_PASS;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
ast_free(args[KEY]);
|
||||||
ast_test_capture_free(&cap);
|
ast_test_capture_free(&cap);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user