From the very origin of the AA module the link used in panel
to create/edit the AA slots were '/preferences/speeddial/edit'.
This is wrong and most probably coming from a copy and paste of
the speeddial feature.
The commit fix the link and it is now chaged to the following
'/preferences/autoattendant/edit'.
Change-Id: I095b433cad78fb0175b0551fcfdea85815f73cdf
* timezone names are converted to their links, and if a link
is found (means that the current name is deprecated), it's
validated and stored as the link.
Change-Id: I6348659178400a96eaadd70f79b792c4fa25d7d4
When calling a PATCH or PUT API on a peering group or
outbound rule the reload of the kamailio lcr module was
triggered before the update of the database, thus the
kamailio status was not updated.
Change-Id: I59ed863c85219e62d6f5b5a2af80db8ef952844c
We have to support new preference for:
- `create_peer_registration`
- `update_peer_registration`
- `delete_peer_registration`
If there is no `peer_auth_registrar_server` value provided,
then use a realm value instead.
Change-Id: I39d3a917c9f11c1d4cfa0781fe5a3cee11d9eeea
When the subscriber preferences API is called by a subscriber
admin of a normal (not PBX) customer, then some values are
removed from the output. In all the other cases those values
are instead returned.
This fix let expose the profile_id, domain_id, status and
webpassword to all the types of subscribers because necessary
in the CSC context.
Change-Id: I629475e7f51d747a55ebfbc44232fb94a54fed06
* clear_audio_cache is now invoked also from:
- when a sound file is added (to reflect use_parent/potential child
sets)
- when a parent is changed for a sound set (to reflect current
and potential child sets)
- when a sound set is removed (to reflect potential child sets)
* clear_audio_cache() is reworked
- clear_audio_cache() now calls virtual_child_sound_sets to
fetch all potentially affected child sound sets and also
clears audio cache for them. if the amount of fetched
sound_sets is greater than 10000 then the the whole audio
cache is invalidated
* _clear_audio_cache_service() is reworked
- supports/expects a list of sound sets and sends them
as a string with ':' separator
- if both sound handle and sound sets are provided it calls
clearFiles (so that only the specific sound handle is cleared)
- if only sound sets are provided it calls clearSets (so that
all of the cached files beloning to the sets are removed)
- if none of the above are provided it calls clearAll to invalidate
the whole cache
Change-Id: Ie85f208e27183e88665803b93bb16d7de8e3d7ac
* try/catch is used for send_email() to catch MTA exception
if the delivery cannot be done
* the email delivery error cause is stored in the panel.log
file
Change-Id: I351b01309ee576b0818610d5ed927874ae2d0822
additional variables for the new_subscriber mail
template:
username
password
webusername
webpassword
cc
ac
sn
Change-Id: I8deadee11b162ef66e9f210d20bca11aa747c18f
* $c->user->id was wrongly used in the advanced cfs selection and
now changed to $prov_subscriber->id to filter it regardless of the
user editing the cfs
Change-Id: I8fa65bbce625d4b21dbb620a1f92919ed7fe2a88
* subscriberadmin can only delete items that belong to the same
contract_id, otherwise 'read-only' forbidden error is returned
Change-Id: I3ef2716039626bc1b208a5c7af06cf87f69cad73
* uses prefix 'me.' for query types search_eq and search_like
in the where condition to avoid ambiguity if the search_rs
has joins that with the same column names
Change-Id: I90fef80970aa4415480b00bbed2fb9fbee1f1ccc
while provisioning.voip_preference_enums.default_val
is supposed to be a flag variable, it is NULL for
some prefs.
we prevent a 500 error when editing such value in this
case now.
Change-Id: Idc5e0f1f0de93f9d0b6645982025c8b45bae1ec4
* /api/billingprofiles PUT/PATCH reseller_id for "reseller" roles is forced
to the user one, to address an issue when reseller_id becomes
required on PUT/PATCH
Change-Id: I3fa556c5db5556c75bf481d18b51df6c400a1944
* API now has own GroupAPI form with the correct fields for API
* db/form field name conversion is moved to the newly added
resource_from_item() and process_form_resource() functions
* simplify code for GET/POST/PUT/PATCH operations
Change-Id: I99b76801a2894c8a4821513186796627db728189
* /api/soundsets new parent_name field
* /api/soundfiles now allow POST to be done without the upload,
for cases when an empty record needs to be added to define
"use_parent" behaviour
* improve sems audio cache clear on sound files change, now
sems instances that are not available (not running/request timeout)
are skipped instead of raising an error
Change-Id: I83af2ee2fd3672ab35cf330464ace68416ab52be
* in a scenario when a sound set was "edited" and then
a new one created, in the creation dialog the previously
edited sound set was missing in the list of available parents
Change-Id: I8d7652a9f7f881be6d700dc4f6cf77dc426261e7
The pre-call announcements and the ringback tone
are not under the subscriber administrator control.
This make difficult for PBX customers to modify those
announcements.
Due to that now all the announcement's handle are exposed
also to contract soundsets.
Change-Id: Ie6c98a6a6ed4de18b267bd553f33afc9eb72f995
* sound sets can now use other sound sets as parents, in this
case if a sound is missing for a sound set, it's taken from
the parent one if it exists there, chained parents are also
supported with the available sound files "accumulated" across
them.
* add "expose_to_customer" field to sound sets, it enables exposing
system sound sets to customers so they can be used as a parent or
assigned to the 'sound_set' preference by 'subscriberadmin'.
* add "use_parent" field to sound set files, it's true by default
(for existing or missing sound files) and if set to 0, then parents
are not used for this particular sound file.
* use_parent column is hidden on the UI if a sound set does not have a
parent assigned
* improve sound set handles list on the UI
- Upload is renamed to Add
- empty record are shown in the filename column as localised "(empty)"
and Edit/Delete action buttons
* API /api/soundsets new 'parent_id' field, default null
* API /api/soundfiles new 'use_parent' field, default 1
* API /api/soundsets new 'expose_to_customer' field, default 0
* API /api/soundsets customer_id field now contains the customer id
for 'subscriberadmin' role and 'null' if it's a system sound set
* system sound sets with expose_to_customer == 1 and within the same
reseller are now visible to 'subscriberadmin' on the UI and via the
API in read-only mode, same with the sound files that belong to the
sound set. If a system sound set expose_to_customer is set back to 0,
this sound set is automatically removed from all contract sound sets
where it was assigned as a parent as well as from all subscriber
'sound_set' preferences.
* contract_sound_set|sound_set preference API updates now have tigher
checks for contract_id and also if the system sound set is exposed
to the customer and belongs to the same reseller
Change-Id: I4908fd15e9c224d4c30794ceb8dae1b444bbf56a
a 500 error results when specifying the RewriteRule
"description" filter because of ambigous field names.
Change-Id: I9c0a9f6c84ec62fca4c77ce904fb07c4dadef13b
This commit forces the reload of the lcr gw table not only for proxy
but also for lb. This is necessary to get lcr counters data structure
updated every time we have an add or del through web interface of the
list of gateways.
Change-Id: Ic25bdf916346965962c19164cffc4c48bf2aef7d
Deletion of a disabled peer was not working because
panel was trying to get the correspondant ID from the
LCR table, while the entry is not there because peer
was in fact disabled.
To fix it an additional check has been added to
evaluate if the peer is enabled or not at the moment
of the deletion.
Change-Id: I3c488a8711c5f7b486b6c0a3950738fb8689bb07
In case device is provisioned with lines that use the
external_number feature, then the provisioning system
uses the pilot subscriber username instead.
This because the external_number is not properly
passed to the provisioning templates.
Change-Id: I48e494b303db318d504578f10e8b44aa9b64ddc5
* preferences form with enum values now set the default one as
selected if no preference is set yet.
* disable autocomplete for the preferences table fields. this
addresses Firefox using incorrect selected values even though
the correct data is sent by the server.
Change-Id: I6865eec05c085b89e651b125a7f35724859ccbc2
The feature is not used and most probably not working
at all since we don't support the jitsi client anymore.
Change-Id: I2ce4c56e30d604ea840a44b09021d14937777159
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: Ib9f4f37354a62ad59ba8c5b63ae476142b36e717
* detect WAV GSM 6.10 format and provide
sox with the correct type 'gsm'/'sndfile' as otherwise
it fails to detect it
* use Capture::Tiny instead of IPC::Simple for better capture
(out,err,rc)
* mp3/ogg decoding fixes to reflect the GSM 6.10 possible formats
Change-Id: I79c5657543ccc4741efb3bdd56d7a0a37f251a4c
to better fit the usecase of *updating* subscribers, we
make the contract and contract_contact sections no longer
mandatory.
Change-Id: If3c34f2cd3a5201cf7da2729369fd6b1003f1a80
* API: GET collection returns only distinct cf sets
* UI: inherited cf sets are now shown in the advanced view
and having suffix '(inherited)' to distinguish them from the
own ones as they are not available in the "Manage Sets" edit
dialog.
Change-Id: Ifd8c1a46fcb4c2c66f8f63268a1e91b80792c216
* the UI field device edit form now contains a checkbox
that, when checked, replaces the subscriber devices dropdown
with an input text (only [0-9#*] chars are allowed)
* aligned the related script code to automatically detect and handle
switching between the sub number / target_number
Change-Id: I70ae5cf5bb81f5953d25a760fbf0efe6c418f6cb
* subscriber role can now GET call forward sets that
does not belong to the user but used in call forwards
assigned to the user
* the user can only GET the sets but cannot update/delete them
(403 Forbidden is raised in case of attempt)
Change-Id: I391b802d962f4bbeae991e3046ac3f132a19edb6
* get_usr_prerefence_rs is streamlined to the other
get_*_preference_rs functions and prov_subscriber
param is now optional there, that allows to return
a resultset of usr preferences matching the attribute
name.
* this fix also fixes DELETE soundset where if contract_id
is defined, the logic tries to remove all 'contract_sound_set'
usr_preference across all subscribers that have it assigned.
Change-Id: Ia43327c8bcf93047d29da6401cbd97bce2971578
* update_item(): check that $resource->{attributes}
contains data and an array before processing it
* api-journals.t: fix subscriberprofile 'attributes' field
Change-Id: I28a2e22859cd998f99277e88037dff23981038f3
* cli preference assigned number is only checked when
the user's role is subscriberadmin or subscriber
Change-Id: I71f9207f4705eb1ae6f4ea0810dd3a1e541144cf
* on the subscriber profile preferences page, only preferences
that had enabled attributes plus had prof_pref = 1 were shown.
that caused confusions as subscriber profile attributes are
rendered from exposed_to_customer = 1 and do not use the
prof_pref flag, whereas the rendered preferences do not
use the expose_to_customer flag and use prof_pref = 1 instead.
now to avoid the confusions, all voip_preferences that are not
internal and have prof_pref = 1, shown in on the preferences page
(and accessible via API). if the list needs to be reduced, then
it must be properly done by removing the prof_pref flag for
them.
Change-Id: I7f2428e319d2c8d322ee5e4efd96615178c1f3ef
* subscriber profile form is fixed so that the attributes
list is now correctly shown in the old UI
* /api/subscriberprofiles update, attribute values are now correctly
transformed for the validation and processing
Change-Id: I4418250d4a0e702d75524ab5999eb47429be5a04
* Preferences::create_preference_form() now contains a check
for 'cli' preference to only allow numbers that belong to
the same customer if role is 'subscriberadmin'
Change-Id: I8eb3bed928a943330ab0045d2893365b533b0c16
* as_admin param is no longer needed as get_usr_preference()
fetches actually set preference for a susbcriber and used
only by the code (not exposed directly to 'subscriber',
'subscriberadmin' roles
* with the aforedescribed, get_usr_preference() no longer
filters by expose_to_customer, expose_to_subscriber for
'subscriber' and 'subscriberadmin' roles
* refactor get_usr_preferences() to be simple and in line
with the other get_*_preferences() as it's mainly responsible
for fetching the preference as requested by the internal
code
Change-Id: Ia52d8f4ebfd854901bf446e29fb475dea1fba866
* fix customer_view role name typo so that it's correctly limited
to for 'subscriberadmin' role
* revert behaviour of get_usr_preference_rs() to return undef if
no preference is found (no access)
* get_usr_preference_rs() now also fetches all internal preferences
for internal work for 'subscriber' and 'subscriberadmin' roles but
they remain invisible for them and not accesible for direct changes
(only when requested by internal logic)
* new get_usr_preference_rs() 'as_admin' parameter that enables
for internal requests to return the preference value for
'subscriberadmin' and 'subscriber' roles, currently used to
show 'lock' status and 'display_name', which are otherwise
inaccessible as those preferences do not have expose_to_customer,
expose_to_subscriber flags
* fix api_prference_defs() correct filtering of preferences for
'subscriber' and 'subscriberadmin' roles
Change-Id: I1a0e51ace1c649f9061deaccb7d6e9f8459f0ed8
* get_usr_preference now always returns a ResultSet object as it
expected. If there is no preference found an empty ResultSet
object is returned that does not have ->first. That is
now in line with how the usage of the function works in the current
codebase and should not produce errors when there was a preference
requested that did not exist and 'undef' was returned instead of
an object.
* remove 'skipping' debug code that caused a lot of spam in the
panel-debug.log reporting skipped usr preferences for
'subscriberadmin' and 'subscriber' roles
Change-Id: Ia9d033994e36afd48c2b6d91b08163f871a71b4c
* 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
* get_usr_preference() not expects $params{$c} to be passed as an argument
* fix update_voicemail_number() behaviour, it correctly updates number
for subscribers of a subscriberadmin as well as no longer fails
with an error if echo_voicemail_number or cli are not available
(not set or not visible)
Change-Id: I95fade92efb541146e9e56ba4f517af79fa71b5a
* :id is now the brainding's id instead of reseller_id.
That was rather a bug and now fixed and consistent with
the rest of the endpoints.
Change-Id: I794e577499050a95ed68c21af3f963f9f8e9c274
* add described query_params 'subscriber_id', 'reseller_id' so they are
avaialable on the doc
* remove search by param from Role::ResellerBrandingLogos::_item_rs()
* fix Role::ResellerBrandingLogos::_item_rs() queries
* Controller::API::ResellerBrandingLogos*
- now always returns the binary data containing the logo and with
the Content-Type header
- change NOT_FOUND message to indicate that the ResellerBrandingLogo
is either not found or does not have image/image_type
* do not log response queries
* fix allowed_role to be: admin, reseller, subsscriberadmin
Change-Id: Iaadb47fb2d72886a8d9244a523d5914500a4dd20
* subscriberadmin is now able to fetch cfdestinationsets of other subsribers
that belong to the customer
Change-Id: I212f0e31a8e77caa6f681f227771e0b11efb5f62
* subscriberadmin is now able to fetch cfsourcesets of other subsribers
that belong to the customer
Change-Id: I95217587430c52cd7078e1604ffec549ae2dd6b5
* subscriberadmin is now able to fetch cfbnumbersets of other subsribers
that belong to the customer
Change-Id: Ib92c161f320257ba2d6614e10d9eaf03247e7014
* subscriberadmin can now see all other customer's subscribers
call forwards as well as per subscriber_id
Change-Id: I4bdaf3390667fc7208fa6dbde9292b8ba911667f
the search field of admin-panel datatables was tuned/configured
over time to allow fastest possible search, "as-you-type".
for large tabels it eg. will only include indexed columns, which
never was transparent to the users.
the UI will now display tooltip texts with detailed hints about
included columns, wildcard support, etc.
Change-Id: I737732a55003d50068236bb0150a2f47d06deaf5
* "alias_numbers" array when the resource is prepared is
created directly from the resultset, avoiding 'foreach' loops and
conditions.
This improves performance on ~8000 voip_numbers from ~35 seconds
to ~3 seconds.
* is_devid is now always present in the "alias_numbers" object,
and it's =0 if there is no related entry in
provisioning.voip_dbaliases
Change-Id: Ia05b26208f3fec3a9b2203aafe9b4c09b98ca44d
* when a new subscriber is created via POST, if the associated customer
has at least one default contract_sound_set, it is correctly assigned
to the subscriber as the "contract_sound_set" preference.
the logic is now inline with the UI behaviour
Change-Id: Ifeb86faf6718648b29e6391bd16752766358ed0f
We need to trace sending mails to be able to track down
possibly not sent mails, see e.g. MT#31936.
Use quotesensitive to not leak from/to information into logs,
but handle this properly to ensure we're GDPR safe.
Change-Id: I4d09d073e12b1dd61053956252b59ad06a29d59d
* when customer_id query param is specified as customer_id=null
or customer_id=NULL it now correctly fetches soundsets that
do not have customer_id assigned to them
Change-Id: I8de3d9615c133c2abd3eb2b5f4fea8de5b652417
When the "Ignore domain" billing profile option is set, billing
fees will be matched against the 'destination_user_in' CDR field
(Instead of 'destination_user_in@destination_domain').
As a consequence, NGCP services such as vsc, conference, voicebox,
fax2mail cannot longer be charged by defining domain-based fee
entries (e.g. \.local$, @vsc\.local$, @conference\.local$,
@voicebox\.local$ and @fax2mail\.local$). Hence, these services
need to be matched differently when "Ignore domain" is set, if an
operator wants to charge for those services separately.
Only fax2mail calls has not predefined prefix that distinguishes it.
In order to normalize that and fix this issue the panel will create
and save in DB the CD destination for fax2mail with a new prefix:
'fax='.
Change-Id: I926909e46828b43e476c75f2b3e0c51e20a2a5b6
when ignore_auth_realm is "yes", it should no longer
be required to provide the domain part for subscriber
logins.
Change-Id: I346f94278c9b0d9a598858c24d797b03217123d4
Partially reverted commit 7f59aedb4 because it will scale the
asterisk voicemail greating messages rate to 16kHz where asterisk
supports only 8kHz.
Change-Id: I90ad14fc2ae37a9baf168a61e5454b285432fee9
we were sending this command:
> host:deactivate('NGCP::Panel::Model::DB::domains=HASH(0x55955564e6c8)')
Change-Id: I63271b05ee12d0ff3767b5d9376aec22352cb4d5
* the same key is now expanded only once to use the same
data ref otherwise expand like
contract_id.contact_id,contract_id.billing_profile_id
makes it so that 2nd contract_id would overwrite the already
existing (expanded) contract_id
Change-Id: I6cab67c2f549e9165dbf2cfd2f4b84daef503dd8
* expand=all now expands by the all resource keys instead
of the current form fields, that is to reflect keys that
are created manually in the response such as reseller_id
or domain_id
* ccare roles now correctly support /api/domains
Change-Id: I9951bfd97b76186def4dc799c72da44425faea4a
* ccare roles now have read-only access to profile packages, this
is needed for working with a customer
* enable expand for ccareadmin and ccare roles for the following:
- contact_id
- profile_id
- profile_set_id
- package_before_id
- package_after_id
* add expand support for admin,reseller,ccareadmin,ccare roles
- profile_package_id
- invoice_email_template_id
- passreset_email_template_id
- invoice_template_id
Change-Id: I926304363048e659af67d596dce93be29b3e67af
* ccareadmin and ccare roles are now able to correctly
fetch the list of billing profiles as well as request one by :id
Change-Id: Ie5f9203b1aa9de9f7ed870caa2ea06ba262c9bfd