* fix peering hosts weight update to be correctly performed
only for the same peering host (was for the whole peering group).
(cherry picked from commit fa6ececa59)
(cherry picked from commit e953551b9b)
Change-Id: Iaca327b1d49f2e50f9aa258e72392ffafe271fd3
* recreate provisioning.voip_phost_*_trig triggers with the same
content to fix a possible discrepancy caused by
15783_not_replicated.up
(cherry picked from commit 88a9810fd6)
(cherry picked from commit 68c5b25c4a)
Change-Id: Id184e50c94ba9f92eb4ba6d243457e0343353704
* triggers are removed from the not replicated script because
they create an issue if this script is applied on the other
node after 15791.up and 15797.up and revert the triggrs to
inintended state.
(cherry picked from commit ed514b8312)
(cherry picked from commit 2b2b3379e5)
Change-Id: Iac830c24d0d51d693e6dbe76cea3766feebf7dd8
* make 15798 as "not_replicated" otherwise the "freeswitch"
database creation is not replicated to the other nodes during
upgrade because there are no my.cnf yet with
"replicate-wild-do-table=freeswitch.%"
* all CREATE statements in the .up script adjusted to be as
CREATE ... IF NOT EXISTS, as the not_replicated script will
be executed once more on the existing deployments.
(cherry picked from commit 1163d44c59)
(cherry picked from commit d4a37a2646)
Change-Id: Idf6c9e8a304639ecabab0a442273cba4b306a6e1
billing.journals replication to 3308 is now ignored
because it is not in use on proxies
(cherry picked from commit 383f7523b1)
(cherry picked from commit acdf9d7c97)
Change-Id: I28100d7bb824f742378684010ce29e7794ccf875
* 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 d6ef517165)
Change-Id: I69416b5737cf05695cbfd1c2e4544faa8b1a2ab0
* freeswitch table is now synced to 3308 by ngcp-update-db-schema
because it's fully replicated in my.mysqld2.conf
(cherry picked from commit 1a2d9e4468)
Change-Id: Iadbd99e11df054e95e37bb56aa7576c387761e84
* new command line boolean option --ngcp-upgrade that enables
ngcp upgrade related logic (particularily sync_ro_db())
if not specified - NGCP_UPGRADE env var is checked to
auto enable it
* sync_ro_db(): rework master node detection:
- preferred master node selection is now only performed when
ngcp_upgrade is enabled
- fix and improve node side detection by either using regexp
or checking if the name is 'sp1' or 'sp2'
this logic is important because during the upgrade the sync must
be done from the db node of the same side, as otherwise old database
version and might be synced.
- mysql database is no longer synchronised to 3308 (it's already
removed from replication)
(cherry picked from commit e5a4c75f97)
(cherry picked from commit 4d014bcdff)
Change-Id: I151c725058627ec409b65a9e889a81a08f3a9129
Support for the new HTTPS v1 protocol. GCM doesn't exist any more.
(cherry picked from commit d75b113db8)
(cherry picked from commit 09925b25cc)
Change-Id: I7017e5474ef699a2dcaf6d4d7f815193a2819685
The change of the ENUM 'direction' column removing old values
and adding the new ones, creates problems to existing HM
records.
The records with direction 'inbound' or 'outbound' loose
their direction right after the ENUM is updated.
To fix the issue we have before to add the new values,
then migrate the enties, and finally remove all the values
not needed.
(cherry picked from commit 06f112cfb6)
(cherry picked from commit 9e40b56b62)
Change-Id: Ib350b6aaada2cdabccb01947f131d3389e1a5110
* --defaults-extra-file arg is now provided first in the list
of args for the mysql command, otherwise it fails with:
/usr/bin/mysql: unknown variable
'defaults-extra-file=/etc/mysql/sipwise_extra.cnf
* get_db_schema() goes to shutdown(1) if db_schema is empty
and mode is 'down' or if --downgrade-release provided with a
non-existing release version
(cherry picked from commit 9f2d351357)
(cherry picked from commit 85bb6d3b1c)
Change-Id: Ia7621f93fed2a4e7054af11930698348a57df92d
* 'proxy' role is not correctly checked not only that it does
not exists in the config.node_roles object but if it exists
it is checked that it's True/False, to correctly skip sync_ro_db()
if it's False
(cherry picked from commit 397da1d5a0)
(cherry picked from commit 17eda110b3)
Change-Id: I03061362c508e474782cf98e81020b067b4ff583
Commit 5f0bfdae7c wrongly disabled
preference ignore_cf_when_hunting at domain level.
Actually in template there is a reference to this parameter at domain level
(it was missed on first analysis) and for this reason
the corresponding flag in provisioning.voip_preferences must be set to 1.
(cherry picked from commit 9a9374edc2)
(cherry picked from commit d130676aed)
Change-Id: I89b9597e8bc46a8ccf3e07edcb13199a831aef68
* this column is added to billing.admins and
provisoning.voip_subscribers to control the amount
of consequent bans for progressive ban increase.
Change-Id: I09c5205294b11aec16f0c6a7a3b9257ff5b90e01
(cherry picked from commit 95b0f87239)
* provisioning.voip_subscriber_password_journal stores last
used sip passwords per subscriber
* provisioning.voip_subscriber_password_journal stores last
used web passwords per subscriber
* billing.admin_password_journal stores last
used passwords per admin user
* add password_last_modify and webpassword_last_modify into
provisioning.voip_subscribers to keep track of password age
* add saltedpass_last_modify into billing.admins
to keep track of password age
Change-Id: Iff5dd016a2542a01a36ebcf50f561911fb5f7bed
* 15800 revision contains additiona of `ngcp.release` column and
this column is crucial during downgrades and cannot be removed,
therefore, this revision is automatically skipped during downgrades
as non-removable.
Change-Id: Ic16119cf08cd239db089e5bb202ec5154bfb1713
inbound/outbound no longer represent the "full" direction and belong
only to A leg, so they are renamed to a_inbound/a_outbound accordingly.
The up-script is not replicated because while the first half of the
nodes is upgraded the other half shoud continue to work with the old
parameters.
Change-Id: I1ac49b44c439ae1ba00c0862968c58831c605279
This is needed to perform manipulations to the SIP message
just before it leaves the system on the B-Leg side.
Change-Id: I61ee456d84061092af26ede51a99c480aca66a1d
* as announce_conn_type is of the enum type now there are
potential leftovers in the usr/dom/prof preference tables
that will cause the provisioning to not function correctly,
therefore, the "" empty values are removed from those tables.
Change-Id: I37ffe4720889a29b9e054aa816b785059ef36222
Use a real NULL value instead of string.
Additionally: update description for the preference
'announce_conn_type'.
Change-Id: I144702d0b6decfde42b075eb50399b68ed5b4818
The preference is available only for subscribers and it is
not exposed to customers or subscribers.
It contains a list of numbers that the subscriber is allowed
to call even if blocked by the NCOS. If the called number
matches, then all the NCOS and administrative NCOS checks are
skipped.
Change-Id: Id366a405efe5228405fc95419bdfc2eaddc6e69c
* use join instead of tuple to build
WHERE revision IN config._post_set_release_for_revisions
because in case of one element tuple represents it as
(15708,) which is invalid sql syntax.
Change-Id: I48f408556ace6dbed303a10fa3c4ba4759e5eaf4
* add support for db_schema release column.
* a new command line option '--set-release'
* when .up scripts are applied - the db_schema release column
is set from either --set-release option or /etc/ngcp_version
as the fallback.
* the release column is updated for all applied scripts after
all of them are applied, that is to include revisions that
were applied by the script before the 'release' column.
applied_at timestamp is preserved to keep the original time
when the revision was applied.
* new command line options --get-release-info and --as-json:
when --get-release-info is specified - a table with
"release,min_revision,max_revision,count" is returned and
no scripts processing takes place. With --as-json the data
is returned as a JSON string instead (for possible parsing
automation purposes).
* new command line option --downgrade-release:
- mutually exclusve with --mode
- automatically enables --mode=down
- removes all revisions that match the specified release version
* fix --mode=down --batch-mode, add missing ';' between delete
and commit sql statements.
Change-Id: I529ab523d7886a94848f6d9bbcf4a0348d0842ef
Kamailio proxy evaluates the preference "ignore_cf_when_hunting" only at customer
(contract) level but web interface lets the user set this pref also at domain
and subscriber level.
This leads to some confusion, the web interface user is fooled by this preference
and thinks something is wrong inside kamailio proxy because enabling/disabling
"ignore_cf_when_hunting" at dom/subscriber level has no effect at all.
Original implementation treats this option as something that must have
a global impact as demostrated by the same preference into config.yml.
Change-Id: I2ba28709dac8a3348049ad9dd5f116ce9d86d9f8
Add header=P-Preferred-Identity for cdrs, this field will
store the P-Preferred-Identity header of the initial INVITE.
Change-Id: I3a6c4a26bda18b80c9f25caf42328eab1e7171cc
Subscriber administrators should be able to configure the
preferences of each single provisioned device. Due to that
this commit set expose_to_customer=1 for all the preferences
flagged with fielddev_pref=1.
Change-Id: Ifdc4e32212aa2e948d41bcf019bf1051be6b7c7d
* get_db_schema() now issues a commit after selects to cleanup
any pending ngcp.db_schema row locks as otherwise applying
an .up script that modifies ngcp.db_schema (usually applied outside
of the connection handle by invoking 'mysql' command) causes
wait locks.
Change-Id: Ie0557a1a7648baeba2ec6ded3665c51667877101
By mistake in commit 7aab6d290d the new 'rcv_display/np_display'
option was added to the 'outbound_from_user' and 'outbound_pai_user'
preferences instead of 'outbound_from_display' and 'outbound_pai_display'.
This fix revert previous addition and add it to the correct preference.
Change-Id: Ifed659b22dbde621fbf366092268e6416e9ad4ba
This new column will be used to store a flag (value 0 or 1) that
controls wether the CF is processed as usual (flag with value 0,
default) or generates a 302 redirect message back to the
caller (flag with value 1).
Updating also the 'v_subscriber_cfs' VIEW to add thhis new column.
Change-Id: I74e53a526810f0145e305b90c3c3bd56cf91bc61
This will add support to both 'outbound_from_display' and
'outbound_pai_display' for a new method called 'rcv_display/np_display'.
This will allow to use the received display name if available
and the network provided one as fallback.
Change-Id: Iab0335c73ea6aba883b111645abec17bfede9386