* sample rate was downscaled to 8k by sox for all sound files,
it's now set to 16k for better audio quality
Change-Id: I7447e08ed90147ec98e110419cc4c068b8299848
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: Ieeeb382a027990ed8fc90aae6893e526019f40fd
* it is possible to expand arrays of ids now
* add expand support for pbx_group_ids
* add expand support for pxb_groupmember_ids
* remove _password and _webpassword internally prepared fields
from expands by subscriber_id, pbx_group_ids, pbx_groupmember_ids
Change-Id: I7651aae4c58d98943e82d1eda6b24d260ff2480a
* if $resource does not have reseller_id then the user's one
is used to write into the journal entry
Change-Id: I33ab6fe6271bd6be156b247c830eecea6e2f63ea
* "Header Manipulations" UI is now hidden for CE
* /api/headerrulesets is now hidden for CE
* /api/headerrules is now hidden for CE
* /api/headerruleconditions is now hidden for CE
* /api/headerruleactions is now hidden for CE
Change-Id: I717b9d3cdf693f01e32f81086b69aafce4f3113a
* templates now rely on c.config.general.ngcp_type and hide
the Phonebook feature everywhere if ngcp_type is CE
* introduce "allowed_ngcp_types" config for Controller::API::*
that is an array, and when specified, only the ngcp_type
roles are allowed, otherwise if not specified all ngcp types
allowed (default)
* Controller::API::Root:
- filter controllers from the documentation rendedring
that have allowed_ngcp_type config
specified and do not match the current ngcp type
* Role::API Role::Entities*
- new method check_allowed_ngcp_types()
- check_allowed_ngcp_types() is now called in Entities and
EntitiesItem auto() and denies to 404 Path not found if
the ngcp type does not match
* "Phonebook" UI is now hidden for CE
* /api/phonebookentries is now hidden for CE
Change-Id: I41d4b2f87121f281472be3775b862333923fe37f
* the attributes fields list in field_list() {} was rendered
without the field name, causing internal issues in HTML::FormHandler
Change-Id: Ic4c7a0454135b2bf394a0fb8c4291a0fadd06df6
* session->rpc is not in use anymore and had $parts there which
was a leftover from the inew billing cleanup and moving $session
into the Controller/API/SMS
Change-Id: I6d9612cd3f3cbc57fe1b7df6584ad779dca64288
SMS prepaid billing using libinewrate is not supported anymore
* remove init_prepaid_billing, perform_prepaid_billing,
cancel_prepaid_billing functions
* /api/sms POST is now self sufficient and use $session
internally and does not call *_prepaid_billing functions,
nor rely on them
Change-Id: I483f27ce82c7e0a039ce1f3f44c24bd9db75dfec
in order to expose a pref "<current pref attribute>" in the rest-api
under it's "<old pref attribute>" name, a preference "renaming"
transformation can now be specified like this:
www_admin:
...
preference_in_transformations:
...
<old pref attribute>: <current pref attribute>
preference_out_transformations:
...
<current pref attribute>: <old pref attribute>
Change-Id: I17ad7d4f880d5760329465d60134df1c06f8fd08
* customer_id filter is now possible, which behaves the same as the
existing contract_id. This is to add consistency as filtering by
customer_id is available in other endpoints
Change-Id: I1577d06133f9629c363940a4e8d2fb8012336e21
* peer server preferences such as rewrite_rule_set, header_rule_set,
contract_sound_set, sound_set do not include reseller_id
anymore when set for a peer server as peerings are platform wide
Change-Id: I4276767649bc5f2f35aba3eacd0f566b960cf647
These are shared files across all PRO/Carrier nodes, but at the time
they were introduced we did not have the concept of a shared-files
subdirectory. All other such shared files have been moved over time to
that subdirectory, but this was still remaining behind. Let's move it
now for consistency, and so that its purpose is more clear.
Change-Id: I05762d66c352b8ebee34ae93d952d9ffd58910fb
* rtcengine related logic and apps is now removed
* remove /api/rtcapps endpoint
* remove /api/rtcnetworks endpoint
* remove rtcengine relations from resellers such as
enable_rtc flags
* remove rtcengine related API tests
* remove rtcengine and comx related libraries
* remove csc webphone ui app
* remove webrtc related selenium tests
* remove rtcengine flags from /api/capabilities
Change-Id: I83a4b0457fac2e0df23d267f8dbc82841dfb3001
* target selection for chained routes in BillingNetworks is now
performed based on the account that $c->stash->{close_target}
can be already set, and it's used if defined instead of the
explicit target
* add NGCP::Panel::Utils::Navigation::select_back_target()
* NGCP::Panel::Utils::Navigation::back_or() now uses internally
select_back_target()
Change-Id: If6ca47a776896db48955a04f544731dc87c59aa1
* the endpoint now contains additional fields starting with prefix
current_* that represent the current aggregated value that is
used for the preferences and also
current_fraud_interval_source
current_fraud_daily_source
that represent the used source for the current_ values
(billing_profie or customer)
customer - if the fraud limit is set on the customer level and > 0
billing_profile - if fraud limit is not set on the customer level
Change-Id: I074285e3464420a14f65695c40c8b8008a241a8d
* Role::API::Contracts add item_by_id() that calls contract_by_id()
* Utils::ProfilePackages::catchup_contract_balances return if
$contract object is undef
* Form::Topup::Log::contract_id expands into Role::API::Customers
instead of Role::API::Contracts
Change-Id: Id4fc67b8ea1e91f350d0172aafc2b722f34e61f3
* the password reset via API now uses webusername instead of
wrongly used username to fetch the subscriber
Change-Id: Ib2ed042382963f13d73619acd48a588f3874c25b
* Utils::Subscriber::update_subscriber_numbers() fix
an error when $current_primary_number is undefined
* t/api-rest: remove devid_alias from the tests as the field
is deprecated and no longer in use
Change-Id: I6e472398a7a393cd83de5818157629338388ec8e
* the current condition for primary number removal for PUT/PATCH is if
the primary number exists and specified in the data as
primary_number => undef. The condition failed as the 'primary_number'
key was explicitly created regardless of the original user data input,
resulting in a false primary_number => undef.
Change-Id: I17651046627f5c48696c3f1d17da5aa49452fe9a
for deployments that expose panel/csc via a proxy,
the auto-generated base url printed in emails can
be unreachable. we therefore introduce the option
to explicitly specify a base url to use.
it will support an sprintf pattern with individual
params for eg.:
- protocol scheme
- domain part
- port
- base url path
Change-Id: I6a9ca23126c669d249ef7f3e092cae0161235ebe
* primary and alias numbers are now validated that they
do not belong to another subscriber
* aliases are now validated that they are not already set as the
primary number
* reduce amount of related sql queries
Change-Id: I4397bbdc4bc9001b7feeef22cb8f85ee0b6ce8ff
* prepare_resource() use prefetch 'attribute' to address
scenarios with high amount of preferences per subscriber
Change-Id: I7a32ff9953ccf9a3cc7e482639c6bd3cdb28eb0f
We need to properly handle transport picking for the SIP peerings:
- in case a non-default 'outbound_socket' is set for the peering,
give a precedence to the transport used for it ;
- in case a default 'outbound_socket' is set for the peering,
use a transport protocol configured for this SIP peering ;
The idea is quite simple, and meets our current requirements.
Change-Id: I98d55b090f04642442d83da83d441aca0f000dec
* Call forwardings related internal usr preferences are now
distinct per call forward type (maximum 1 record per call
forward type, if at least one forwarding for this type exists).
This change is meant to address the issue when there are >1000
call forwardings per subscriber, which leads to performance
issues. Other components (kamailio) only uses this preference
as a boolean to check if there are call forwardings at all per
type, therefore, more than one preference, per type, per subscriber
is not needed.
Change-Id: Iffa475700a74f56eff67400ce9b57092018a14a0
The ngcp-collective-check now produces a more semantic JSON key. This
should allow to produce more organized problems reporting on the
panels, and will allow to remove the old messy keys.
Change-Id: I302eb7927adf70e33a88ef231b477fc7111c4371
* show the correct error message when a peer_auth preferences are
modified for a disabled peering server
Change-Id: Ibd710d142066c9622932992c8a60ec0d7f7674e1
so far the invoice contained outgoing calls only.
this change introduces the "call direction" mode
for invoice templates, to configure invoices with
either
- outgoing calls only
- incoming calls only
- both outgoing and incoming calls
Change-Id: I3a9d4e3dbb83de63cc2bfab5f1c55714fe487c25
* The succesful password recovering redirects to https://<host>/ which is translated to /#/login on CSC page.
Change-Id: If4e7ae510396e3852319c7e5c9d4915fdd214e95
* Contract default sound set - subscriber propagation for cases:
- New customer sound set is created as default.
- Customer sound set is changed to default.
- New subscriber creation - setting contract default sound set id.
* The mentioned cases were implemented for both UI and API.
Change-Id: Ia4733c972ae388d3457d0336e3f85b85eec6e9a2
The 'Calculated fields' label is displayed when creating a new
Batch Provisioning template on Admin Panel. This field has a
selector which offers the 'Javascript' and 'Perl' options. The
label may be confusing, since the options are programming languages
(rather than 'calculated' fields) that can be used on provisioning
templates.
Hence, it is more suitable to change the 'Calculated fields' label
to just the 'Language' label. This will also be in concordance with
the JSON property 'lang' (short word for "Language") that can be used
at API level to set the programming language.
Change-Id: Ie944e446bbab845fee644f698023ac1eacf0e866
* /login_jwt now accepts "jwt" key with an existing valid JWT as the
value
* upon successful authentication with the token a new token with
prolonged expiration time is issued for the authenticated user
and returned in the JSON response
* add "expires" value in the JSON response that contains a timestamp
integer when the issued token expires
* fix encode_json() calls formatting
* most of JWT related error messages are now appear in the log as INFO
instead of ERROR as they are not related to the system errors
Change-Id: Ie8e04534c8819dc756b3c64ebc4432ce442a1d31
* 'location' field is now optional, if not filled it it will always
default to an empty string instead of null. This is required for the
new mode 'forward' that has no use for this field. If the field
is empty in any other mode like 'add' or 'replace', the entry
will be skiped by the logic.
Change-Id: Ia964c3bb272c9772c51b836ac2418ee4cd7b7f42
WHAT: This fix allows the options: (a) Voicemail greeting "temp", and (b) Voicemail greeting "greet" to be displayed within Subscriber Preferences -> "Voicemail and Voicebox" on Admin Panel (Perl-based). Hence, an Admin can load 'greet' and 'temp' prompts via Admin Panel, similarly as 'unavail' and 'busy' options.
WHY: 'greet' and 'temp' options were added to be managed via API, but they were not available on Admin Panel.
Change-Id: Ie2d18f4d9a8e8369f3bbcb8593848ce6ee4b7d32
* Users with "system" role can change all items accross the system including the password changing for other users.
* Login "system" has persistant "system" role.
* "system" login name is restricted for the user input.
Change-Id: Ibaecba35a86f71fa8895ce9d9feab8e768b65d14
* Fetch recording_metakeys caller/callee for the certain record id(call).
* Add caller/callee fields to the resource and form.
* Frefetching recording_metakeys for the call recording.
Change-Id: I767ea32e19edfd7cbbc74956200343f680fdb2b4
this fix addresses regression reported by dominik:
* $resource{_password}/{_webpassword} cannot be set before the
form validation as they are effectively removed by it,
causing /api/susbcribers returning no passwords at
all for 'subscriber' roles
* Having them after the patch makes no sense either as next
resource_from_item call will effectively remove them again (in PATCH)
(cherry picked from commit 5e9066c4fb)
Change-Id: I88c9ec40843f1e9a6983952b96c0b0e70fbb1bb1
* An attempt to change own role, login, flags
(except for can_reset_password) now returns
403 Forbidden, User cannot modify own permissions
* POST checks if the admin has necessarry permissions
to create another admin
* PUT/PATCH changing own role is now forbidden
* PUT/PATCH changing other's admin role now checks permissions
* DELETE checks role permissions
Change-Id: I990609985ae9cab6213cf47f5f5c8afba2efdda3
* check $c->state for cases when it does not exist
(admin user creation)
* return undef instead 0 in the default field method
Change-Id: I3aa69ebc0f5ec5a590c113379bdf0a5a94e35747
This reverts commit 5e9066c4fb.
This implementation breaks:
* $resource{_password}/{_webpassword} cannot be set before the
form validation as they are effectively removed by it,
causing /api/susbcribers returning no passwords at
all for 'subscriber' roles
* Having them after the patch makes no sense either as next
resource_from_item call will effectively remove them again (in PATCH)
Change-Id: I0e8389e8ab34ad72f1b87a684daba77f1030f8ba
* admin users with is_master = 0, cannot see other admin users
(this includes system users) and brings the is_master flag
to the common behaviour
* ccareadmin, ccare users can now access te UI Admins page
as well as /api/admins but they are limited to see/manage
only themselves
* admin users cannot see system users (UI/API)
* reseller users cannot see system/admin users (UI/API)
* admin users cannot modify their own role and flags except for:
email, password, can_reset_password (UI/API)
* UI edit form now does not render fields that are not meant to be
modified by a user (exception: "login")
Change-Id: I82e1946437fd2ec4651abd24074470c695a40582
- Optional "role" parameter is added for POST PUT PATCH.
If "role" is provided then the passed flags are ignored and are applied internally by the server according to the provided role.
If "role" is not provided then the former flags based approach is applied.
Change-Id: Ib6e591ff6dc50122e0ec49a348153ca820fc2e03
* role_id field is set to optional as the API uses the
form and there is no support for the role_id there yet
Change-Id: Ib663b4d9d0501eca2310a7e95733c2166c9872eb
- Add Role column on /administrator table
- Add Role dropdown input on /administrator/:id/edit
- Add Role dropdown input on /administrator/create
- Implements logic to resolve flags and role id params:
1. role_id is passed(create/edit) then flags will be overrided according to the concrete role.
2. role_id is not passed(create/edit) then flags will be checked to determine role id according to the concrete flags pattern:
Role | Flags
----------- ---------------------------------
system | is_system = 1,
admin | is_superuser = 1
reseller | is_superuser = 0
ccareadmin | is_ccare = 1, is_superuser = 1
ccare | is_ccare = 1, is_superuser = 0
lintercept | lintercept = 1
Change-Id: Ia923a47f664a162d78a06efcc006f84dcd08701d
* soft_expand=1 in API requests when coped with the expand
query parameter tells the API to ignore possible expand
conflicts (such as field mismatch or a permission issue),
returning 200 OK instead of 409 Conflict
Change-Id: Ib798aabddb1b4d66fc9708acbf713037696ad600
a multitude of issues popped after introducing bcrypted
webpasswords in the database. most recently the PATCH /api/susbcribers
rail was reported to reset the webpassword unintentionally.
subscriber login fails afterwards, which is a severe issue.
the bugs are adressed by this refactorings. the change also
introduces a global variable
$NGCP::Panel::Utils::Auth::ENCRYPT_SUBSCRIBER_WEBPASSWORDS
to control encrypting webpasswords. it is still enabled as of now,
but it's worth to consider disabling it. there other ways to have
a "cost" for an authentication request, eg. adding a simple
sleep(1sec).
Change-Id: I2d47d54a2d83568546ffdd2b211337a5f56be3a2
* when a domain is provisionined in prosody and there is
no connection to the host/port, the error is ignored and ok
response is returned instead. Prosody does not have a persistent
database and rather loads vhosts from kamailio.domain on startup
and if it is down during domain creation/removal where will be
no discrepancies when it starts. The new error checking behaviour
benefits the CARRIER setups where a proxy host is still in xmlhosts
but is not available (powered off) or prosody is not running there
for some reason.
Change-Id: Idaaaf2b31985873db9228958b60ff14fca5d1bf6
by default, re-rating CDRs of prepaid customers will
not update the contract balances.
in that case the total values on invoice PDFs become
out of sync with the zone details list.
Change-Id: Iba78b6386140012bb087235997880e8c28cc0972
* NGCP::Panel::Utils::UserRole::_field_to_name now supports
both hash and object to parse the roles from
* NGCP::Panel::Utils::UserRole::resolve_role_id returns undef
if no roles has been passed or there are no entries for the
role in the database
* Fix NGCP::Panel::Utils::Journals to correctly fetch and set
$journal{$role_id}
* Adjust api-journals.t, remove tx_id, user_id, role_id from
checks
Change-Id: Ieff23bd4291f3b88ba92bbfc2b00b57f66bf76e1
- role_id is taken from billing.acl_roles and written into the billing.admins table when a new admin user is created/updated via UI/API. This is the first step towards the role based admin user handling.
Change-Id: I0804379cbbcab174cebbb292397a39cb3ea01a31
follow up on TT#147151 (fast loading/paging/searching panel
datatables), which broke restapi tests.
Change-Id: I799cb9087b9405c71dec4c690e7a7bab5dfdbdde
* decode utf8 on multipart/form-data request
since we encode the json for this content
type, and the fax body gets double encoded
and ends up wrong
Change-Id: I50d10879e5fe1ba99141e76d311641fcd5d568a1
* when field expand is requested and the field has "null" value
(profile_id,profile_set_id), the field is considered as correct
instead of returning 409 Conflict
Change-Id: I2dfa918a0b99bff75429baa3e94a734fcb8c17e2
* allowed_roles in the expand defintion restrict the field
only to the roles in the allowed list, otherwise the field
is not expanded.
Change-Id: Ib6f776388457327f2fa85e71deb9591022cee2da
* add dictionary support for fields that are expanded
if encountered in all endpoints, with a possibility
to override it, if defined on the endpoint's field
level
* move expand definitions from form fields into the
Expand dictionary
* simplify the expand usage, it now operates only with the
<x>_id fields that are returned and visible in the response
(e.g. if reseller_id is returned, then ?expand=reseller_id),
the returned expand object name is <expand_field_name>_expand
the, so in case of ?expand=reseller_id, the returned object
will be reseller_id_expand
* adapt Role/SystemContacts to work correctly with the expand
functionality
* expanded fields are returned as <expanded_field_name>_expand
Change-Id: I4cab44ede9b40c70a95bbcedc81f58dd1f4e3b67
* Fix for language solving for API requests. Changed the sequence of language choosing:
1. Request parameter "lang" for API and UI.
2. Cookie value "ngcp_panel_lang" for UI only.
3. User agent/browser language for API and UI.
Change-Id: Id5d814deead22eb7e2908fdc742b0c8474314d49
* restore the removed product table join in
get_contract_rs() as get_contract_rs() and product.class are used
in many places in the code that have their own filters by
product.class
Fixes: 133bd43df TT#147151 fast loading/paging/searching panel datatables
Change-Id: I56e20f240ccc08cf1c9a25947f67990691425549
query refactoring an rowcount clipping for UI datatables
that are slow when using millions of subscribers:
contacts
customers
contracts
subscribers
billing profiles
billing networks
billing profile packages
Change-Id: Ia50e3aa52684772548569b6908f0cbc08395a5a7
* add recursive expand support, so it's possbile now to do
nested expands as "expand=contract.reseller".
* comma separated fields support is preserved and with the enhanced
expand "expand=contract.reseller,customer.billing_profile" it enables
expanding "contract" with nested "reseller", as well as
"customer" with nested "billing_profile".
Change-Id: Ie82f5118dc13e57a0397566295644452f29bccde
* "subscriber" role can now retrieve own autoattendant data. This is needed for the CSC interface.
Change-Id: Id10b302205fe458d5793ae8f7bd9201233f9a0d4
* Admins with is_system and is_superuser are able to see the items for all roles.
* Admin is able to see own journal.
Change-Id: I3e5d459b08ff7ef218220f1ae11974351121c489
the POST /api/provicioningtemplates/<reseller>/<template>
request will accept text/csv content type to provision
many susbcribers at once.
Change-Id: I59079ba8f2bacc0ce2b1367d2bd1a7251cf4763c
provisioning templates with their dynamic forms
can be executed by a entityitem POST request, ie.
POST /api/provicioningtemplates/<reseller>/<template>
or
POST /api/provisioningtemplates/<readonly template>
Change-Id: I77f6c9d42e1afdb49635d3f11e4d73bcf6269605
* vmnotify() now accepts cli and uuid arguments
* API handling of voicemails is now improved to:
- send a notify if the item's INBOX/Old has been changed
- correctly process DELETE to send vmnotify after the
item's removal
Change-Id: Ic00ae825cf091bce273e55aa37cd0a7ac80d8b0f
* improve select from voicemail_spool to avoid
sequental scan with like '%..'
* select now fetches all messages count
* add old messages count support
* old/new messages are reported as 0 if not returned
from voicemail_spool
Change-Id: I11ac1a407e8d22fe828a17cda55aa3298c6e6f02
* non-existing hal resource key was used in the debugging string
causing the item operations, such as PATCH to produce 500 error
Change-Id: I9e53dcf8b4b21385b9b1b877d87319023222f620
* domains do not use billing.domain_resellers table anymore
but instead the new domains.reseller_id field. That is
to remove the unneeded many<>many relation through the
additional table where the actual logic only supports
one(reseller) to many(domains) relation
Change-Id: I1b681543baf1901f19e10c2f6210e4cf6eeb8fbe
* move to_log() and data_to_str() methods to the parent
VendorREST module
* rename send_request() to send_http_request()
* use common send_http_request method for HTTP requests
dispatching
* improve logging
* improve error handling
Change-Id: I403aa8053e4abfaf6992b62809f15ab72e3a06fc
the form used for the /api/ncoslnpcarriers rail
uses the same technique to expose a JSON field
"carrier_id" for the table column "lnp_provider_id",
also found in the /api/lnpnumbers rail implementation.
it however did not work until now, because the
fieldname in the render_list did not match.
Change-Id: I45dca22bab73e16b538de7ea1d540aa1383fb56d
Otherwise PBX devices config geenration failed with error:
> 500 - error creating template:
> error processing template, type=undef,
> info='Can't use string ("") as a HASH ref while "strict refs"
> in use at /usr/share/perl5/NGCP/Panel/Template/Plugin/DeviceConfig.pm line 50. '
It happens because no preferences access defined for 'bootstrap' PBX
access (port 1445), they are available for 'config' access only (port 1444).
Change-Id: Id2c1478678265144b8ddb83504a0d3c9cec16563
* switch to 'populate' instead of using
'insert' for each destinations, sources,
times, bnumbers, mappings and CF preferences
* add API->check_patch_op_add_only - to check if
the patch contains only "add" operations
* improve /api/cfmappings, if all PATCH operations
are "add" then the existing records are not
fetched and not recreated, enabling very new mapping
inserts
Change-Id: I0b4e71565c11771026dbbc000aa57b2a613409fa
The latest version of the 'ul.add' RPC command of Kamailio
has 11 parameters instead of 9, we have to fix that.
Change-Id: Ic70bde77eada095ddf127e18f3ef7e5b3d91478f
the /api/provisionintemplates rail provides the
operations to create, edit and delete "provisioning
templates" know from the "batch provisioning" feature
of admin panel.
these templates can also be defined in config.yml,
while it is however only possible to edit templates
stored in the database.
executing a template and/or uploading a .csv for bulk
execution will be available in a separate part.
Change-Id: If8627327270edfce5bca1be3b1f777c1bd44e90f
the G2k/LIMA implementation seems to have our error
messages hardcoded in their logic. it stareted to
fail since we added logline obfuscation, which was
also added to response messages in this place.
Change-Id: I36c2a74ed17db7013e692d7cbdccf0dbd44e814e
The ngcp-panel v1 codebase uses 'back=' GET parameters to record
all the navigation path and store it into the session array:
'$c->session->{redirect_targets}'.
On switch from v1 to v2 using the link 'GO TO NEW ADMIN PANEL',
the function 'login_to_v2' is not using the concept of 'back=' GET param,
but ngcp-panel still receives and stores the last value with 'empty' path:
> $VAR1 = bless( do{\(my $o = 'https://x.x.x.x:1443/')}, 'URI::https' );
> $VAR2 = bless( do{\(my $o = 'https://x.x.x.x:1443/subscriber/155/details')}, 'URI::https' );
> $VAR3 = bless( do{\(my $o = 'https://x.x.x.x:1443/subscriber')}, 'URI::https' );
> $VAR4 = bless( do{\(my $o = 'https://x.x.x.x:1443/dashboard')}, 'URI::https' );
The navigation above is a recorded browsing path on v1 (in a reverse order):
- login to ngcp-panel (dashboard page is opened),
- open 'Subscribers'
- open details for some subscriber with id 155
- open subscriber preferences
- click on link 'GO TO NEW ADMIN PANEL'.
As a result user is still located on the same page "Preferences",
but not on v1 but v2 interface. The empty value is inserted into
the array '$c->session->{redirect_targets}' (which is wrong).
The empty path 'https://x.x.x.x:1443/' brakes v2 navigation
for v1 'Back' button inside iframe.
It causes loading of iframe inside iframe,
which happens on v2 due to list of redirections:
- clicking on v1 button 'back' inside v2 iframe requests https://x.x.x.x:1443/back
- it triggers navigation to the top element array 'https://x.x.x.x:1443/' which is wrong/corrupted.
- loading '/' cause 302 redirect to '/v2/' (as 'v2' is a default UI for mr10.0+)
- loading '/v2/' inside iframe cause the issue with 'v2' content inside 'v2' iframe.
This is a commit to prevent inserting an empty 'back_uri' into
the session array '$c->session->{redirect_targets}'.
Change-Id: I69df4320fa8cde4d23a7d9dd18ffb5eb06ee8df1
The modern browsers (except Safari) supports 'Sec-Fetch-Dest':
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-Fetch-Dest
In theory we can remove the current 'framed session' storage completely,
but Safari will not be supported. Let's expand the current logic to provide
extra protection here to backport the commit to mr9.5+.
Change-Id: I9c070f77f427c81581f4d9ceeb1a57b274d77819
* kamailio.sems_registrations now uses
kamailio.lcr_gw.id -> peer_host_id
kamailio.subscriber.id -> subscriber_id
for foreign keys consistency withing the same database
Change-Id: I4722729fdee07eb2a153473e85d64faa46eedca5
* webpassword is not correctly removed based
on length, and remain visible when in plain-text
or empty (unset)
* config->security->password_(sip|web)_expose_subadmin
now only affects subscribers under the same customer
that are not this subscriber admin
Change-Id: I329e0f1ad97dd513a33e3652ed03b4a43a95ed04
We need to de-register all subsequent peering hosts located under
the peering group being deleted.
Change-Id: I50bc25932e59d6b918f65c6525f2631cb9868fe4
We need to add an improvement, which fulfills the work of the
registration mechanism for SIP peerings.
Not only do we add here a registration tirggering for peerings,
but also a 'type' is introduced, which is mostly needed for XMLRPC
commands being sent towards SEMS, to let it understand to whom the $sid is related to.
Plus a list of improvements:
- de-register peering host on deletion ;
- de-register peering host on disable / register of peering host on enable ;
Change-Id: I035dfadf6709acb4d106a70f6124f024e719044f
Throw descriptive error for attempt to create Customer with Template
that does not belong to Contact’s Reseller. Cover the case when the
Template belongs to System Contact (with no Reseller).
Error example:
'subscriber_email_template_id' with value '1' does not belong to
Reseller '1' that is assigned to Customer's Contact '1'
Change-Id: Iffcef0339afc4490ecba81d4667cbb9225766af4
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.
Change-Id: I7f0a8f1dd8d5699ad4e2b8242c68fb9f75fc1bff
* password field is virtual and needs to be transformed
into saltedpass, restored the removed logic that does that
in process_form_resource()
Change-Id: I8baabbef2bdb46db850e12b6e0c638ca5c3deddf
A feature request to have an opportunity to add a default action slot,
in case a caller hangs on the AA and doesn't pick anything.
Main change is related to sql structure of 'provisioning.voip_pbx_autoattendants' table,
which now has 'voip_pbx_autoattendants.choice' as VARCHAR(16) instead of TINYINT.
Also adding a label 'default' for the drop-down menu.
Change-Id: I6382a68c8258094a2bf2bf9c71407092860f5e4d
The value of "interval_free_time" preference is specified in seconds.
To avoid confusion, use the term "free calling time" rather than "free
minutes" in tooltips.
Change-Id: Ia4bd507e4a2281723fd2168a34b2178bf404f867
* 'webpassword' field is now also validated for invalid
(non-ascii) characters
* Fix multiple APP input field validation erros to comma joined.
* Adjust 'webpassword' field validation errors to have better
readability when there are multiple validation errors
Change-Id: I21536f97a4da78cc5192a3abd8cd5adef1b819ec
* webpassword field was unconditionally deleted
in API GET and DELETE methods, it now relies
on resource_from_item for the common approach
Change-Id: I703158fd2022b49a49470db28cb22f37e613f841
* 'administrative' field is read only for susbcriberadmin
role and that caused it to be removed from the final
update 'resource', setting it to 0 if not existed.
now the 'administrative' field is only changed in the database
if it's defined in the 'resource'.
Change-Id: I50738a77052c2163b19b2a42293c7a00e2780bc3
* PATCH: password fields are not removed when
resource is created for apply_patch(), they
are removed under the same condititions later
when hal is generated, that is to ensure that
admin users without the 'show_passwords' flag
as well as subscribers will not run into situation
when they use PATCH and cannot apply it for
"path": "/password" or/and "path": "/webpassword",
as they were removed before apply_patch()
* rework encrypted webpassword detection.
webpasword is detected as encrypted if its length
is 54 or 56 and it contains at least one '$' char,
there is a chance for false positive detection when
a user provides with a plain-text password with the
same pattern but it's very unlikely, as well as
since mr8.5 webpasswords are expected to be encrypted,
and moreover worth case scenario is that the
plain-text password will not be returned to the user
Change-Id: I8ea739cbf728b2134f3ce00cee29da42ab3fb4a3
* add API functionality to request additional data
and expand fields in GET methods
* syntax:
- /api/resource/?expand=all - expands all expandable fields
e.g.: customer_id field is expanded and customer internally
is queried and returned under "customer" => {...}
(the returned data is identical to what /api/customers/id
would return)
- /api/resource/?expand=reseller_id,customer_id - expands
only reseller_id and customer_id fields, if they are expandable
- /api/resource/?expand=reseller_id,invalidfield_id -
returns the data and expands only fields that are expandable
(reseller_id in this case) but if it finds either unknown
fields or non-expandable fields, changes HTTP status code
to "409 Conflict"
* adapt all API endpoints to support dynamic expand fields expanding
functionality, however the actual expand for them requires modifying
the form fields in the following format:
has_field 'contact_id' => (
element_attr => {
expand => {
class => 'NGCP::Panel::Role::API::CustomerContacts',
id_field => 'contact_id',
alias => 'contact',
fetch => 0,
},
},
);
- class - represents the class that should be used by the logic
to fetch the relevant data
- id_field - which field from the resource needs to be expanded,
it should be the "id" field (subscriber_id, domain_id, etc.)
- alias - (optional), under which key the fetched data is stored.
the field name is used as the key if the option is omitted.
- fetch - (optional), if the returned data is under
$data->{contract_id} then it will be fetched from there and
stored under the key (field name or alias), otherwise the whole
retreived data is stored under the key (field name or alias)
* adapt /api/autoattendants to use the new approach (old one was expand=1)
* currently supported endpoints with expand:
- admins
- autoattendants
- domains
- customers
- customercontacts
- resellers
- subscribers
Change-Id: Iac53409dad944ed4794039a48dc3a9f6dce25bc1