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
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
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
* release column is going to contain the ngcp release
version when an .up script is applied and also used
with --mode down --to-release mrX.X.X to automatically
downgrade releases to a specific version
Change-Id: I8750646eee6076bc343a0c05e5c85c137458ef92
* Add `value` to the uda_idx, to reduce/eliminate gap locs and deadlocks from
the API /api/subscribers update scenarios
Change-Id: I62feb07c4df1675771b93e2a29a2aa126a14d34a
* voip_phost_crepl_trig: enum default preferences are now always
created regardless of the enabled state, otherwise that led
to peering servers to be created without their default
not null enum preferences in voip_peer_preferences.
* fix missing not null enum preferences for peering servers
Change-Id: If8cecb5570ba876643207931ecab1e42a994a2fe
* 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
Add support for on demand recording allowing now 4
different configuration types for the 'record_call'
preference:
* 0 = never record
* 1 = always record
* 2 = on-demand record (initially disabled)
* 3 = on-demand record (initially enabled)
Peers cannot use the on-demand recording
Change-Id: I17db074ea7cd690493eb48faa335ef2bfd3a0603
* 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
This commit introduces a list of tables required
by the mod_callcenter module of the FS:
- `kamailio.queues` - custom table which is meant
for usage by our internal http(s) gateway
- `kamailio.agents` - table taken from the upstream
- `kamailio.members` - table taken from the upstream
- `kamailio.tiers` - table taken from the upstream
Database `kamailio` will be used to store tables,
since traditionally other components such as voicemail
server or SEMS are using it as well for storing own tables.
Hence, there is no need to create new database for FS.
P.S.: Master upstream sources of the `mod_callcenter`
were used to get the SQL schemas.
Change-Id: Id88f5b6f8d6dd3f5681034e080a763c9beaba1cf
presentity messages in kamailio.presentity are volatile,
so we copy them to a accounting table for later CDR export.
this cannot be done in mediator, since the presentity message
is emitted after the call has ended.
Change-Id: I6571023664694fef8ae4a071f658960032879c5c
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
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
* 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
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
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