From e067fc2cf49d2691147488366deb6e20eafb53b8 Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Thu, 6 Oct 2022 09:57:00 +0100 Subject: [PATCH] add fields to db for outbound register customization (from user, from domain, whether to use public ip or sip realm in contact) (#67) --- db/jambones-sql.sql | 3 + db/jambones.sqs | 137 ++++++++++++++++++++++++++++----------- db/upgrade-jambonz-db.js | 5 +- 3 files changed, 107 insertions(+), 38 deletions(-) diff --git a/db/jambones-sql.sql b/db/jambones-sql.sql index e502bd1..80f40e4 100644 --- a/db/jambones-sql.sql +++ b/db/jambones-sql.sql @@ -332,6 +332,9 @@ smpp_password VARCHAR(64), smpp_enquire_link_interval INTEGER DEFAULT 0, smpp_inbound_system_id VARCHAR(255), smpp_inbound_password VARCHAR(64), +register_from_user VARCHAR(128), +register_from_domain VARBINARY(255), +register_public_ip_in_contact BOOLEAN NOT NULL DEFAULT false, PRIMARY KEY (voip_carrier_sid) ) COMMENT='A Carrier or customer PBX that can send or receive calls'; diff --git a/db/jambones.sqs b/db/jambones.sqs index af71528..691b8ad 100644 --- a/db/jambones.sqs +++ b/db/jambones.sqs @@ -87,7 +87,7 @@ - + @@ -148,7 +148,7 @@ - + @@ -225,7 +225,7 @@ - + @@ -279,10 +279,47 @@ - + + + + + + 2170.00 + 216.00 + + + 276.00 + 80.00 + + 31 + + + + + + + + + + + + + + + + + + + + + + + + + @@ -426,7 +463,14 @@ - + + + + + + + + @@ -492,7 +536,7 @@ - + @@ -501,12 +545,12 @@ - 24.00 - 317.00 + 20.00 + 287.00 - 267.00 - 460.00 + 293.00 + 520.00 6 @@ -670,7 +714,24 @@ - + + + + + + + + + + + + + + + + + + @@ -752,7 +813,7 @@ - + @@ -805,6 +866,7 @@ + @@ -931,7 +993,7 @@ - + @@ -952,7 +1014,7 @@ - + @@ -1013,7 +1075,7 @@ - + @@ -1065,6 +1127,7 @@ + @@ -1114,7 +1177,7 @@ - + @@ -1214,7 +1277,7 @@ - + @@ -1223,8 +1286,8 @@ - 36.00 - 791.00 + 44.00 + 821.00 254.00 @@ -1283,7 +1346,7 @@ - + @@ -1320,7 +1383,7 @@ - + @@ -1429,7 +1492,7 @@ - + @@ -1499,7 +1562,7 @@ - + @@ -1692,7 +1755,7 @@ - + @@ -1731,7 +1794,7 @@ - + @@ -1823,7 +1886,7 @@ - + @@ -1874,7 +1937,7 @@ - + @@ -1883,8 +1946,8 @@ - 33.00 - 924.00 + 29.00 + 954.00 331.00 @@ -1970,7 +2033,7 @@ - + @@ -2070,7 +2133,7 @@ - + @@ -2239,7 +2302,7 @@ - + @@ -2347,7 +2410,7 @@ - + @@ -2417,7 +2480,7 @@ - + @@ -2462,7 +2525,7 @@ - + @@ -2529,7 +2592,7 @@ - + @@ -2557,7 +2620,7 @@ - + diff --git a/db/upgrade-jambonz-db.js b/db/upgrade-jambonz-db.js index 28b62de..3c08aee 100644 --- a/db/upgrade-jambonz-db.js +++ b/db/upgrade-jambonz-db.js @@ -26,7 +26,10 @@ const opts = { const sql = { '7006': [ 'ALTER TABLE `accounts` ADD COLUMN `siprec_hook_sid` CHAR(36)', - 'ALTER TABLE accounts ADD FOREIGN KEY siprec_hook_sid_idxfk (siprec_hook_sid) REFERENCES applications (application_sid)' + 'ALTER TABLE accounts ADD FOREIGN KEY siprec_hook_sid_idxfk (siprec_hook_sid) REFERENCES applications (application_sid)', + 'ALTER TABLE `voip_carriers` ADD COLUMN `register_from_user` VARCHAR(128)', + 'ALTER TABLE `voip_carriers` ADD COLUMN `register_from_domain` VARCHAR(256)', + 'ALTER TABLE `voip_carriers` ADD COLUMN `register_public_domain_in_contact` BOOLEAN NOT NULL DEFAULT false' ], '7007': [ `CREATE TABLE service_provider_limits