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
* ringtimeout is now internal = 1 as this preference is dynamically
changed by CFT call forwards and is not meant to be usable from the
UI/API
Change-Id: I6c2abf94e455cf50cdbc6cf7122844582ba6bbb4
* expose_to_customer is now set to 1 for 'cli' preference so that
subscriberadmin users can access it
Change-Id: Ia661a7095457bd0fbf6eab5c74cd17eb224d7c3b
* expose_to_subscriber is a new preferences flag that
indicates that the preference can be read/modified by
'subscriber' role
* expose_to_customer now only does the same as expose_to_subscriber
but for 'subscriberadmin' role
Change-Id: I4b38ac5653e7132510354de4fd8b72d010d0ff68
* ncos_sets table contains a list of ncos_sets
* ncos_set_levels table contains "many to many" mappings
for ncos_sets and ncos_levels
* add ncos_levels.time_set_id column (default null)
Change-Id: Ib46fe46bd75ef13b8375961c93f586281f28866d
This reverts commit 1631573453.
The script is actually a one-time only script, no need to re-execute
it again, instead it fails to run due to:
| Applying revision script /usr/share/ngcp-db-schema/db_scripts/diff/15743.up: ERROR 1050 (42S01) at line 4: Table 'autoprov_firmwares_data' already exists
| failed. :(
Change-Id: I75ea1a0ce86064113032844a9ff4fc8a2b0af7cd
In git rev a9c1cf4cb we had to take care of adjusting the offset
variable to support MariaDB >=10.6 in the existing diff/15301.up script.
So that also existing installations receive that change during upgrade,
let's provide the according script which re-creates the
split_autoprov_firmware_data stored procedure.
Change-Id: Iae9634b39bda9f1ad63b2b6093f2e6095f68fc45
Thanks: Kirill Solomko <ksolomko@sipwise.com>
Fixes:
| Applying revision script /usr/share/ngcp-db-schema/db_scripts/diff/15301.up: ERROR 1064 (42000) at line 14: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'offset int;
| DECLARE chunk longblob;
| DECLARE done int DEFAULT FALSE;
|
| ...' at line 4
| failed. :(
This is caused by MariaDB having "offset" as reserved word, quoting from
https://mariadb.com/kb/en/upgrading-from-mariadb-10-5-to-mariadb-10-6/:
| New reserved word: OFFSET. This can no longer be used as an identifier without being quoted.
Now that Debian/bookworm includes mariadb-server v10.6.10-1
we need to rename the variable.
Change-Id: I9db699ef60259411b8b79305f08179d4989edcd2
* the new table is to contain data for customer speed dials
(that affect all subscribers under the customer)
* triggers that replicate the data into kamailio.speed_dial
Change-Id: I0bc175e0ede7fa79b296c83a7f0d512b03c74aab
rtcengine product has been discontinued already since mr10.5.1
so it is useless to keep the database in the system
Change-Id: Icdf06c8d9de9a0236a5fc87b645d698952db3b44
This reverts commit 5f34f84b04.
Reason for revert: upstream provide us with a solution that doesn't need a kamailio change
Change-Id: Ifdb7f8c55f27498a880cc35a104e20472e6e69f7
This modification enables the get uri related to a speed dial number for a group (with 3 digits - *999).
It gets the new_uri from the table speed_dial using the group_id, the sd_username and sd_domain.
Change-Id: I629c2b5e35b53ee21a1e3a67df7a66f095da9db4
We have to concern slow selections like this:
"SELECT a.callid FROM acc a WHERE a.method = 'INVITE' GROUP BY a.callid LIMIT 0,200000;"
which can take procesisng time over 10 sec (as reported in the WF ticket).
As a simple solution, we can give an additional index to the 'acc' table:
KEY `method_callid_idx` (`method`,`callid`)
Which will give us an indexation on selecitons with the WHERE clause on 'method' column.
Without the index (explain of the selection):
*************************** 1. row ***************************
id: 1
select_type: SIMPLE
table: a
type: range
possible_keys: NULL
key: callid_method_idx
key_len: 817
ref: NULL
rows: 2
Extra: Using where; Using index for group-by
With the index (explain of the selection):
*************************** 1. row ***************************
id: 1
select_type: SIMPLE
table: a
type: ref
possible_keys: method_callid_idx
key: method_callid_idx
key_len: 50
ref: const
rows: 1
Extra: Using where; Using index
The newer index is not to be mixed with the previously existing one:
KEY `callid_method_idx` (`callid`,`method`)
Change-Id: Ie8a4ab102adb8788d9e273bd5a9edf1ddbb702bf
In order to introduce the new 'fax=' prefix, we have to update
the already configured CF destinations to fax2mail, and prefix them
with 'fax='.
Change-Id: Id09886932ba3246b7e10b36fb4f3f50c61139c7a
New index for watchers table for columns "inserted_time" and "status".
This is a little performance boost since the function
ps_watchers_db_timer_clean() cleans pending subscriptions
using this columns inside the "where" clause.
Change-Id: I9cb2220f6fe89aa2070d9a739c4a3a0417e3de71
Remove 'serial' from the label and description of
'cloud_pbx_hunt_timeout' as this preference can now also
be used for parallel groups.
Change-Id: I66a51a5dddd9b872d97b2ec3de36ce79524abce6
Improve description of ignore_cf_when_hunting
explicitly stating that this preference
only affects members of hunt groups when called in a hunt group context.
Change-Id: I0cfb0f8187e18f2771055866879363ee0dd4a050
see RQRAINB-6610
Add the new domain/subscriber preference 'busy_hg_member_mode' to
determine if a huntgroup call can be distributed or not to a busy member.
The new preference accepts the following values:
- 'ring' the call is always distributed to the member whatever is
his/her busy status (note: default value for domain preference)
- 'skip_totaluser' or 'skip_activeuser' the call is not distributed
to a member considered as busy depending of the counter 'totaluser'
or 'activeuser'.
Change-Id: I83973d7bdae2420d8c6836ddcbc542eb7c6f9fd2
By default calls that come from a peer group and are looped back
to the same peer group due to a subscriber location mappings 'forward'
entry are blocked to avoid loop creation.
This preference allows to override the default behavior and permit
the loop over the same peering group.
It has to be used with caution and activated only if necessary.
Change-Id: I5040204805c3b2a740250cec11a8e9914333f10b
New subscriber location mapping mode "forward" is now part of the
enumeration inside provisioning.voip_subscriber_location_mappings.
Change-Id: I93bbecd1e88452ddbc5249f344c3ad66ddea8739
Set peer flag for the following user preferences to allow peer sdp filtering:
- codecs_list
- codecs_filter
- codecs_id_list
- codecs_id_filter
Change-Id: I619cd3c3f6f7d87b91502ecf7563556e991d5089
This value will be the default that is assigned to 'normal' subscribers
The HuntGroup subscribers will contain instead one of the other possible
values: 'serial','parallel', 'random', 'circular'.
Change-Id: I5400e2ccfa5af5905777f1bc608054e0743ea1ef
there is an issue with a cornercase of resolving
domain preferences allowed_ips overloads. the cursor
loop of the proc therefor now gets proper statemachine
logic.
Change-Id: Ieeacc4d7c8a931c6e9f0f8087b2a05112f78c675
rationale:
-ipv6 allowed_ip adresses were not yet supported in kamailio
-the current ipv4 allowed_ip check has bad performance
this change introduces a new UDF to check the UA ip against
allowed_ip and man_allowed_ip preferences in a fast and
convenient way, ie.:
SELECT provisioning.ip_is_allowed(
<subscriber_uuid>,
<ipv4_or_ipv6_address>
);
the check is based on range queries supported by indexes,
following the proven approach we already use for roaming/
billing_networks.
it requires to transfrom IPnet values of existing data into
numerical representation of the network start (network) and
end (broadcast) addresses.
mariadb does not support arithmetic or bitwise operation
for varbinary or numerical values larger than bigint, which
is required to calculate network and broadcast adresses.
the change therefore provides an own implementation for
large integer operations. it works with hex string
representations, which fits the existing mariadb "hex()",
"unhex()" and "inet6_aton/ntoa()" functions.
Change-Id: I9dbaa769252babf168243167c061f035f0f43242
All "transcode" preferences are listed as type "0" in the DB except for
DTMF and CN which are listed as "1". The LUA/Kamailio scripts fail to
include tyoe "1" preferences in the list of flags given to rtpengine.
Change the type to "0" to fix.
Change-Id: I38f0d9f1394e07b190f1bd196ac85f456017ae6f
play_announce_before_recording cant have 2 default values
and "never" should not be default for subscriber
Change-Id: I0ecfb76ac6d9f9c7e431f4bc4b28d2619a06e076
* fileshare is not replicated by default therefore the script
breaks replication and it is converted to not_replicated to
address that.
Change-Id: I52f59630f92f4b9c901a84a296cd9e53442f5c0c
* there can be more than one journal record created per a
transaction (e.g. a subscriber and a customer are created
at once, therefore the tx_id field cannot be unique)
Change-Id: I0046f41ec52412dbad319610d7b1b87988798586
- create table acl_roles that contains information about a role
- inserted existing roles (system, admin, reseller, ccareadmin, ccare,
lintercept)
- create table acl_role_mappings that contains information about which
role has access to other roles
- remove field role from journals table and add FK role_id
- add FK role_id and set the right one accordingly
Change-Id: Id92726e9aaf7c6f6c126b18a76f86fc133aea5ae
* susbcriber_id column is needed to relate the uploaded data
to the subscriber user
* reselelr_id column is needed to narrow down the scope of
files per reseller
Change-Id: Ie6ef264eb5e25e48f6458f74b310e451e406fef6
mariadb does not support variable referals in correlated
subqueries if the nesting depth is 2 or beyond.
so in short: below works ->
select
(select
count(*)
from table1
where id = root.id
) as cnt
from table2 as root;
... while this not unfortunately:
select
(select
count(1)
from (select
1
from table1
where id = root.id
LIMIT 1001) as q
) as cnt_limited
from table2 as root;
this can be solved by declaring the topical subqueries
in dedicated user-defined functions, so involved
panel/api parts will load quickly even with millions of
subscribers.
Change-Id: If96603cb4115259d719297af46c5bc7c10aadf76
for IPv4, ipnet length of 3*4 + 3 + 1 + 2 = 18 was
sufficient. for IPv6 ipnets we need to extend this
to 8*4 + 7 + 1 + 3 = 43 chars.
Change-Id: I9b44c63b58bc08bc41f0d50a9ec94234ffffd6c2
Extend billing.journals with fields required for RBAC for journals.
Added fields:
- reseller_id to limit reseller admins to their reseller
- user_id to reference admins or subscribers
- tx_id unique transaction id
- role defining the access scope the entry was created with
Change-Id: Id4a093a3ea668914d6f3214f79955d89b58263db
Description for field upn_block_clir is fixed.
This pref blocks outgoing calls and not incoming.
Additionally fixed anonymous typo.
Better description for outbound_from_display pref
Change-Id: Ic578da7b3c14689a3883a5f18c804105961eb5b6
Added the following options:
* use domain default
* Never send push
* Always send push
* Send push only if no device registered
* Always send push, skip registered devices
* Registered devices, then send push
* Send push, then registered devices
Change-Id: I78ef73e2de5a8692c393586d9298b46d429fa36d
We need to have the following columns in a new version of the 'v_subscriber_devices':
- ha1
- ha1b
Change-Id: Icfb466a302f1b0b3cb5fd93bd314438f11bf5d9e
play_announce_before_recording has been extended from on/off
state to multiple select state.
Now It can handle 4 different values (+ domain default):
- Always (all calls)
- External calls only
- Internal calls only
- Never (default)
Change-Id: Idbe70a4844b3ca6a4f240b5087deaff5d1007522
New foreign keys:
- 'sub_id_ref' - towards 'subscriber.id'
- 'lcr_gw_ref' - towards 'lcr_gw.id'
Beforehand delete all alone subscriber_id's from the 'sems_registrations'
in case they for some reason exist, this will prevent us from .up script failure.
Change-Id: Ib225cc11771c9038c408f6c409d95a417e7ac311
The format of Android push tokens is a free-form binary string of up to
4096 bytes. Currently the tokens are under 256 bytes long, but we expand
the DB field anyway to be future-proof. Unfortunately MySQL doesn't
allow keys that long, so we have to restrict the field to 3072 bytes.
Further add an auto-increment integer primary key to make InnoDB happy.
Change-Id: Ic664d47b80f751397ec51688d8f399da06eac176
New columns:
- 'id' - new PK for the 'sems_registrations'
- 'peer_host_id' - for filling it with IDs of SIP peerings
Remark: 'peer_host_id' and 'subscriber_id' must be null by default.
Change-Id: I7ecaa42e540a96a5d6835a78e391adc909aab111
fee matching works in 2 attempts:
1. try to find a fee matching <user@domain>
2. if none found, try to find a fee matching <user>
the billing_profile record will get a new field
"ignore_domain". if set to "1", step#1 above
should be skipped.
see commit id 1af70b
Change-Id: I4b05112db52afbf6f4369711ad946ff1070260ca
As the option to add default actions has been introduced for Auto-Attendant,
where we are using string literals as lables/values, we need to let the SQL
structure be compatible with this update.
Hence our customers will be able to set and then see the default action
in the Auto-Attendant menu for a subscriber.
Change-Id: I949d7b72c9211588389a64df9af49b0201587d87
- 'aa_default' gives a possibility to add the default URI destination,
in case no option have been previously done by the caller ;
Change-Id: I720ca1b53b2dbc04973eeebcc570772a8be1a417
Added new option extended_send_primary_plus_extension inside
extended_dialing_mode enum to enable a new extended mode
allowing to user to send the primary number + the extension
Change-Id: Ide1afe1b664be7dd499d203c26afb5ec8b42ba6b
Added crypto_base64_padding user preference for
subscriber / domain / peer under NAT and Media Flow Control
section.
Change-Id: I4b5c8f319a5da5d5260107211ba79d65793d948b
New peer/subscriber preference introduced:
* 'peer_auth_hf_user' - gives a possibility to specifically define the 'username' parameter of the Authorization header.
Change-Id: I295a4b548b95de5ca106281a71b6efa9c67d79d8
The additional column in necessary to get which is the username
of the subscriber associated to a particular device_id.
It is mostly used for presence status because kamailio has
to trigger presence based on the subscriber and not on
the device.
Change-Id: I881ea1e54c8b0e9635e9ceb96ed60ac8792bf50e