* --db-scripts-dir option enables override of the
default database scripts directory location
* docstring a bit more compact formatting
* apply_revisions(): improve non-existing directory
detection and error output
Change-Id: Ic1d74244244df6406fb9a9258b7c36b971497513
When we add the peering server into dispatcher table,
we need to set his flags column to 8, in order to enable
the probing, and keep flags 0 in the other internal
dispatcher entries (lb,sems,asterisk).
Also we have to update all current 'flags' values in
dispathcer for peering server (with setid=100) with the
new value 8.
Change-Id: Ie8c07639b49dcf8963459bfe1c3cabc12233c6a4
* it's not a responsiblity of the script to start/stop
any external services and therefore, mariadb start
is removed
Change-Id: I220ebab7764a7016b15e6f08a8ac5ae01fe08523
* new command line option --db-defaults-conf-file
* new command line option --db-connect-method
* connect_db(): improve socket or config selection
* add mysql connect method as mysql command line options when
run_cmd('mysql' ...) is invoked, so that the mysql console connection
matches the pymysql connection
Change-Id: Ice8ff1e79c133d634f3de5bce204c7889f69b42d
* add new command line option --db-socket that overrides
the default socket file location
* MYSQL_SOCKET env is now considered as the socket file location
replacement, only if there is no --db-socket option set
* config.skip_sync_db is renamed into config.skip_ro_db_sync to
be consistent with the command line option
Change-Id: I4f113cdc8ad430f17ce022cdbbceef44e769857d
* ngcp-update-db-schema is rewritten in python. that simplifies
the code, as well as enables flexibility and more complex features
support, as well as performance improvements
* full strict mypy compliant
* flake8 compliant
* google docstring complied
* add .down scripts support
* add docstring full documentation
* add mypy, isort, flake8 checks during build phase
* add command line arguments that support --to-revision, to stop
.up/.down scripts execution when it reaches a certain revision
* better support for ngcp-sync-db
* preserve AUTOMATED_INSTALL_MODE and SKIP_SYNC_DB env vars support
for backward compatibility, in the future it is recommented to
switch to the existing (--automated, --skip-ro-sync-db) options
* experimental batch mode support where instead of applying changes
one by one, they are accumulated into a file along with db_schema
revision tracking changes and applied at once
Change-Id: I4632393d52d1a60c945b4d87a779f1a073ed9a5f
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.
Change-Id: If14917ef437de3abf46b1900f68c9cc3a9a4b947
Expose peer_auth_registrar_server to usr_pref to align
the subscriber remote authentication to the peering
authentication.
Change-Id: Ib65b9b40b70dc9eb122411e27793c1f6ecb8dfc5
announce_conn_type defines what type of connection
to use in case of CF to Office-Hours or Early Rejects.
If set to 'early' the announcement is played with early
media (183).
If set to 'established' the announcement is played
after a 200 OK.
Change-Id: Idef2577f566b63ebd9f91c7c120a1761d88bf217
With current set of options (which are quite similar to the ones in
/etc/mysql/my.cnf) db script db_scripts/diff/15787.up renames the index
name of voip_preferences_enum.preference_id to pref_id_fk.
So to fix this problem and prevent any further ones - copy existing
/etc/mysql/my.cnf and modify it for dedicated instance.
Change-Id: I9311c12d0d3f0bf0e5a28a40790dd6908a92f32a
* foreign key preference_id -> voip_preferences.id now has
ON UPDATE CASCADE ON DELETE CASCADE, to correctly recursively
remove records from voip_preferences_enum
* all records in provisioning.voip_preferences_enum with orphaned
preference_id (does not exists in voip_preferences) are removed
Change-Id: I36950dbebefa72beb8a20d5373aeb692cb33211d
* provisioning.voip_fax_data replication to 3308
is now ignored because it is not in use on proxies
Change-Id: I8d7af9d3fa44f684bb7557cd66133946a802f5c7
The method 'none' was added is commit 63815c948 as dedicated
request from a customer to support provisioning of phones
without ZRP.
During future changes to the supported values, in the commit
34273a837 the 'none' value got lost by mistake.
This commit will re-add support for the 'none' value.
Change-Id: Ia1b0367923b15e55c1dcfb69655bd23954033c77
* 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
* 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
* 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
* all existing table columns that inherited wrong
'timestamp default NULL' definitions with MaraiDB 10.9+
and explicit_defaults_for_timestamp with the new default
values there (which is 1) are updated to 'timestamp default NOT NULL'
that corresponds to the expected behaviour
* explicit_defaults_for_timestamp is explicitly set to 0
in the templates starting from mr11.4+
Change-Id: Ief3477793eb271b8db3833b68d0f46690d780d33
If preference 'sip_ping_notify' is set and the user fails to reply
to the NGCP SIP ping (OPTIONS), the system will
trigger a CSTA event if and only if the reply
code matches the 'sip_ping_notify_codecs_list'.
Reply codes 200, 403, 404, 405 and 486 are considered 'good'
replies and will never trigger a CSTA notification.
Change-Id: I9639fdd2abdfb6beeb935d3c4f32e3c32d43f947
We have to add a newly introduced application server (:5085)
to the `kamailio.dispatcher` table in a role of PBX server.
Change-Id: I9a0e52489b298f4362813fa9257211420dd6c164