Skip to content

Commit

Permalink
support carrier pad crypto
Browse files Browse the repository at this point in the history
  • Loading branch information
xquanluu committed Sep 10, 2024
1 parent 6275aac commit 2f20ae5
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 12 deletions.
5 changes: 3 additions & 2 deletions db/jambones-sql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ regex VARCHAR(32) NOT NULL COMMENT 'regex-based pattern match against dialed num
description VARCHAR(1024),
priority INTEGER NOT NULL COMMENT 'lower priority routes are attempted first',
PRIMARY KEY (lcr_route_sid)
) COMMENT='An ordered list of digit patterns in an LCR table. The pat';
) COMMENT='An ordered list of digit patterns in an LCR table. The patterns are tested in sequence until one matches';

CREATE TABLE lcr
(
Expand All @@ -173,7 +173,7 @@ default_carrier_set_entry_sid CHAR(36) COMMENT 'default carrier/route to use whe
service_provider_sid CHAR(36),
account_sid CHAR(36),
PRIMARY KEY (lcr_sid)
) COMMENT='An LCR (least cost routing) table that is used by a service ';
) COMMENT='An LCR (least cost routing) table that is used by a service provider or account to make decisions about routing outbound calls when multiple carriers are available.';

CREATE TABLE password_settings
(
Expand Down Expand Up @@ -413,6 +413,7 @@ register_from_user VARCHAR(128),
register_from_domain VARCHAR(255),
register_public_ip_in_contact BOOLEAN NOT NULL DEFAULT false,
register_status VARCHAR(4096),
pad_crypto BOOLEAN NOT NULL DEFAULT 0,
PRIMARY KEY (voip_carrier_sid)
) COMMENT='A Carrier or customer PBX that can send or receive calls';

Expand Down
24 changes: 16 additions & 8 deletions db/jambones.sqs
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@
</location>
<size>
<width>293.00</width>
<height>540.00</height>
<height>560.00</height>
</size>
<zorder>6</zorder>
<SQLField>
Expand Down Expand Up @@ -737,6 +737,14 @@
<type><![CDATA[VARCHAR(4096)]]></type>
<uid><![CDATA[7C7DFE92-D7AC-4447-A1C2-E0F10C1EA26A]]></uid>
</SQLField>
<SQLField>
<name><![CDATA[pad_crypto]]></name>
<type><![CDATA[BOOLEAN]]></type>
<defaultValue><![CDATA[0]]></defaultValue>
<forcedUnique><![CDATA[0]]></forcedUnique>
<notNull><![CDATA[1]]></notNull>
<uid><![CDATA[F0D11695-461B-456D-895A-5AF66C029194]]></uid>
</SQLField>
<labelWindowIndex><![CDATA[28]]></labelWindowIndex>
<objectComment><![CDATA[A Carrier or customer PBX that can send or receive calls]]></objectComment>
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
Expand Down Expand Up @@ -3106,7 +3114,7 @@
<SQLDocumentInfo>
<encodedPrintInfo><![CDATA[BAtzdHJlYW10eXBlZIHoA4QBQISEhAtOU1ByaW50SW5mbwGEhAhOU09iamVjdACFkoSEhBNOU011dGFibGVEaWN0aW9uYXJ5AISEDE5TRGljdGlvbmFyeQCUhAFpDZKEhIQITlNTdHJpbmcBlIQBKw5OU1BNUGFnZUZvcm1hdIaShISEDU5TTXV0YWJsZURhdGEAhIQGTlNEYXRhAJSXgbIbhAdbNzA5MGNdPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHBsaXN0IFBVQkxJQyAiLS8vQXBwbGUvL0RURCBQTElTVCAxLjAvL0VOIiAiaHR0cDovL3d3dy5hcHBsZS5jb20vRFREcy9Qcm9wZXJ0eUxpc3QtMS4wLmR0ZCI+CjxwbGlzdCB2ZXJzaW9uPSIxLjAiPgo8ZGljdD4KCTxrZXk+Y29tLmFwcGxlLnByaW50LlBhZ2VGb3JtYXQuUE1Ib3Jpem9udGFsUmVzPC9rZXk+Cgk8ZGljdD4KCQk8a2V5PmNvbS5hcHBsZS5wcmludC50aWNrZXQuY3JlYXRvcjwva2V5PgoJCTxzdHJpbmc+Y29tLmFwcGxlLmpvYnRpY2tldDwvc3RyaW5nPgoJCTxrZXk+Y29tLmFwcGxlLnByaW50LnRpY2tldC5pdGVtQXJyYXk8L2tleT4KCQk8YXJyYXk+CgkJCTxkaWN0PgoJCQkJPGtleT5j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nPjAwLjIwPC9zdHJpbmc+CgkJPGtleT5jb20uYXBwbGUucHJpbnQudGlja2V0LnR5cGU8L2tleT4KCQk8c3RyaW5nPmNvbS5hcHBsZS5wcmludC5QYXBlckluZm9UaWNrZXQ8L3N0cmluZz4KCTwvZGljdD4KCTxrZXk+Y29tLmFwcGxlLnByaW50LnRpY2tldC5BUElWZXJzaW9uPC9rZXk+Cgk8c3RyaW5nPjAwLjIwPC9zdHJpbmc+Cgk8a2V5PmNvbS5hcHBsZS5wcmludC50aWNrZXQudHlwZTwva2V5PgoJPHN0cmluZz5jb20uYXBwbGUucHJpbnQuUGFnZUZvcm1hdFRpY2tldDwvc3RyaW5nPgo8L2RpY3Q+CjwvcGxpc3Q+CoaShJmZC05TUGFwZXJTaXplhpKEhIQHTlNWYWx1ZQCUhAEqhIQLe0NHU2l6ZT1kZH2fgWQCgRgDhpKEmZkWTlNIb3Jpem9udGFsbHlDZW50ZXJlZIaShISECE5TTnVtYmVyAJ+ehIQBY6EBhpKEmZkUTlNWZXJ0aWNhbGx5Q2VudGVyZWSGkqKShJmZDE5TTGVmdE1hcmdpboaShKOehIQBZKIShpKEmZkNTlNSaWdodE1hcmdpboaSp5KEmZkLTlNUb3BNYXJnaW6GkoSjnqiiHoaShJmZDU5TT3JpZW50YXRpb26GkoSjnoSEAXGjAIaShJmZFU5TSG9yaXpvbmFsUGFnaW5hdGlvboaSrZKEmZkUTlNWZXJ0aWNhbFBhZ2luYXRpb26Gkq2ShJmZDk5TQm90dG9tTWFyZ2luhpKEo56oojSGkoSZmQtOU1BhcGVyTmFtZYaShJmZCW5hLWxldHRlcoaShJmZD05TU2NhbGluZ0ZhY3RvcoaShKOeqKIBhoaG]]></encodedPrintInfo>
<autoSizeTablesOption><![CDATA[1]]></autoSizeTablesOption>
<documentScaleFactor><![CDATA[1]]></documentScaleFactor>
<documentScaleFactor><![CDATA[0.95]]></documentScaleFactor>
<dropTableOption><![CDATA[1]]></dropTableOption>
<exportDialect><![CDATA[mysql]]></exportDialect>
<fileversion><![CDATA[4]]></fileversion>
Expand All @@ -3120,14 +3128,14 @@
<RightSidebarWidth><![CDATA[1235.000000]]></RightSidebarWidth>
<sidebarIndex><![CDATA[2]]></sidebarIndex>
<snapToGrid><![CDATA[0]]></snapToGrid>
<SourceSidebarWidth><![CDATA[0.000000]]></SourceSidebarWidth>
<SourceSidebarWidth><![CDATA[312.000000]]></SourceSidebarWidth>
<SQLEditorFileFormatVersion><![CDATA[4]]></SQLEditorFileFormatVersion>
<uid><![CDATA[58C99A00-06C9-478C-A667-C63842E088F3]]></uid>
<windowHeight><![CDATA[873.000000]]></windowHeight>
<windowLocationX><![CDATA[0.000000]]></windowLocationX>
<windowLocationY><![CDATA[71.000000]]></windowLocationY>
<windowScrollOrigin><![CDATA[{1674.5, 0}]]></windowScrollOrigin>
<windowWidth><![CDATA[1512.000000]]></windowWidth>
<windowHeight><![CDATA[1055.000000]]></windowHeight>
<windowLocationX><![CDATA[58.000000]]></windowLocationX>
<windowLocationY><![CDATA[24.000000]]></windowLocationY>
<windowScrollOrigin><![CDATA[{0, 148}]]></windowScrollOrigin>
<windowWidth><![CDATA[1670.000000]]></windowWidth>
</SQLDocumentInfo>
<AllowsIndexRenamingOnInsert><![CDATA[1]]></AllowsIndexRenamingOnInsert>
<defaultLabelExpanded><![CDATA[1]]></defaultLabelExpanded>
Expand Down
1 change: 1 addition & 0 deletions db/upgrade-jambonz-db.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ const sql = {
],
9002: [
'ALTER TABLE system_information ADD COLUMN private_network_cidr VARCHAR(8192)',
'ALTER TABLE voip_carriers ADD COLUMN pad_crypto BOOLEAN NOT NULL DEFAULT 0',
]
};

Expand Down
6 changes: 5 additions & 1 deletion lib/models/voip-carrier.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,11 @@ VoipCarrier.fields = [
{
name: 'register_status',
type: 'string'
}
},
{
name: 'pad_crypto',
type: 'number'
},
];

module.exports = VoipCarrier;
10 changes: 9 additions & 1 deletion test/voip-carriers.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ test('voip carrier tests', async(t) => {
json: true,
});
t.ok(result.name === 'daveh' , 'successfully retrieved voip carrier by sid');
t.ok(result.pad_crypto === 0 , 'default pad_crypto is 0');

/* fail to query one voip carriers with invalid uuid */
try {
Expand All @@ -65,11 +66,18 @@ test('voip carrier tests', async(t) => {
register_sip_realm: 'bar',
register_password: 'baz',
register_from_user: 'fromme',
register_from_domain: 'fromdomain'
register_from_domain: 'fromdomain',
pad_crypto: true
}
});
t.ok(result.statusCode === 204, 'successfully updated voip carrier');

result = await request.get(`/VoipCarriers/${sid}`, {
auth: authAdmin,
json: true,
});
t.ok(result.pad_crypto === 1 , 'pad_crypto is updated 1');

/* provision a phone number for the voip carrier */
result = await request.post('/PhoneNumbers', {
resolveWithFullResponse: true,
Expand Down

0 comments on commit 2f20ae5

Please sign in to comment.