* fix 15783_not_replicated.up voip_phost_urepl_trig
lcr_rule_target update so only the correct
peering host is changed with the weight change.
* the fix is derived from 15839.up and created solely
for mr11.5/mr11.5.1
(cherry picked from commit fa6ececa59)
(cherry picked from commit 3dcc7bd7c5)
Change-Id: Ib525592dd55ec6c8349138236c49ea7030d58d61
* reason for this change is because the related
changes in the kamailio table get replicated to the
active node during the upgrade and that breaks outbound peer
provisioning / selection by running kamailio there
(cherry picked from commit c332fc9d9f)
(cherry picked from commit c32487c4b2)
Change-Id: I69416b5737cf05695cbfd1c2e4544faa8b1a2ab0
Support for the new HTTPS v1 protocol. GCM doesn't exist any more.
(cherry picked from commit d75b113db8)
(cherry picked from commit 3735469475)
Change-Id: I7017e5474ef699a2dcaf6d4d7f815193a2819685
There are 2 .up scripts that modify voip_allowed_ip_groups.ipnet
15702.up - modifies it to varchar(43)
15710.up - modifies it to varchar(46)
Because in 15710.up was backported into mr9.5 but is missing in mr10.5,
existing upgrades from mr9.5 -> mr10.5 apply 15702 after 15710.up,
effectively downgrading the column to varchar(46).
This .up script fixes the scenario and also the .down script modifies
the column also to varchar(46) to respect the previous 15710.up the
sets it to varchar(46), so to achieve the consistent state.
(cherry picked from commit 9c6ef86372)
(cherry picked from commit 354965d15c)
Change-Id: If14917ef437de3abf46b1900f68c9cc3a9a4b947
* Instead of using "set foreign_key_checks=0" before
altering voicemail_spool voicemail_users tables the
foreign key voicemail_spool.`v_s_mailboxuser_ref` is
dropped instead and re-created after the alter table operations
(same lines where "set foreign_key_checks=0" and "set
foreign_key_checks=1" were respectively.
* That addresses the changed behavior with MariaDB 10.11.6
where "alter table" statements the change columns involved
in a foreign key and potentially causing data loss are prohibited
even with "set foreign_key_checks=0".
* This change is only valid for new deployments and databases
with already applied 6425.up are not affected.
Change-Id: I2f2a85ca9f9f7d15058f41f5d8eaaec23ec501fa
(cherry picked from commit 25257f1657)
* update_sound_set_handle_parents() procedure is redesigned
to avoid "insert into select from" statements as they cause
gap locks when run concurrently and access the same index
rows.
*** WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 6594 page no 6 n bits 56 index parent_id_idx
of table `provisioning`.`voip_sound_sets` trx id 400852
lock mode S locks rec but not gap waiting
the "insert into select from" statements are reworked:
the "select from/with recursive" parts are now declared cursors
and the data is inserted inside the opened cursor loop (if any).
this way the selects are not causing exclusive gap locks.
Change-Id: I35ec28a33ecca42de898e67a2709eda4364e5f95
(cherry picked from commit 4017d3519c)
(cherry picked from commit 9c0fd6e4a1889ddbcbb3a90521dd3e2d3bfe73a5)
* use NEW.id instead of LAST_INSERT_ID() for INSERTs
into kamailio.lcr_rule_target as lcr_gw.id is now
equal to voip_peer_hosts.id
Change-Id: I5d905ddcc15cff2e72b64555a7393ec0c6dfea04
(cherry picked from commit 12ab0a6618)
* the relation between provisioning.voip_peer_hosts and kamailio.lcr_gw
is now based on id<>id instead of id<>flags. That is to address an
issue where code/components that queries kamailio.lcr_gw
or related tables like sems_registrations use voip_peer_hosts.id
and fail because there is no such record, that also frees up
lcr_gw.flags for the intended use to define peereing server attributes
and can be used in the future development.
* adjust voip_phost_crepl/urepl/drepl triggers that maintain
kamailio.lcr_gw table state to INSERT new records into lcr_gw
with forced 'id' as NEW.id, use lcr.gw in UPDATE/DELETE and no
longer change the lcr_gw.flags column
* update kamailio.lcr_gw.id to be equal 'flags' (where flags != 0)
* update kamailio.lcr_gw.flags set all to 0
Change-Id: Ied6843ef2aaa7b25af2627797f0d57c75d8f6094
(cherry picked from commit aec9db0018)
* cleanup potential leftover of method_callid_idx in
kamailio.acc that was created by the "wrong order"
issue where 15761.up (replicated) was applied first
(by replication) and then 15739_not_replicated.up
was applied afterwards (with ngcp-update-db-schema)
* this solves the mr10.5.x to mr11.5.x upgrade scenario
Change-Id: I0c8dc07d84e2fc5134b7f7a05212d07bb41f031c
(cherry picked from commit a5231e6f22a4c87a40d1b3d3f701a7af346330df)
A new subscriber preference has been introduced to control the
behavior on a termination of call legs in the early dialog stage.
Name: `cloud_pbx_hunt_cancel_mode`
Values: `bye`, `cancel` (default one).
Change-Id: I8f14f5d70068311fa7444ea223305fd7f542d37d
* convert unique key set_handle_id_idx (set_id, handle_id)
to non-unique to avoid deadlocks because of forced gap locks
in INSERT and DELETE concurrent operations (when such occur)
* "update_sound_set_handle_parents" procedure:
- avoid IODKU and instead calculate entries to skip on the fly.
- WITH and WITHOUT u_handle_id is now split into 2 separate
IF blocks as otherwise "AND handle_id = u_handle_id OR 1:1"
caused full handles update even if u_handle_id was there
* fix a typo for "TRIGGER voip_sound_files_create_trig AFTER INSERT"
which wrongly had "AFTER UPDATE"
* fix warnings of 'Truncated DOUBLE' coming from using IF evaluation
variable as boolean, IF(LENGTH(cte.parent_chain) > 1 addresses
it.
Change-Id: Id6b6ab66de53c2ccd95f28d23e5e2b97ece89923
* the ngcp.timezone table is not replicated and hence
the script must be also not replicated.
- the script is renamed to _not_replicated
- the ALTER TABLE ADD COLUMN is enhanced with
"IF NOT EXISTS" to mitigate scenarios where
somebody manually added the column on the other node,
and to ensure that the upgrades are safe
Change-Id: Ic44f76b5f3f43ae4124cebad30d559224fa90b31
* this addresses an issue caused by 15739_not_replicated script
that when not applied on the other replicated node, causes
this script to break replication. "drop index if not exists"
in this script addresses the issue and makes it so the both
scenarios are covered.
Change-Id: I8713d38ce3c4eab76b1d0b28adc6c0bd4c8260e1
* new column expose_to_custeomr in billing.ncos_levels
* new column expose_to_custeomr in billing.ncos_sets
Change-Id: Ieecd1a5d1e84fe001b89ea7f6e53ed531d25638a
* on update_sound_set_handle_parents() call delete
orphaned entries from voip_sound_set_handle_parents
do not have entries in the voip_sound_sets
* update_sound_set_handle_parents() improvements:
- when u_sound_set_id is not null:
= delete only child entries (before, also the parent entries
were removed)
= on insert, on duplicate update parent_set_id and parent_chain
to effectively skip entries that already exist and only
insert new entries
Change-Id: Id0881d9f79ddd05bc5be67d1f181ea809e43e180
The following preferences are now available for resellers
- concurrent_max_total
- concurrent_max_out_total
- concurrent_max
- concurrent_max_out
- concurrent_max_in_total
- concurrent_max_in
Change-Id: Idac41f416ac1c46244cf09c03f335f02a6f776f7
New table reseller_preferences inside provisioning created.
The new table is liked to the already existing provisioning.voip_reseller_preferences.
This commit includes the trigger in order to reflect changes from
provisioning.voip_reseller_preferences into provisioning.reseller_preferences.
Change-Id: I4a5e36813a30d902a817b2545c80c668cbf9663b
* new table provisioning.voip_sound_set_handle_parents
that is a helper table and contains current effective parents
for all sound set handles
* new stored procedure update_sound_set_handle_parents that accepts
sound_set_id or NULL, handle_id or NULL to update the helper
table (e.g. call update_sound_set_handle_parents(NULL, NULL)
to rebuild the whole helper table)
* new triggers around voip_sound_sets and voip_sound_files
that trigger the stored procedure when parent_id is changed
or a file changed/use_parent changed
* v_sound_set_files view uses the helper table now instead of
calculating all the nested sound sets and their handles'
parents
Change-Id: Ic775c077227b22b48f7129bf002e36ce353de82f
The param has to be exposed to subscribres so they can control which
calls will be recorded. Additionally this is a necessary step to
let the subscriber's profile parameter to view/hide call recording
working
Change-Id: Ifc5a557f8bfe55e4d040f067228e568420c6479d
New peer preference introduced:
* 'peer_auth_registrar_server'
The registrar server value is to be used for REGISTER R-URI,
as well as From/To domain in the outbound REGISTER.
Change-Id: I92f9f6917daa85456031c87f45233eda8c7302de
Add r_ua for cdrs, this field will store the user agent
answering to the first invite with 200 OK.
Change-Id: I0bf768a8cd4bb712a9c0b04cd7714878e6cec259
Add r_user field for cdrs, this field will store the user part
of the Request Uri answering the first invite with 200 OK.
Change-Id: Idfc666ad108aea9791d3eae473959c382b7f9caa
During the replication the statement syntax is changed a little bit so
it ends up as diff in ngcp-db-compare-schemes.
Continuation of b0078a5c.
Change-Id: I84b1e84ef910bcc2df31d430588192105463fdfa
During the replication the statement syntax is changed a little bit so
it ends up as diff in ngcp-db-compare-schemes.
Change-Id: Id6095c90235142304bcb0432244d4cf13db74071
* there is already an existing composite index
callid_method_idx (callid,method) that covers the
'where callid' and 'where callid and method' cases. the additional
index method_callid_idx (method,callid) is excessive because
it only need to cover the 'where method' cases, the rest
is covered by callid_method_id. To reduce the disk space
and the additional sql overhead for CRUD ops, method_callid_idx
is adjusted to method_idx (method)
Change-Id: I3659ecb7062f005125f08ec5cf85c674d1abe0f5
* due to the fact that the initial script had been created as replicated
and then renamed to _not_replicated, caused already deployed platforms on
mr11.1, mr11.1.1, mr11.2, mr11.2.1 to have the index in both tables
(because of the upgrade/ngcp-sync-db step on sp2) and a missing
record in ngcp.db_schema for 'sp2' (because the script was named
as replicated initially). To further address the issue, "CREATE INDEX"
is now adjusted to "CREATE INDEX IF NOT EXISTS"
Change-Id: Ie1554bad9300da5ff711cfe53d1cc6c14f91793d
* the db scripts have 'set sql_log_bin=0' but do not have the
_not_replicated filename part. they are not renamed to have
the _not_replicated required part.
Change-Id: I78d841f5ac4c5dff7c13e292746688faecd062d9
In the process of improvement and optimization of the whole
soundset structure, it is fundamental to make the contract
soundset behaving exactly like the system soundsets.
Due to that now all the announcements are exposed to customers
Change-Id: I5da9162ed544e69336e954d9257a180898157014
* add provisioning.voip_sound_sets parent field, that is null by default
and can be set to another sound_set id to indicate it as own parent.
* add provisioning.voip_sound_files use_parent field, boolean not null
default 0. this field defines wether parent sound sets should be
used for this sound (default yes).
* add v_sound_set_files view that returns an accumulated
representation of sound files available for sets for all the
available sound handles.
Therefore "select * from v_sound_set_files where set_id = 3"
returns all available sound handles and the filename and data columns
containing the according content either from the current sound set
or from first parent that contains a non empty filename and data,
or until the sound set (current or parent) with the use_parent field = 0.
* parent_chain virtual column contains a ':' separated chain of parents
used for the sound set.
* data_set_id virtual column contains the sound_set that was used for
the sound data or null if there is no sound data.
* voip_sound_files update index from handle_id_ref (handle_id) to
handle_set_id_idx (handle_id, set_id) for optimised behaviour
of the v_sound_set_files view.
* add provisioning.voip_sound_sets expose_to_customer field that
enables the sets to be used by customers.
* update provisioning.voip_preferences 'sound_set' attibute with
expose_to_customer = 1
Change-Id: I06fb384d911cfe1d2ffe7be8fd2ba8d80468662f
If any user depends on the previous format for mono Opus, this makes it
possible to preserve the old behaviour.
Change-Id: Ib0587585278cf143046b1210e93c6f8230b81749
The 'enable_t38' preference was added long time ago to
provision of phones that support fax services with t38.
We don't support those devices since long time.
Additionally the preference creates confusion with real
subscriber feature of enable t38 for mailtofax/faxtomail
service.
Due to those reason the preference can be removed.
Change-Id: I05b0f353eff9dcc6d57f51c6a32a6756f692d29d
This preference was created long time ago to support
the automated provision of a desktop jitsi client.
The feature is not used and most probably not working
at all since we don't support the jitsi client anymore.
Change-Id: I4592b8130a26adec04352af00bdbea939f3d2aa0
The feature was never really used and no customer is using
it at the moment.
Removed from the DB the following
voip_preferences:
* dialogic_mode
* dialogic_ip_rtp
* dialogic_ip_config
* dialogic_out_codecs
* dialogic_ss7_opc
* dialogic_ss7_apc
* dialogic_ss7_dpc
* dialogic_nfs_server
* dialogic_nfs_path
* dialogic_snmp_system_name
* dialogic_snmp_system_location
* dialogic_snmp_system_contact
* dialogic_snmp_community_name
* dialogic_ip_snmp_manager
* dialogic_use_optical_spans
* dialogic_is_isdn_userside
voip_preferences_enum:
* dialogic_mode
* dialogic_out_codecs
voip_preference_groups:
* Dialogic Settings
Change-Id: I5c483ffc61728fc2de7134d4ebd84593955ba184
The preference is used only for device provisioning
to give priority to user changes over the automated
provisioning coming from the server.
Change-Id: I65bb0b90b80e11aa34f7b56019f0b57319678cc0
Activate profile preferences to all the options already
available for both subscriber and domain.
Extend 'music_on_hold' and 'clir_intrapbx' to be
domain preferences.
Add 'ignore_cf_when_hunting' preference to subscriber
role.
Fix and update 'expose_to_customer' and 'expose_to_subscriber'
columns to properly expose what is necessary for each
role and hide features that should be activated only
by system administrator.
Change-Id: Ia0aa8f9f10dc1bab47ff8b9ccfc90c2741e988e0