diff --git a/schema/kamailio.json b/schema/kamailio.json index 765dc8ce..24033b34 100644 --- a/schema/kamailio.json +++ b/schema/kamailio.json @@ -4176,6 +4176,102 @@ "TABLE_NAME" : "pua", "key_col" : "pua/watcher_uri" }, + "reseller_preferences/attribute" : { + "CHARACTER_SET_NAME" : "utf8mb3", + "COLLATION_NAME" : "utf8mb3_general_ci", + "COLUMN_DEFAULT" : "''", + "COLUMN_NAME" : "attribute", + "COLUMN_TYPE" : "varchar(32)", + "EXTRA" : "", + "IS_NULLABLE" : "NO", + "ORDINAL_POSITION" : 5, + "TABLE_NAME" : "reseller_preferences", + "key_col" : "reseller_preferences/attribute" + }, + "reseller_preferences/domain" : { + "CHARACTER_SET_NAME" : "utf8mb3", + "COLLATION_NAME" : "utf8mb3_general_ci", + "COLUMN_DEFAULT" : "''", + "COLUMN_NAME" : "domain", + "COLUMN_TYPE" : "varchar(64)", + "EXTRA" : "", + "IS_NULLABLE" : "NO", + "ORDINAL_POSITION" : 4, + "TABLE_NAME" : "reseller_preferences", + "key_col" : "reseller_preferences/domain" + }, + "reseller_preferences/id" : { + "CHARACTER_SET_NAME" : null, + "COLLATION_NAME" : null, + "COLUMN_DEFAULT" : null, + "COLUMN_NAME" : "id", + "COLUMN_TYPE" : "int(10) unsigned", + "EXTRA" : "auto_increment", + "IS_NULLABLE" : "NO", + "ORDINAL_POSITION" : 1, + "TABLE_NAME" : "reseller_preferences", + "key_col" : "reseller_preferences/id" + }, + "reseller_preferences/last_modified" : { + "CHARACTER_SET_NAME" : null, + "COLLATION_NAME" : null, + "COLUMN_DEFAULT" : "'1900-01-01 00:00:01'", + "COLUMN_NAME" : "last_modified", + "COLUMN_TYPE" : "datetime", + "EXTRA" : "", + "IS_NULLABLE" : "NO", + "ORDINAL_POSITION" : 8, + "TABLE_NAME" : "reseller_preferences", + "key_col" : "reseller_preferences/last_modified" + }, + "reseller_preferences/type" : { + "CHARACTER_SET_NAME" : null, + "COLLATION_NAME" : null, + "COLUMN_DEFAULT" : "0", + "COLUMN_NAME" : "type", + "COLUMN_TYPE" : "int(11)", + "EXTRA" : "", + "IS_NULLABLE" : "NO", + "ORDINAL_POSITION" : 6, + "TABLE_NAME" : "reseller_preferences", + "key_col" : "reseller_preferences/type" + }, + "reseller_preferences/username" : { + "CHARACTER_SET_NAME" : "utf8mb3", + "COLLATION_NAME" : "utf8mb3_general_ci", + "COLUMN_DEFAULT" : "'0'", + "COLUMN_NAME" : "username", + "COLUMN_TYPE" : "varchar(255)", + "EXTRA" : "", + "IS_NULLABLE" : "NO", + "ORDINAL_POSITION" : 3, + "TABLE_NAME" : "reseller_preferences", + "key_col" : "reseller_preferences/username" + }, + "reseller_preferences/uuid" : { + "CHARACTER_SET_NAME" : "utf8mb3", + "COLLATION_NAME" : "utf8mb3_general_ci", + "COLUMN_DEFAULT" : null, + "COLUMN_NAME" : "uuid", + "COLUMN_TYPE" : "char(36)", + "EXTRA" : "", + "IS_NULLABLE" : "NO", + "ORDINAL_POSITION" : 2, + "TABLE_NAME" : "reseller_preferences", + "key_col" : "reseller_preferences/uuid" + }, + "reseller_preferences/value" : { + "CHARACTER_SET_NAME" : "utf8mb3", + "COLLATION_NAME" : "utf8mb3_general_ci", + "COLUMN_DEFAULT" : "''", + "COLUMN_NAME" : "value", + "COLUMN_TYPE" : "varchar(128)", + "EXTRA" : "", + "IS_NULLABLE" : "NO", + "ORDINAL_POSITION" : 7, + "TABLE_NAME" : "reseller_preferences", + "key_col" : "reseller_preferences/value" + }, "rls_presentity/auth_state" : { "CHARACTER_SET_NAME" : null, "COLLATION_NAME" : null, @@ -8356,6 +8452,102 @@ "TABLE_NAME" : "pua", "key_col" : "pua/record_idx/1" }, + "reseller_preferences/PRIMARY/1" : { + "COLLATION" : "A", + "COLUMN_NAME" : "id", + "INDEX_NAME" : "PRIMARY", + "INDEX_TYPE" : "BTREE", + "NON_UNIQUE" : 0, + "NULLABLE" : "", + "SEQ_IN_INDEX" : 1, + "SUB_PART" : null, + "TABLE_NAME" : "reseller_preferences", + "key_col" : "reseller_preferences/PRIMARY/1" + }, + "reseller_preferences/av_idx/1" : { + "COLLATION" : "A", + "COLUMN_NAME" : "attribute", + "INDEX_NAME" : "av_idx", + "INDEX_TYPE" : "BTREE", + "NON_UNIQUE" : 1, + "NULLABLE" : "", + "SEQ_IN_INDEX" : 1, + "SUB_PART" : null, + "TABLE_NAME" : "reseller_preferences", + "key_col" : "reseller_preferences/av_idx/1" + }, + "reseller_preferences/av_idx/2" : { + "COLLATION" : "A", + "COLUMN_NAME" : "value", + "INDEX_NAME" : "av_idx", + "INDEX_TYPE" : "BTREE", + "NON_UNIQUE" : 1, + "NULLABLE" : "", + "SEQ_IN_INDEX" : 2, + "SUB_PART" : null, + "TABLE_NAME" : "reseller_preferences", + "key_col" : "reseller_preferences/av_idx/2" + }, + "reseller_preferences/ua_idx/1" : { + "COLLATION" : "A", + "COLUMN_NAME" : "uuid", + "INDEX_NAME" : "ua_idx", + "INDEX_TYPE" : "BTREE", + "NON_UNIQUE" : 1, + "NULLABLE" : "", + "SEQ_IN_INDEX" : 1, + "SUB_PART" : null, + "TABLE_NAME" : "reseller_preferences", + "key_col" : "reseller_preferences/ua_idx/1" + }, + "reseller_preferences/ua_idx/2" : { + "COLLATION" : "A", + "COLUMN_NAME" : "attribute", + "INDEX_NAME" : "ua_idx", + "INDEX_TYPE" : "BTREE", + "NON_UNIQUE" : 1, + "NULLABLE" : "", + "SEQ_IN_INDEX" : 2, + "SUB_PART" : null, + "TABLE_NAME" : "reseller_preferences", + "key_col" : "reseller_preferences/ua_idx/2" + }, + "reseller_preferences/uda_idx/1" : { + "COLLATION" : "A", + "COLUMN_NAME" : "username", + "INDEX_NAME" : "uda_idx", + "INDEX_TYPE" : "BTREE", + "NON_UNIQUE" : 1, + "NULLABLE" : "", + "SEQ_IN_INDEX" : 1, + "SUB_PART" : null, + "TABLE_NAME" : "reseller_preferences", + "key_col" : "reseller_preferences/uda_idx/1" + }, + "reseller_preferences/uda_idx/2" : { + "COLLATION" : "A", + "COLUMN_NAME" : "domain", + "INDEX_NAME" : "uda_idx", + "INDEX_TYPE" : "BTREE", + "NON_UNIQUE" : 1, + "NULLABLE" : "", + "SEQ_IN_INDEX" : 2, + "SUB_PART" : null, + "TABLE_NAME" : "reseller_preferences", + "key_col" : "reseller_preferences/uda_idx/2" + }, + "reseller_preferences/uda_idx/3" : { + "COLLATION" : "A", + "COLUMN_NAME" : "attribute", + "INDEX_NAME" : "uda_idx", + "INDEX_TYPE" : "BTREE", + "NON_UNIQUE" : 1, + "NULLABLE" : "", + "SEQ_IN_INDEX" : 3, + "SUB_PART" : null, + "TABLE_NAME" : "reseller_preferences", + "key_col" : "reseller_preferences/uda_idx/3" + }, "rls_presentity/PRIMARY/1" : { "COLLATION" : "A", "COLUMN_NAME" : "id", @@ -9927,6 +10119,13 @@ "TABLE_NAME" : "pua", "key_col" : "pua" }, + "reseller_preferences" : { + "CREATE_OPTIONS" : "", + "ENGINE" : "InnoDB", + "TABLE_COLLATION" : "utf8mb3_general_ci", + "TABLE_NAME" : "reseller_preferences", + "key_col" : "reseller_preferences" + }, "rls_presentity" : { "CREATE_OPTIONS" : "", "ENGINE" : "InnoDB", diff --git a/schema/kamailio.sql b/schema/kamailio.sql index b523b383..e0265561 100644 --- a/schema/kamailio.sql +++ b/schema/kamailio.sql @@ -605,6 +605,23 @@ CREATE TABLE `pua` ( /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; +CREATE TABLE `reseller_preferences` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `uuid` char(36) NOT NULL, + `username` varchar(255) NOT NULL DEFAULT '0', + `domain` varchar(64) NOT NULL DEFAULT '', + `attribute` varchar(32) NOT NULL DEFAULT '', + `type` int(11) NOT NULL DEFAULT 0, + `value` varchar(128) NOT NULL DEFAULT '', + `last_modified` datetime NOT NULL DEFAULT '1900-01-01 00:00:01', + PRIMARY KEY (`id`), + KEY `ua_idx` (`uuid`,`attribute`), + KEY `uda_idx` (`username`,`domain`,`attribute`), + KEY `av_idx` (`attribute`,`value`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; +/*!40101 SET character_set_client = @saved_cs_client */; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `rls_presentity` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `rlsubs_did` varchar(255) NOT NULL, @@ -1052,7 +1069,7 @@ INSERT INTO `dom_preferences` VALUES (27,'','0','voip.sipwise.local','play_annou INSERT INTO `dom_preferences` VALUES (28,'','0','voip.sipwise.local','mobile_push_enable',0,'never',NOW()); INSERT INTO `dom_preferences` VALUES (29,'','0','voip.sipwise.local','busy_hg_member_mode',0,'ring',NOW()); INSERT INTO `domain` VALUES (1,'voip.sipwise.local',NOW(),NULL); -INSERT INTO `subscriber` VALUES (1,'no_such_number','voip.sipwise.local','e57a61dbbf0c1e959b4d52b052d94cca','19db190e8775af8f4b49ccb4f63de505','32d1147419704e7bc7d9c388c0694251','9bcb88b6-541a-43da-8fdc-816f5557ff93','',NOW()); +INSERT INTO `subscriber` VALUES (1,'no_such_number','voip.sipwise.local','e1c2601c6a448a7b8aff90fb6a1c217d','0a799047585d088375293571363cfccc','a055f00375c7d1d3ed1572f81d8b6e23','9bcb88b6-541a-43da-8fdc-816f5557ff93','',NOW()); INSERT INTO `usr_preferences` VALUES (1,'9bcb88b6-541a-43da-8fdc-816f5557ff93','no_such_number','voip.sipwise.local','cloud_pbx_hunt_policy',0,'none',NOW()); INSERT INTO `usr_preferences` VALUES (5,'9bcb88b6-541a-43da-8fdc-816f5557ff93','no_such_number','voip.sipwise.local','emergency_location_format',0,'cirpack',NOW()); INSERT INTO `usr_preferences` VALUES (6,'9bcb88b6-541a-43da-8fdc-816f5557ff93','no_such_number','voip.sipwise.local','play_announce_before_recording',0,'never',NOW()); diff --git a/schema/ngcp.sql b/schema/ngcp.sql index de6eca39..5b352979 100644 --- a/schema/ngcp.sql +++ b/schema/ngcp.sql @@ -20,7 +20,7 @@ CREATE TABLE `db_schema` ( `applied_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`id`), UNIQUE KEY `rev_idx` (`revision`,`node`) -) ENGINE=InnoDB AUTO_INCREMENT=837 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; +) ENGINE=InnoDB AUTO_INCREMENT=841 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; @@ -30879,6 +30879,10 @@ INSERT INTO `db_schema` VALUES (833,15764,'spce',NOW()); INSERT INTO `db_schema` VALUES (834,15765,'spce',NOW()); INSERT INTO `db_schema` VALUES (835,15766,'spce',NOW()); INSERT INTO `db_schema` VALUES (836,15767,'spce',NOW()); +INSERT INTO `db_schema` VALUES (837,15768,'spce',NOW()); +INSERT INTO `db_schema` VALUES (838,15770,'spce',NOW()); +INSERT INTO `db_schema` VALUES (839,15771,'spce',NOW()); +INSERT INTO `db_schema` VALUES (840,15772,'spce',NOW()); INSERT INTO `timezone` VALUES ('1','localtime',NOW(),NOW(),NULL); INSERT INTO `tzinfo_version` VALUES ('1','0',NOW(),NOW()); COMMIT; diff --git a/schema/provisioning.json b/schema/provisioning.json index 22cf01da..45374462 100644 --- a/schema/provisioning.json +++ b/schema/provisioning.json @@ -14087,6 +14087,33 @@ "TRIGGER_NAME" : "voip_prul_urepl_trig", "key_col" : "voip_prul_urepl_trig/voip_peer_rules" }, + "voip_resellerpref_crepl_trig/voip_reseller_preferences" : { + "ACTION_STATEMENT" : "BEGIN\n\n INSERT INTO kamailio.reseller_preferences\n (id, uuid, attribute, type, value, last_modified)\n SELECT NEW.id, NEW.reseller_id, attribute, type, NEW.value, '0'\n FROM provisioning.voip_preferences\n WHERE id <=> NEW.attribute_id;\n\n END", + "ACTION_TIMING" : "AFTER", + "EVENT_MANIPULATION" : "INSERT", + "EVENT_OBJECT_SCHEMA" : "provisioning", + "EVENT_OBJECT_TABLE" : "voip_reseller_preferences", + "TRIGGER_NAME" : "voip_resellerpref_crepl_trig", + "key_col" : "voip_resellerpref_crepl_trig/voip_reseller_preferences" + }, + "voip_resellerpref_drepl_trig/voip_reseller_preferences" : { + "ACTION_STATEMENT" : "BEGIN\n\n DELETE FROM kamailio.reseller_preferences\n WHERE id <=> OLD.id;\n\n END", + "ACTION_TIMING" : "BEFORE", + "EVENT_MANIPULATION" : "DELETE", + "EVENT_OBJECT_SCHEMA" : "provisioning", + "EVENT_OBJECT_TABLE" : "voip_reseller_preferences", + "TRIGGER_NAME" : "voip_resellerpref_drepl_trig", + "key_col" : "voip_resellerpref_drepl_trig/voip_reseller_preferences" + }, + "voip_resellerpref_urepl_trig/voip_reseller_preferences" : { + "ACTION_STATEMENT" : "BEGIN\n\n UPDATE kamailio.reseller_preferences pp, provisioning.voip_preferences vp\n SET pp.id = NEW.id, pp.uuid = NEW.reseller_id, pp.type = vp.type,\n pp.attribute = vp.attribute, pp.value = NEW.value, pp.last_modified = '0'\n WHERE pp.id <=> OLD.id\n AND vp.id <=> NEW.attribute_id;\n\n END", + "ACTION_TIMING" : "AFTER", + "EVENT_MANIPULATION" : "UPDATE", + "EVENT_OBJECT_SCHEMA" : "provisioning", + "EVENT_OBJECT_TABLE" : "voip_reseller_preferences", + "TRIGGER_NAME" : "voip_resellerpref_urepl_trig", + "key_col" : "voip_resellerpref_urepl_trig/voip_reseller_preferences" + }, "voip_rwrules_crepl_trig/voip_rewrite_rules" : { "ACTION_STATEMENT" : "BEGIN\n\n DECLARE new_set_id int(11) unsigned;\n\n IF NEW.enabled = 1 THEN\n\n IF NEW.direction = 'in' THEN\n SELECT IF(NEW.field = 'caller', caller_in_dpid, callee_in_dpid)\n INTO new_set_id FROM voip_rewrite_rule_sets WHERE id <=> NEW.set_id;\n ELSEIF NEW.direction = 'out' THEN\n SELECT IF(NEW.field = 'caller', caller_out_dpid, callee_out_dpid)\n INTO new_set_id FROM voip_rewrite_rule_sets WHERE id <=> NEW.set_id;\n ELSEIF NEW.direction = 'lnp' THEN\n SELECT IF(NEW.field = 'caller', caller_lnp_dpid, callee_lnp_dpid)\n INTO new_set_id FROM voip_rewrite_rule_sets WHERE id <=> NEW.set_id;\n END IF;\n\n INSERT INTO kamailio.dialplan (dpid,pr,match_op,match_exp,match_len,subst_exp,repl_exp,attrs)\n VALUES(new_set_id,NEW.priority,1,NEW.match_pattern,0,NEW.match_pattern,NEW.replace_pattern,'');\n END IF;\n\nEND", "ACTION_TIMING" : "AFTER", diff --git a/schema/provisioning.sql b/schema/provisioning.sql index 627d375e..5db1bda0 100644 --- a/schema/provisioning.sql +++ b/schema/provisioning.sql @@ -1186,7 +1186,7 @@ CREATE TABLE `voip_preferences` ( UNIQUE KEY `attribute_idx` (`attribute`), KEY `vpgid_ref` (`voip_preference_groups_id`), CONSTRAINT `vpgid_ref` FOREIGN KEY (`voip_preference_groups_id`) REFERENCES `voip_preference_groups` (`id`) ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=397 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; +) ENGINE=InnoDB AUTO_INCREMENT=398 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; @@ -3486,8 +3486,8 @@ INSERT INTO `voip_preferences` VALUES (34,6,'peer_auth_pass','Peer Authenticatio INSERT INTO `voip_preferences` VALUES (35,3,'unauth_inbound_calls','Allow inbound calls from foreign subscribers',1,1,0,1,1,0,0,0,0,0,0,NOW(),0,0,'boolean',0,'Allow unauthenticated inbound calls from FOREIGN domain to users within this domain. Use with care - it allows to flood your users with voice spam.',0,0,0); INSERT INTO `voip_preferences` VALUES (36,6,'peer_auth_realm','Peer Authentication Domain',0,1,1,0,0,1,0,0,0,0,0,NOW(),0,0,'string',0,'A realm (hostname) used to identify and for authentication against a peer host.',0,0,0); INSERT INTO `voip_preferences` VALUES (40,6,'peer_auth_register','Enable Peer Authentication',1,1,1,1,1,1,0,0,0,0,0,NOW(),0,0,'boolean',0,'Specifies whether registration at the peer host is desired.',0,0,0); -INSERT INTO `voip_preferences` VALUES (41,3,'concurrent_max','Maximum number of concurrent calls',1,1,1,1,1,1,1,1,0,0,0,NOW(),0,0,'int',0,'Maximum number of overall (incoming and outgoing) concurrent on-net and off-net calls for a subscriber or peer, excluding calls from subscriber to the application server and intra-PBX calls.',0,0,0); -INSERT INTO `voip_preferences` VALUES (42,3,'concurrent_max_out','Maximum number of outbound concurrent calls',1,1,1,1,1,1,1,1,0,0,0,NOW(),0,0,'int',0,'Maximum number of outgoing concurrent on-net and off-net calls coming from a subscriber or going to a peer, excluding calls from subscriber to the application server and intra-PBX calls.',0,0,0); +INSERT INTO `voip_preferences` VALUES (41,3,'concurrent_max','Maximum number of concurrent calls',1,1,1,1,1,1,1,1,0,0,0,NOW(),0,0,'int',0,'Maximum number of overall (incoming and outgoing) concurrent on-net and off-net calls for a subscriber or peer, excluding calls from subscriber to the application server and intra-PBX calls.',0,1,0); +INSERT INTO `voip_preferences` VALUES (42,3,'concurrent_max_out','Maximum number of outbound concurrent calls',1,1,1,1,1,1,1,1,0,0,0,NOW(),0,0,'int',0,'Maximum number of outgoing concurrent on-net and off-net calls coming from a subscriber or going to a peer, excluding calls from subscriber to the application server and intra-PBX calls.',0,1,0); INSERT INTO `voip_preferences` VALUES (43,3,'allowed_clis','Allowed CLIs for outbound calls',0,0,1,0,0,0,1,0,0,0,0,NOW(),0,0,'string',0,'A list of shell patterns specifying which CLIs are allowed to be set by the subscriber. \"*\", \"?\" and \"[x-y]\" with \"x\" and \"y\" representing numbers from 0 to 9 may be used as wildcards as usual in shell patterns.',0,0,0); INSERT INTO `voip_preferences` VALUES (45,8,'account_id','Internal Contract #',1,1,1,0,0,0,0,0,0,0,0,NOW(),1,0,'int',0,NULL,0,0,0); INSERT INTO `voip_preferences` VALUES (46,8,'ext_contract_id','External Contract #',0,1,1,0,0,0,0,0,0,0,0,NOW(),1,0,'string',0,NULL,0,0,0); @@ -3557,8 +3557,8 @@ INSERT INTO `voip_preferences` VALUES (115,8,'auto_attendant','Auto Attendant',1 INSERT INTO `voip_preferences` VALUES (116,8,'voice_mail','Voice Mail',1,1,1,0,0,0,0,0,0,0,0,NOW(),1,1,'boolean',0,'\"Voice Mail\" - An internal flag for the voice_mail pseudo-preference feature to be able to map it do subscriber profiles. Not directly used.',0,0,1); INSERT INTO `voip_preferences` VALUES (117,8,'fax_server','Fax Server',1,1,1,0,0,0,0,0,0,0,0,NOW(),1,1,'boolean',0,'\"Fax Server\" - An internal flag for the fax_server pseudo-preference feature to be able to map it do subscriber profiles. Not directly used.',0,0,1); INSERT INTO `voip_preferences` VALUES (119,4,'emergency_location_object','MIME encapsulated Location Information in the INVITE',2,1,1,0,0,0,0,0,0,0,0,NOW(),0,0,'blob',0,'SDP MIME object related to location to be added on an emergency call',0,0,0); -INSERT INTO `voip_preferences` VALUES (120,3,'concurrent_max_total','Total max number of overall concurrent calls',1,1,1,1,1,0,1,1,0,0,0,NOW(),0,0,'int',0,'Maximum total number of overall (incoming and outgoing) concurrent calls for subscribers.',0,0,0); -INSERT INTO `voip_preferences` VALUES (121,3,'concurrent_max_out_total','Total max number of outbound concurrent calls',1,1,1,1,1,0,1,1,0,0,0,NOW(),0,0,'int',0,'Maximum total number of outgoing concurrent calls coming from subscribers.',0,0,0); +INSERT INTO `voip_preferences` VALUES (120,3,'concurrent_max_total','Total max number of overall concurrent calls',1,1,1,1,1,0,1,1,0,0,0,NOW(),0,0,'int',0,'Maximum total number of overall (incoming and outgoing) concurrent calls for subscribers.',0,1,0); +INSERT INTO `voip_preferences` VALUES (121,3,'concurrent_max_out_total','Total max number of outbound concurrent calls',1,1,1,1,1,0,1,1,0,0,0,NOW(),0,0,'int',0,'Maximum total number of outgoing concurrent calls coming from subscribers.',0,1,0); INSERT INTO `voip_preferences` VALUES (122,4,'voicemail_echo_number','Number to be played in voicebox',1,1,1,0,0,0,0,0,0,0,0,NOW(),0,0,'string',0,'If set, will be played as Number of the voicebox owner. Otherwise the number of the preference \"cli\" is used.',0,0,0); INSERT INTO `voip_preferences` VALUES (123,5,'lbrtp_set','The cluster set used for SIP lb and RTP',0,1,0,1,1,1,0,0,0,0,0,NOW(),0,0,'enum',0,'Use a particular cluster set of load-balancers for SIP towards this endpoint (only for peers, as for subscribers it is defined by Path during registration) and of RTP relays (both peers and subscribers).',0,0,0); INSERT INTO `voip_preferences` VALUES (124,3,'allowed_clis_reject_policy','User-Provided CLI rejection mode',0,1,1,1,1,0,1,0,0,0,0,NOW(),0,0,'enum',0,'Define an action to be executed if User-Provided Number doesn\'t match the \'allowed_clis\' list',0,0,0); @@ -3737,9 +3737,9 @@ INSERT INTO `voip_preferences` VALUES (320,12,'play_announce_to_callee','Play an INSERT INTO `voip_preferences` VALUES (321,4,'colp_cf','Show Call Forward Destination to Caller',0,1,1,1,1,0,0,0,0,0,0,NOW(),0,1,'boolean',0,'When forwarding a call, send the destination number or user back to the calling party.',0,0,0); INSERT INTO `voip_preferences` VALUES (322,17,'transcode_dtmf','Transcode to RFC DTMF events',0,1,1,1,1,1,0,0,0,0,0,NOW(),0,0,'boolean',0,'Translate inband PCM DTMF tones to RFC DTMF events.',0,0,0); INSERT INTO `voip_preferences` VALUES (323,1,'cfo','Internal Call Forward Overflow #',1,0,1,0,0,0,0,0,0,0,0,NOW(),1,0,'int',1,'The id pointing to the \"Call Forward Overflow\" entry in the voip_cf_mappings table',0,0,0); -INSERT INTO `voip_preferences` VALUES (324,3,'concurrent_max_in_total','Total max number of inbound concurrent calls',1,1,1,1,1,0,1,1,0,0,0,NOW(),0,0,'int',0,'Maximum total number of incoming concurrent calls going to subscribers.',0,0,0); +INSERT INTO `voip_preferences` VALUES (324,3,'concurrent_max_in_total','Total max number of inbound concurrent calls',1,1,1,1,1,0,1,1,0,0,0,NOW(),0,0,'int',0,'Maximum total number of incoming concurrent calls going to subscribers.',0,1,0); INSERT INTO `voip_preferences` VALUES (325,3,'concurrent_max_in_per_account','Maximum number of inbound concurrent calls for Customer',1,1,1,1,1,0,0,0,0,0,0,NOW(),0,0,'int',0,'Maximum number of incoming concurrent on-net and off-net calls to subscribers within the same Customer account, excluding calls from the application server and intra-PBX calls.',0,0,0); -INSERT INTO `voip_preferences` VALUES (326,3,'concurrent_max_in','Maximum number of inbound concurrent calls',1,1,1,1,1,1,1,1,0,0,0,NOW(),0,0,'int',0,'Maximum number of incoming concurrent on-net and off-net calls going to a subscriber or coming from a peer, excluding subscriber\'s intra-PBX calls.',0,0,0); +INSERT INTO `voip_preferences` VALUES (326,3,'concurrent_max_in','Maximum number of inbound concurrent calls',1,1,1,1,1,1,1,1,0,0,0,NOW(),0,0,'int',0,'Maximum number of incoming concurrent on-net and off-net calls going to a subscriber or coming from a peer, excluding subscriber\'s intra-PBX calls.',0,1,0); INSERT INTO `voip_preferences` VALUES (327,8,'last_number_redial','Enable last number redial VSC',1,1,1,1,1,0,0,0,0,0,0,NOW(),0,0,'boolean',0,'Enable the Vertical Service Code to redial latest dialed number for this subscriber/domain.',0,0,0); INSERT INTO `voip_preferences` VALUES (328,17,'convert_dtmf_info','Convert DTMF INFO to RFC DTMF events',1,1,1,1,1,0,0,0,0,0,0,NOW(),0,0,'boolean',0,'Convert SIP INFO messages containing application/dtmf-relay or application/dtmf payloads to RFC DTMF events. ATTENTION: for internal use only, external generated INFO messages will be not converted but passed through.',0,0,0); INSERT INTO `voip_preferences` VALUES (329,8,'contact_ringtimeout','Ring Timeout of each single contact',1,1,1,1,1,0,0,0,0,0,0,NOW(),0,1,'int',0,'Specifies how many seconds each single contact should ring before the calls goes to the next one. It is considered only in case of forking based on Q value.',0,0,0); @@ -3809,6 +3809,7 @@ INSERT INTO `voip_preferences` VALUES (393,8,'csc_conversations','CSC Conversati INSERT INTO `voip_preferences` VALUES (394,8,'csc_device_provisioning','CSC Device Provisioning',1,1,1,0,0,0,0,0,0,0,0,NOW(),1,1,'boolean',0,'\'CSC Device Provisioning\' - An internal flag to be able to map Device Provisioning visibility to subscriber profiles. Not directly used',0,0,1); INSERT INTO `voip_preferences` VALUES (395,8,'csc_hunt_groups','CSC Hunt Groups',1,1,1,0,0,0,0,0,0,0,0,NOW(),1,1,'boolean',0,'\'CSC Hunt Groups\' - An internal flag to be able to map Hunt Groups visibility to subscriber profiles. Not directly used',0,0,1); INSERT INTO `voip_preferences` VALUES (396,6,'peer_auth_registrar_server','Specific value for the registrar server',0,1,0,0,0,1,0,0,0,0,0,NOW(),0,0,'string',0,'Registrar server value is used as a registration R-URI as well as From/To domain in the outbound REGISTER.',0,0,0); +INSERT INTO `voip_preferences` VALUES (397,8,'reseller_id','Internal Reseller #\'',1,1,1,0,0,0,0,0,0,0,0,NOW(),1,0,'int',0,NULL,0,0,0); INSERT INTO `voip_preferences_enum` VALUES (8,62,'use domain default',NULL,1,1,0,0,NULL,0,0,0,0,NULL,NULL); INSERT INTO `voip_preferences_enum` VALUES (9,62,'no','no',1,1,0,0,NULL,0,0,0,0,NULL,NULL); INSERT INTO `voip_preferences_enum` VALUES (10,62,'no','no',0,0,1,0,NULL,0,0,0,0,1,NULL); @@ -4324,7 +4325,7 @@ INSERT INTO `voip_sound_handles` VALUES (149,'recent_call_deleted',12,1); INSERT INTO `voip_sound_handles` VALUES (150,'ringback_tone',13,1); INSERT INTO `voip_sound_handles` VALUES (151,'aa_timeout',2,1); INSERT INTO `voip_sound_handles` VALUES (152,'aa_default',2,1); -INSERT INTO `voip_subscribers` VALUES (3,'no_such_number',2,'9bcb88b6-541a-43da-8fdc-816f5557ff93','e57a61dbbf0c1e959b4d52b052d94cca',0,NULL,NULL,NULL,0,0,'none',NULL,NULL,NULL,NULL,NOW(),NOW()); +INSERT INTO `voip_subscribers` VALUES (3,'no_such_number',2,'9bcb88b6-541a-43da-8fdc-816f5557ff93','e1c2601c6a448a7b8aff90fb6a1c217d',0,NULL,NULL,NULL,0,0,'none',NULL,NULL,NULL,NULL,NOW(),NOW()); INSERT INTO `voip_usr_preferences` VALUES (1,3,97,'none',NOW()); INSERT INTO `voip_usr_preferences` VALUES (7,3,372,'cirpack',NOW()); INSERT INTO `voip_usr_preferences` VALUES (8,3,305,'never',NOW()); @@ -5651,6 +5652,75 @@ DELIMITER ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`sipwise`@`localhost`*/ /*!50003 TRIGGER voip_resellerpref_crepl_trig AFTER INSERT ON voip_reseller_preferences + FOR EACH ROW BEGIN + + INSERT INTO kamailio.reseller_preferences + (id, uuid, attribute, type, value, last_modified) + SELECT NEW.id, NEW.reseller_id, attribute, type, NEW.value, '0' + FROM provisioning.voip_preferences + WHERE id <=> NEW.attribute_id; + + END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8mb3 */ ; +/*!50003 SET character_set_results = utf8mb3 */ ; +/*!50003 SET collation_connection = utf8mb3_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`sipwise`@`localhost`*/ /*!50003 TRIGGER voip_resellerpref_urepl_trig AFTER UPDATE ON voip_reseller_preferences + FOR EACH ROW BEGIN + + UPDATE kamailio.reseller_preferences pp, provisioning.voip_preferences vp + SET pp.id = NEW.id, pp.uuid = NEW.reseller_id, pp.type = vp.type, + pp.attribute = vp.attribute, pp.value = NEW.value, pp.last_modified = '0' + WHERE pp.id <=> OLD.id + AND vp.id <=> NEW.attribute_id; + + END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8mb3 */ ; +/*!50003 SET character_set_results = utf8mb3 */ ; +/*!50003 SET collation_connection = utf8mb3_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; +/*!50003 CREATE*/ /*!50017 DEFINER=`sipwise`@`localhost`*/ /*!50003 TRIGGER voip_resellerpref_drepl_trig BEFORE DELETE ON voip_reseller_preferences + FOR EACH ROW BEGIN + + DELETE FROM kamailio.reseller_preferences + WHERE id <=> OLD.id; + + END */;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8mb3 */ ; +/*!50003 SET character_set_results = utf8mb3 */ ; +/*!50003 SET collation_connection = utf8mb3_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; +DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER voip_rwrulesets_crepl_trig BEFORE INSERT ON voip_rewrite_rule_sets FOR EACH ROW BEGIN