Compare commits

...

29 Commits

Author SHA1 Message Date
Kevin Harwell
fbdaade264 ChangeLog: Updated for 13.9.1 2016-05-13 12:41:41 -05:00
Kevin Harwell
13c495b43c Release summaries: Add summaries for 13.9.1 2016-05-13 12:41:40 -05:00
Kevin Harwell
1cff642773 Release summaries: Remove previous versions 2016-05-13 12:41:27 -05:00
Kevin Harwell
03be442bf0 .version: Update for 13.9.1 2016-05-13 12:41:27 -05:00
Kevin Harwell
ee94d92141 .lastclean: Update for 13.9.1 2016-05-13 12:41:27 -05:00
Kevin Harwell
05da780cc7 realtime: Add database scripts for 13.9.1 2016-05-13 12:41:27 -05:00
Joshua Colp
51b3d534d6 Merge "res_sorcery_astdb: Fix creation of retrieved objects." into 13.9 2016-05-12 19:16:50 -05:00
Mark Michelson
15c427c64d Use doubles instead of floats for conversions when comparing strings.
In 13.9.0, there was an issue where PJSIP contacts added to an AOR would
be deleted at seemingly random times.

One reason this was happening was because of an operation to retrieve
the contacts whose expiration time was less than or equal to the current
time. When retrieving existing contacts, the contact's expiration time
and the current time were converted from a string to a float, and those
two floats were compared.

On some systems, including mine, this conversion was horribly off. For
instance, I could regularly see the string "1463079214" get converted
into 1463079168.000000. When switching from using a float to using a
double, the conversion was as expected.

Why was the conversion to float off? My best guess is that the
conversion to float was attempting to store the entire value in the 23
bit significand of the IEEE-754 floating point number. In particular, if
you take only the 23 most significant bits of 1463079214, you get the
messed up 1463079168 that we were seeing in the conversion. It likely
was possible to get a more precise value by composing the number using
an exponent, but the conversion did not work that way. With a double,
you have a 52 bit significand, allowing the entire value to fit there,
and thereby allowing an accurate conversion.

ASTERISK-26007 #close
Reported by Greg Siemon

Change-Id: I83ca7944aae8b7cd994b254c78ec02411d321070
2016-05-12 15:24:46 -05:00
Mark Michelson
d27ee3b1bf res_sorcery_astdb: Fix creation of retrieved objects.
The contents of this commit come from a portion of commit
a01ce2b889 of the 13 branch.

The commit referenced above's main point was to introduce some
performance enhancements for realtime. However, mixed in with that was a
bug fix for sorcery's astdb backend. The astdb was using an empty
objectset to create an object.

This, combined with the floating point conversion bug, was what was
contributing to contacts being deleted early.

ASTERISK-26007 #close
Reported by Greg Siemon

Change-Id: I84594079356a6fb2d2f61d56bf644e5409925ee2
2016-05-12 15:18:51 -05:00
Joshua Colp
cc1106a06a ChangeLog: Updated for 13.9.0 2016-05-09 08:04:34 -05:00
Joshua Colp
3bb17c43b0 Release summaries: Add summaries for 13.9.0 2016-05-09 08:04:27 -05:00
Joshua Colp
549465b89a Release summaries: Remove previous versions 2016-05-09 08:01:46 -05:00
Joshua Colp
d805a1c1ab .version: Update for 13.9.0 2016-05-09 08:01:46 -05:00
Joshua Colp
7c2ff2c29f .lastclean: Update for 13.9.0 2016-05-09 08:01:46 -05:00
Joshua Colp
addd49f1a4 realtime: Add database scripts for 13.9.0 2016-05-09 08:01:46 -05:00
Joshua Colp
435c2a12d4 ChangeLog: Updated for 13.9.0-rc2 2016-05-03 07:22:00 -05:00
Joshua Colp
45b84418ac Release summaries: Add summaries for 13.9.0-rc2 2016-05-03 07:21:48 -05:00
Joshua Colp
0581fa02e5 Release summaries: Remove previous versions 2016-05-03 07:21:34 -05:00
Joshua Colp
31b9b476fc .version: Update for 13.9.0-rc2 2016-05-03 07:21:34 -05:00
Joshua Colp
b64d540059 .lastclean: Update for 13.9.0-rc2 2016-05-03 07:21:34 -05:00
Joshua Colp
a9467ce7d7 realtime: Add database scripts for 13.9.0-rc2 2016-05-03 07:21:33 -05:00
Joshua Colp
fa4e9947be Merge "pjproject_bundled: Disable PJSIP_UNESCAPE_IN_PLACE" into 13.9 2016-05-02 06:07:42 -05:00
Mark Michelson
b470aabb7b func_odbc: Check connection status before executing queries.
A recent change to func_odbc made it so that a single connection was
maintained per DSN. The problem was that the code was optimistic about
the health of the connection after initially opening it and did nothing
to re-connect in case the connection had died.

This change adds a check before executing a query to ensure that the
connection to the database is still up and running.

ASTERISK-25963 #close
Reported by Ross Beer

Change-Id: Id33c86eb04ff48ca088bb2e3086c27b3b683491d
(cherry picked from commit 677d5b5151)
2016-04-29 14:27:46 -05:00
George Joseph
e702b9fc40 pjproject_bundled: Disable PJSIP_UNESCAPE_IN_PLACE
When pjsip_parse_uri is called with PJSIP_UNESCAPE_IN_PLACE enabled,
the input uri string will become corrupted if it contains escape sequences.
It's not possible to automatically strdup or strdupa the input string because
the output uri pj_str_t's will have pointers to chunks of the input string.
Getting around this would require more memory management code and wouldn't
be worth the savings of doing the unescape in place.

ASTERISK-25970 #close
Reported-by: Dmitriy Serov

Change-Id: I28dc0e599b5108f7959b9c46dc8278371b372f88
2016-04-29 14:17:33 -05:00
Joshua Colp
0447d28fbd ChangeLog: Updated for 13.9.0-rc1 2016-04-25 16:44:00 -05:00
Joshua Colp
5237b7cd47 Release summaries: Add summaries for 13.9.0-rc1 2016-04-25 16:42:24 -05:00
Joshua Colp
5a3850ecba .version: Update for 13.9.0-rc1 2016-04-25 16:40:14 -05:00
Joshua Colp
60b39040e4 .lastclean: Update for 13.9.0-rc1 2016-04-25 16:40:14 -05:00
Joshua Colp
5078454464 realtime: Add database scripts for 13.9.0-rc1 2016-04-25 16:40:14 -05:00
21 changed files with 44156 additions and 11 deletions

1
.lastclean Normal file
View File

@@ -0,0 +1 @@
40

1
.version Normal file
View File

@@ -0,0 +1 @@
13.9.1

39203
ChangeLog Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,22 @@
<!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-13.9.1</title><h1 align="center"><a name="top">Release Summary</a></h1><h3 align="center">asterisk-13.9.1</h3><h3 align="center">Date: 2016-05-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="#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-13.9.0.</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%">4 Kevin Harwell <kharwell@digium.com><br/>2 Mark Michelson <mmichelson@digium.com><br/></td><td width="33%"><td width="33%">2 Greg Siemon <greg@siemon.id.au><br/>2 Greg Siemon<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</h4><a href="https://issues.asterisk.org/jira/browse/ASTERISK-26007">ASTERISK-26007</a>: res_pjsip: Endpoints deleting early after upgrade from 13.8.2 to 13.9<br/>Reported by: Greg Siemon<ul>
<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=15c427c64daffbbce082c1356d41244c46266bf6">[15c427c64d]</a> Mark Michelson -- Use doubles instead of floats for conversions when comparing strings.</li>
<li><a href="https://code.asterisk.org/code/changelog/asterisk?cs=d27ee3b1bf3553ca16aa1237252747b962473a0d">[d27ee3b1bf]</a> Mark Michelson -- res_sorcery_astdb: Fix creation of retrieved objects.</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=1cff642773f42a5e7555e03ad7f5b2968e67ae2f">1cff642773</a></td><td>Kevin Harwell</td><td>Release summaries: Remove previous versions</td></tr>
<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=03be442bf03bc6d06258c9e385b3bfc6284ab66a">03be442bf0</a></td><td>Kevin Harwell</td><td>.version: Update for 13.9.1</td></tr>
<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=ee94d92141b4a3af7cc8763c5add6570511064fd">ee94d92141</a></td><td>Kevin Harwell</td><td>.lastclean: Update for 13.9.1</td></tr>
<tr><td><a href="https://code.asterisk.org/code/changelog/asterisk?cs=05da780cc77d303dd2b84537eb936e8202c9bae3">05da780cc7</a></td><td>Kevin Harwell</td><td>realtime: Add database scripts for 13.9.1</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-13.9.0-summary.html | 333 -----------------
asterisk-13.9.0-summary.txt | 821 -------------------------------------------
b/.version | 2
3 files changed, 1 insertion(+), 1155 deletions(-)</pre><br></html>

111
asterisk-13.9.1-summary.txt Normal file
View File

@@ -0,0 +1,111 @@
Release Summary
asterisk-13.9.1
Date: 2016-05-13
<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-13.9.0.
----------------------------------------------------------------------
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
4 Kevin Harwell 2 Greg Siemon
2 Mark Michelson 2 Greg Siemon
----------------------------------------------------------------------
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
ASTERISK-26007: res_pjsip: Endpoints deleting early after upgrade from
13.8.2 to 13.9
Reported by: Greg Siemon
* [15c427c64d] Mark Michelson -- Use doubles instead of floats for
conversions when comparing strings.
* [d27ee3b1bf] Mark Michelson -- res_sorcery_astdb: Fix creation of
retrieved objects.
----------------------------------------------------------------------
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 |
|------------+---------------+-------------------------------------------|
| 1cff642773 | Kevin Harwell | Release summaries: Remove previous |
| | | versions |
|------------+---------------+-------------------------------------------|
| 03be442bf0 | Kevin Harwell | .version: Update for 13.9.1 |
|------------+---------------+-------------------------------------------|
| ee94d92141 | Kevin Harwell | .lastclean: Update for 13.9.1 |
|------------+---------------+-------------------------------------------|
| 05da780cc7 | Kevin Harwell | realtime: Add database scripts for 13.9.1 |
+------------------------------------------------------------------------+
----------------------------------------------------------------------
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-13.9.0-summary.html | 333 -----------------
asterisk-13.9.0-summary.txt | 821 -------------------------------------------
b/.version | 2
3 files changed, 1 insertion(+), 1155 deletions(-)

View File

@@ -0,0 +1,44 @@
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
COMMIT;
GO

File diff suppressed because it is too large Load Diff

View 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

View File

@@ -0,0 +1,32 @@
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');

View File

@@ -0,0 +1,841 @@
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, 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 -> eb88a14f2a
ALTER TABLE ps_endpoints ADD COLUMN media_encryption_optimistic ENUM('yes','no');
UPDATE alembic_version SET version_num='eb88a14f2a' WHERE alembic_version.version_num = '10aedae86a32';
-- Running upgrade eb88a14f2a -> 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 = 'eb88a14f2a';
-- Running upgrade 371a3bf4143e -> 45e3f47c6c44
ALTER TABLE ps_globals ADD COLUMN endpoint_identifier_order VARCHAR(40);
UPDATE alembic_version SET version_num='45e3f47c6c44' WHERE alembic_version.version_num = '371a3bf4143e';
-- 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 -> 189a235b3fd7
ALTER TABLE ps_globals ADD COLUMN keep_alive_interval INTEGER;
UPDATE alembic_version SET version_num='189a235b3fd7' WHERE alembic_version.version_num = '28ce1e718f05';
-- 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';

View 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';

View File

@@ -0,0 +1,38 @@
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')
/

File diff suppressed because it is too large Load Diff

View 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'
/

View File

@@ -0,0 +1,36 @@
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');
COMMIT;

View File

@@ -0,0 +1,913 @@
BEGIN;
CREATE TABLE alembic_version (
version_num VARCHAR(32) NOT NULL
);
-- Running upgrade -> 4da0c5f79a9c
CREATE TYPE type_values AS ENUM ('friend', 'user', 'peer');
CREATE TYPE sip_transport_values AS ENUM ('udp', 'tcp', 'tls', 'ws', 'wss', 'udp,tcp', 'tcp,udp');
CREATE TYPE sip_dtmfmode_values AS ENUM ('rfc2833', 'info', 'shortinfo', 'inband', 'auto');
CREATE TYPE sip_directmedia_values AS ENUM ('yes', 'no', 'nonat', 'update');
CREATE TYPE yes_no_values AS ENUM ('yes', 'no');
CREATE TYPE sip_progressinband_values AS ENUM ('yes', 'no', 'never');
CREATE TYPE sip_session_timers_values AS ENUM ('accept', 'refuse', 'originate');
CREATE TYPE sip_session_refresher_values AS ENUM ('uac', 'uas');
CREATE TYPE sip_callingpres_values AS ENUM ('allowed_not_screened', 'allowed_passed_screen', 'allowed_failed_screen', 'allowed', 'prohib_not_screened', 'prohib_passed_screen', 'prohib_failed_screen', 'prohib');
CREATE TABLE sippeers (
id SERIAL NOT NULL,
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 type_values,
context VARCHAR(40),
permit VARCHAR(95),
deny VARCHAR(95),
secret VARCHAR(40),
md5secret VARCHAR(40),
remotesecret VARCHAR(40),
transport sip_transport_values,
dtmfmode sip_dtmfmode_values,
directmedia sip_directmedia_values,
nat VARCHAR(29),
callgroup VARCHAR(40),
pickupgroup VARCHAR(40),
language VARCHAR(40),
disallow VARCHAR(200),
allow VARCHAR(200),
insecure VARCHAR(40),
trustrpid yes_no_values,
progressinband sip_progressinband_values,
promiscredir yes_no_values,
useclientcode yes_no_values,
accountcode VARCHAR(40),
setvar VARCHAR(200),
callerid VARCHAR(40),
amaflags VARCHAR(40),
callcounter yes_no_values,
busylevel INTEGER,
allowoverlap yes_no_values,
allowsubscribe yes_no_values,
videosupport yes_no_values,
maxcallbitrate INTEGER,
rfc2833compensate yes_no_values,
mailbox VARCHAR(40),
"session-timers" sip_session_timers_values,
"session-expires" INTEGER,
"session-minse" INTEGER,
"session-refresher" sip_session_refresher_values,
t38pt_usertpsource VARCHAR(40),
regexten VARCHAR(40),
fromdomain VARCHAR(40),
fromuser VARCHAR(40),
qualify VARCHAR(40),
defaultip VARCHAR(45),
rtptimeout INTEGER,
rtpholdtimeout INTEGER,
sendrpid yes_no_values,
outboundproxy VARCHAR(40),
callbackextension VARCHAR(40),
timert1 INTEGER,
timerb INTEGER,
qualifyfreq INTEGER,
constantssrc yes_no_values,
contactpermit VARCHAR(95),
contactdeny VARCHAR(95),
usereqphone yes_no_values,
textsupport yes_no_values,
faxdetect yes_no_values,
buggymwi yes_no_values,
auth VARCHAR(40),
fullname VARCHAR(40),
trunkname VARCHAR(40),
cid_number VARCHAR(40),
callingpres sip_callingpres_values,
mohinterpret VARCHAR(40),
mohsuggest VARCHAR(40),
parkinglot VARCHAR(40),
hasvoicemail yes_no_values,
subscribemwi yes_no_values,
vmexten VARCHAR(40),
autoframing yes_no_values,
rtpkeepalive INTEGER,
"call-limit" INTEGER,
g726nonstandard yes_no_values,
ignoresdpversion yes_no_values,
allowtransfer yes_no_values,
dynamic yes_no_values,
path VARCHAR(256),
supportpath yes_no_values,
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 TYPE iax_requirecalltoken_values AS ENUM ('yes', 'no', 'auto');
CREATE TYPE iax_encryption_values AS ENUM ('yes', 'no', 'aes128');
CREATE TYPE iax_transfer_values AS ENUM ('yes', 'no', 'mediaonly');
CREATE TABLE iaxfriends (
id SERIAL NOT NULL,
name VARCHAR(40) NOT NULL,
type type_values,
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 yes_no_values,
fullname VARCHAR(40),
trunk yes_no_values,
auth VARCHAR(20),
maxauthreq INTEGER,
requirecalltoken iax_requirecalltoken_values,
encryption iax_encryption_values,
transfer iax_transfer_values,
jitterbuffer yes_no_values,
forcejitterbuffer yes_no_values,
disallow VARCHAR(200),
allow VARCHAR(200),
codecpriority VARCHAR(40),
qualify VARCHAR(10),
qualifysmoothing yes_no_values,
qualifyfreqok VARCHAR(10),
qualifyfreqnotok VARCHAR(10),
timezone VARCHAR(20),
adsi yes_no_values,
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 SERIAL NOT NULL,
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 yes_no_values,
attachfmt VARCHAR(10),
serveremail VARCHAR(80),
language VARCHAR(20),
tz VARCHAR(30),
deletevoicemail yes_no_values,
saycid yes_no_values,
sendvoicemail yes_no_values,
review yes_no_values,
tempgreetwarn yes_no_values,
operator yes_no_values,
envelope yes_no_values,
sayduration INTEGER,
forcename yes_no_values,
forcegreetings yes_no_values,
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 TIMESTAMP WITHOUT TIME ZONE,
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 SERIAL NOT NULL,
confno VARCHAR(80) NOT NULL,
starttime TIMESTAMP WITHOUT TIME ZONE,
endtime TIMESTAMP WITHOUT TIME ZONE,
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 TYPE moh_mode_values AS ENUM ('custom', 'files', 'mp3nb', 'quietmp3nb', 'quietmp3');
CREATE TABLE musiconhold (
name VARCHAR(80) NOT NULL,
mode moh_mode_values,
directory VARCHAR(255),
application VARCHAR(255),
digit VARCHAR(1),
sort VARCHAR(10),
format VARCHAR(10),
stamp TIMESTAMP WITHOUT TIME ZONE,
PRIMARY KEY (name)
);
INSERT INTO alembic_version (version_num) VALUES ('4da0c5f79a9c');
-- Running upgrade 4da0c5f79a9c -> 43956d550a44
CREATE TYPE yesno_values AS ENUM ('yes', 'no');
CREATE TYPE pjsip_connected_line_method_values AS ENUM ('invite', 'reinvite', 'update');
CREATE TYPE pjsip_direct_media_glare_mitigation_values AS ENUM ('none', 'outgoing', 'incoming');
CREATE TYPE pjsip_dtmf_mode_values AS ENUM ('rfc4733', 'inband', 'info');
CREATE TYPE pjsip_identify_by_values AS ENUM ('username');
CREATE TYPE pjsip_timer_values AS ENUM ('forced', 'no', 'required', 'yes');
CREATE TYPE pjsip_cid_privacy_values AS ENUM ('allowed_not_screened', 'allowed_passed_screened', 'allowed_failed_screened', 'allowed', 'prohib_not_screened', 'prohib_passed_screened', 'prohib_failed_screened', 'prohib', 'unavailable');
CREATE TYPE pjsip_100rel_values AS ENUM ('no', 'required', 'yes');
CREATE TYPE pjsip_media_encryption_values AS ENUM ('no', 'sdes', 'dtls');
CREATE TYPE pjsip_t38udptl_ec_values AS ENUM ('none', 'fec', 'redundancy');
CREATE TYPE pjsip_dtls_setup_values AS ENUM ('active', 'passive', 'actpass');
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 yesno_values,
connected_line_method pjsip_connected_line_method_values,
direct_media_method pjsip_connected_line_method_values,
direct_media_glare_mitigation pjsip_direct_media_glare_mitigation_values,
disable_direct_media_on_nat yesno_values,
dtmf_mode pjsip_dtmf_mode_values,
external_media_address VARCHAR(40),
force_rport yesno_values,
ice_support yesno_values,
identify_by pjsip_identify_by_values,
mailboxes VARCHAR(40),
moh_suggest VARCHAR(40),
outbound_auth VARCHAR(40),
outbound_proxy VARCHAR(40),
rewrite_contact yesno_values,
rtp_ipv6 yesno_values,
rtp_symmetric yesno_values,
send_diversion yesno_values,
send_pai yesno_values,
send_rpid yesno_values,
timers_min_se INTEGER,
timers pjsip_timer_values,
timers_sess_expires INTEGER,
callerid VARCHAR(40),
callerid_privacy pjsip_cid_privacy_values,
callerid_tag VARCHAR(40),
"100rel" pjsip_100rel_values,
aggregate_mwi yesno_values,
trust_id_inbound yesno_values,
trust_id_outbound yesno_values,
use_ptime yesno_values,
use_avpf yesno_values,
media_encryption pjsip_media_encryption_values,
inband_progress yesno_values,
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 yesno_values,
t38_udptl yesno_values,
t38_udptl_ec pjsip_t38udptl_ec_values,
t38_udptl_maxdatagram INTEGER,
t38_udptl_nat yesno_values,
t38_udptl_ipv6 yesno_values,
tone_zone VARCHAR(40),
language VARCHAR(40),
one_touch_recording yesno_values,
record_on_feature VARCHAR(40),
record_off_feature VARCHAR(40),
rtp_engine VARCHAR(40),
allow_transfer yesno_values,
allow_subscribe yesno_values,
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 pjsip_dtls_setup_values,
srtp_tag_32 yesno_values,
UNIQUE (id)
);
CREATE INDEX ps_endpoints_id ON ps_endpoints (id);
CREATE TYPE pjsip_auth_type_values AS ENUM ('md5', 'userpass');
CREATE TABLE ps_auths (
id VARCHAR(40) NOT NULL,
auth_type pjsip_auth_type_values,
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 yesno_values,
qualify_frequency INTEGER,
authenticate_qualify yesno_values,
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 BIGSERIAL NOT NULL,
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, context, exten, priority),
UNIQUE (id)
);
UPDATE alembic_version SET version_num='581a4264e537' WHERE alembic_version.version_num = '43956d550a44';
-- Running upgrade 581a4264e537 -> 2fc7930b41b3
CREATE TYPE pjsip_redirect_method_values AS ENUM ('user', 'uri_core', 'uri_pjsip');
CREATE TABLE ps_systems (
id VARCHAR(40) NOT NULL,
timer_t1 INTEGER,
timer_b INTEGER,
compact_headers yesno_values,
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 TYPE pjsip_transport_method_values AS ENUM ('default', 'unspecified', 'tlsv1', 'sslv2', 'sslv3', 'sslv23');
CREATE TYPE pjsip_transport_protocol_values AS ENUM ('udp', 'tcp', 'tls', 'ws', 'wss');
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 pjsip_transport_method_values,
local_net VARCHAR(40),
password VARCHAR(40),
priv_key_file VARCHAR(200),
protocol pjsip_transport_protocol_values,
require_client_cert yesno_values,
verify_client yesno_values,
verifiy_server yesno_values,
tos yesno_values,
cos yesno_values,
UNIQUE (id)
);
CREATE INDEX ps_transports_id ON ps_transports (id);
CREATE TABLE ps_registrations (
id VARCHAR(40) NOT NULL,
auth_rejection_permanent yesno_values,
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 yesno_values,
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 pjsip_redirect_method_values;
ALTER TABLE ps_endpoints ADD COLUMN set_var TEXT;
ALTER TABLE ps_endpoints RENAME mwi_fromuser TO mwi_from_user;
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 yesno_values;
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 TYPE queue_autopause_values AS ENUM ('yes', 'no', 'all');
CREATE TYPE queue_strategy_values AS ENUM ('ringall', 'leastrecent', 'fewestcalls', 'random', 'rrmemory', 'linear', 'wrandom', 'rrordered');
CREATE TABLE queues (
name VARCHAR(128) NOT NULL,
musiconhold VARCHAR(128),
announce VARCHAR(128),
context VARCHAR(128),
timeout INTEGER,
ringinuse yesno_values,
setinterfacevar yesno_values,
setqueuevar yesno_values,
setqueueentryvar yesno_values,
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 yesno_values,
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 yesno_values,
random_periodic_announce yesno_values,
retry INTEGER,
wrapuptime INTEGER,
penaltymemberslimit INTEGER,
autofill yesno_values,
monitor_type VARCHAR(128),
autopause queue_autopause_values,
autopausedelay INTEGER,
autopausebusy yesno_values,
autopauseunavail yesno_values,
maxlen INTEGER,
servicelevel INTEGER,
strategy queue_strategy_values,
joinempty VARCHAR(128),
leavewhenempty VARCHAR(128),
reportholdtime yesno_values,
memberdelay INTEGER,
weight INTEGER,
timeoutrestart yesno_values,
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 ALTER COLUMN tos_audio TYPE VARCHAR(10);
ALTER TABLE ps_endpoints ALTER COLUMN tos_video TYPE VARCHAR(10);
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 ALTER COLUMN tos TYPE VARCHAR(10);
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 ALTER COLUMN user_agent TYPE VARCHAR(255);
ALTER TABLE ps_contacts ALTER COLUMN id TYPE VARCHAR(255);
ALTER TABLE ps_contacts ALTER COLUMN uri TYPE VARCHAR(255);
ALTER TABLE ps_contacts ALTER COLUMN user_agent TYPE VARCHAR(255);
ALTER TABLE ps_registrations ALTER COLUMN client_uri TYPE VARCHAR(255);
ALTER TABLE ps_registrations ALTER COLUMN server_uri TYPE VARCHAR(255);
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 yesno_values;
ALTER TABLE ps_endpoints ADD COLUMN media_use_received_transport yesno_values;
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 ALTER COLUMN useragent TYPE VARCHAR(255);
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);
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 ALTER COLUMN verifiy_server TYPE yesno_values;
ALTER TABLE ps_transports RENAME verifiy_server TO verify_server;
UPDATE alembic_version SET version_num='5950038a6ead' WHERE alembic_version.version_num = 'd39508cb8d8';
-- Running upgrade 5950038a6ead -> 10aedae86a32
CREATE TYPE sip_directmedia_values_v2 AS ENUM ('yes', 'no', 'nonat', 'update', 'outgoing');
ALTER TABLE sippeers ALTER COLUMN directmedia TYPE sip_directmedia_values_v2 USING directmedia::text::sip_directmedia_values_v2;
DROP TYPE sip_directmedia_values;
UPDATE alembic_version SET version_num='10aedae86a32' WHERE alembic_version.version_num = '5950038a6ead';
-- Running upgrade 10aedae86a32 -> eb88a14f2a
ALTER TABLE ps_endpoints ADD COLUMN media_encryption_optimistic yesno_values;
UPDATE alembic_version SET version_num='eb88a14f2a' WHERE alembic_version.version_num = '10aedae86a32';
-- Running upgrade eb88a14f2a -> 371a3bf4143e
ALTER TABLE ps_endpoints ADD COLUMN user_eq_phone yesno_values;
UPDATE alembic_version SET version_num='371a3bf4143e' WHERE alembic_version.version_num = 'eb88a14f2a';
-- Running upgrade 371a3bf4143e -> 45e3f47c6c44
ALTER TABLE ps_globals ADD COLUMN endpoint_identifier_order VARCHAR(40);
UPDATE alembic_version SET version_num='45e3f47c6c44' WHERE alembic_version.version_num = '371a3bf4143e';
-- Running upgrade 45e3f47c6c44 -> 23530d604b96
ALTER TABLE ps_endpoints ADD COLUMN rpid_immediate yesno_values;
UPDATE alembic_version SET version_num='23530d604b96' WHERE alembic_version.version_num = '45e3f47c6c44';
-- Running upgrade 23530d604b96 -> 31cd4f4891ec
CREATE TYPE pjsip_dtmf_mode_values_v2 AS ENUM ('rfc4733', 'inband', 'info', 'auto');
ALTER TABLE ps_endpoints ALTER COLUMN dtmf_mode TYPE pjsip_dtmf_mode_values_v2 USING dtmf_mode::text::pjsip_dtmf_mode_values_v2;
DROP TYPE pjsip_dtmf_mode_values;
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 yesno_values;
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 -> 189a235b3fd7
ALTER TABLE ps_globals ADD COLUMN keep_alive_interval INTEGER;
UPDATE alembic_version SET version_num='189a235b3fd7' WHERE alembic_version.version_num = '28ce1e718f05';
-- Running upgrade 189a235b3fd7 -> 2d078ec071b7
ALTER TABLE ps_aors ALTER COLUMN contact TYPE VARCHAR(255);
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 yesno_values;
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 ALTER COLUMN qualify_timeout TYPE FLOAT;
ALTER TABLE ps_contacts ALTER COLUMN qualify_timeout TYPE FLOAT;
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 yesno_values;
ALTER TABLE ps_registrations ADD COLUMN line yesno_values;
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 yesno_values;
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';
COMMIT;

View 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;

View File

@@ -243,6 +243,42 @@ static struct dsn *create_dsn(const char *name)
return dsn;
}
static SQLHSTMT silent_execute(struct odbc_obj *obj, void *data);
/*!
* \brief Determine if the connection has died.
*
* \param connection The connection to check
* \retval 1 Yep, it's dead
* \retval 0 It's alive and well
*/
static int connection_dead(struct odbc_obj *connection)
{
SQLINTEGER dead;
SQLRETURN res;
SQLHSTMT stmt;
if (!connection) {
return 1;
}
res = SQLGetConnectAttr(connection->con, SQL_ATTR_CONNECTION_DEAD, &dead, 0, 0);
if (SQL_SUCCEEDED(res)) {
return dead == SQL_CD_TRUE ? 1 : 0;
}
/* If the Driver doesn't support SQL_ATTR_CONNECTION_DEAD do a direct
* execute of a probing statement and see if that succeeds instead
*/
stmt = ast_odbc_direct_execute(connection, silent_execute, "SELECT 1");
if (!stmt) {
return 1;
}
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
return 0;
}
/*!
* \brief Retrieve a DSN, or create it if it does not exist.
*
@@ -271,7 +307,26 @@ static struct dsn *get_dsn(const char *name)
return NULL;
}
ao2_lock(dsn->connection);
ao2_lock(dsn);
if (!dsn->connection) {
dsn->connection = ast_odbc_request_obj(name, 0);
if (!dsn->connection) {
ao2_unlock(dsn);
ao2_ref(dsn, -1);
return NULL;
}
return dsn;
}
if (connection_dead(dsn->connection)) {
ast_odbc_release_obj(dsn->connection);
dsn->connection = ast_odbc_request_obj(name, 0);
if (!dsn->connection) {
ao2_unlock(dsn);
ao2_ref(dsn, -1);
return NULL;
}
}
return dsn;
}
@@ -288,7 +343,7 @@ static void *release_dsn(struct dsn *dsn)
return NULL;
}
ao2_unlock(dsn->connection);
ao2_unlock(dsn);
ao2_ref(dsn, -1);
return NULL;
@@ -323,7 +378,16 @@ static void odbc_datastore_free(void *data)
ast_free(result);
}
static SQLHSTMT generic_execute(struct odbc_obj *obj, void *data)
/*!
* \brief Common execution function for SQL queries.
*
* \param obj DB connection
* \param data The query to execute
* \param silent If true, do not print warnings on failure
* \retval NULL Failed to execute query
* \retval non-NULL The executed statement
*/
static SQLHSTMT execute(struct odbc_obj *obj, void *data, int silent)
{
int res;
char *sql = data;
@@ -337,7 +401,7 @@ static SQLHSTMT generic_execute(struct odbc_obj *obj, void *data)
res = SQLExecDirect(stmt, (unsigned char *)sql, SQL_NTS);
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO) && (res != SQL_NO_DATA)) {
if (res == SQL_ERROR) {
if (res == SQL_ERROR && !silent) {
int i;
SQLINTEGER nativeerror=0, numfields=0;
SQLSMALLINT diagbytes=0;
@@ -354,7 +418,9 @@ static SQLHSTMT generic_execute(struct odbc_obj *obj, void *data)
}
}
ast_log(LOG_WARNING, "SQL Exec Direct failed (%d)![%s]\n", res, sql);
if (!silent) {
ast_log(LOG_WARNING, "SQL Exec Direct failed (%d)![%s]\n", res, sql);
}
SQLCloseCursor(stmt);
SQLFreeHandle(SQL_HANDLE_STMT, stmt);
return NULL;
@@ -363,6 +429,16 @@ static SQLHSTMT generic_execute(struct odbc_obj *obj, void *data)
return stmt;
}
static SQLHSTMT generic_execute(struct odbc_obj *obj, void *data)
{
return execute(obj, data, 0);
}
static SQLHSTMT silent_execute(struct odbc_obj *obj, void *data)
{
return execute(obj, data, 1);
}
/*
* Master control routine
*/

View File

@@ -234,8 +234,8 @@ int ast_strings_match(const char *left, const char *op, const char *right)
{
char *internal_op = (char *)op;
char *internal_right = (char *)right;
float left_num;
float right_num;
double left_num;
double right_num;
int scan_numeric = 0;
if (!(left && right)) {
@@ -297,7 +297,7 @@ regex:
}
equals:
scan_numeric = (sscanf(left, "%f", &left_num) && sscanf(internal_right, "%f", &right_num));
scan_numeric = (sscanf(left, "%lf", &left_num) && sscanf(internal_right, "%lf", &right_num));
if (internal_op[0] == '=') {
if (ast_strlen_zero(left) && ast_strlen_zero(internal_right)) {

View File

@@ -97,7 +97,6 @@ static void *sorcery_astdb_retrieve_fields_common(const struct ast_sorcery *sorc
const char *key = entry->key + strlen(family) + 2;
RAII_VAR(struct ast_json *, json, NULL, ast_json_unref);
struct ast_json_error error;
RAII_VAR(struct ast_variable *, objset, NULL, ast_variables_destroy);
RAII_VAR(struct ast_variable *, existing, NULL, ast_variables_destroy);
void *object = NULL;
@@ -113,7 +112,7 @@ static void *sorcery_astdb_retrieve_fields_common(const struct ast_sorcery *sorc
}
if (!(object = ast_sorcery_alloc(sorcery, type, key)) ||
ast_sorcery_objectset_apply(sorcery, object, objset)) {
ast_sorcery_objectset_apply(sorcery, object, existing)) {
ao2_cleanup(object);
return NULL;
}

View File

@@ -28,7 +28,11 @@
#define PJSIP_SAFE_MODULE 0
#define PJ_HAS_STRICMP_ALNUM 0
#define PJ_HASH_USE_OWN_TOLOWER 1
#define PJSIP_UNESCAPE_IN_PLACE 1
/*
It is imperative that PJSIP_UNESCAPE_IN_PLACE remain 0 or undefined.
Enabling it will result in SEGFAULTS when URIs containing escape sequences are encountered.
*/
#undef PJSIP_UNESCAPE_IN_PLACE
#define PJSIP_MAX_PKT_LEN 6000
#undef PJ_TODO