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
* Login CSC v2 button is shown on the subscriber's master
data page if www_admin.http_csc.csc_js_enable == 1 or 2
* When the login is triggered an auth token
is generated internally followed by a redirect to
CSC as /?a=auth_token
* move generate_auth_token() into Utils/Auth
* improve generate_auth_token() arguments support
* add /api/authtokens error handling
Change-Id: Idd65400bf8ce6ce48979c736f6a199fb567ffaa4
It is much more usable to see the debug information as URLs:
> Jul 22 08:24:53 sp1 ngcp-panel: DEBUG: *** New GET request on path: /
> Jul 22 08:24:53 sp1 ngcp-panel: DEBUG: *** New GET request on path: /subscriber
> Jul 22 08:24:53 sp1 ngcp-panel: DEBUG: *** New GET request on path: /subscriber/ajax
Instead of Catalyst oriented way:
> Jul 22 08:24:53 sp1 ngcp-panel: DEBUG: *** New GET request on path:
> Jul 22 08:24:53 sp1 ngcp-panel: DEBUG: *** New GET request on path: subscriber
> Jul 22 08:24:53 sp1 ngcp-panel: DEBUG: *** New GET request on path: subscriber/ajax
Change-Id: I38699152e232c5f5aa2ef218db9bf61c692bbf33
It was close to impossible to read ngcp-panel debug log due to:
* missing clear marker of the start reuqest processing, use '***' once only
* some personal markers (like '+++++++') have been removed as they have no
meaning for other developers. Let's remove the personal markers and work to
make the panel debug log well readable for all developers.
Change-Id: I69faff3ab2258fc156e88c7b8da0edfef14c3e6e
* /login_jwt is now the only endpoint to issue JWT tokens
* JWT token admin/subscriber is provided based on the
NGCP_REALM/NGCP_API_REALM fcgi env values
(e.g.: https://localhost:1443/login_jwt = admin JWT token and
https://localhost/login_jwt = subscriber JWT token)
* Authorization: Bearer a= prefix is deprecated
* Clients cannot use subscriber JWT token to access admin
NGCP_API_REALM https://localhost:1443/api/...
and vice-versa
Change-Id: I46edf4c7aaf7bb835dc4ac6b7535aa2d6b5ac136
Add strings that were collected by fixed ngcp_panel_dump_db_strings.pl
from Forms into i18n source file messages.pot.
Change-Id: I92157059b48bdfab94405b674f9a7300c5a9a91d
Fix ngcp_panel_dump_db_strings.pl to load Forms modules properly.
Make modules not to fail when they are called without ctx context.
Change-Id: I695978b1831068f37198bce9f6a5b9e406d79ede
* the extra packing of the secret key during encode/decode
conflicts with the API v2 implementation
* move JWT "typ" from the payload to the header
Change-Id: Ica5822d810d6eaf7b3ae017f7037f25637b6f861
* unify the logic and use uuid in /api/cfdestinationsets and
/api/cfmappings if the subscriber's primary number is empty
Change-Id: Ibdb7e2a2bcd33165be5ec1d92c4f1df24f59405a
* the endpoint will receive "type" (expires|onetime)
and "expires" (positive integer representing seconds)
* type will define the expiray method for the token;
onetime: the token expires as soon as it's used, or
after "expires" seconds if not used
expires: the token can be used multiple times until
it expires according to the "expires" param value
* login_jwt endpoint for generating the JWT token for
subscribers has been enhanced to accept the "token"
param, containing the token generated using the
/api/authtokens endpoint
* admin_login_jwt endpoint for generating the JWT token
for admins has been enhanced to accept the "token"
param, containing the token generated using the
/api/authtokens endpoint
* login_jwt and amin_login_jwt will respond with 403
"Forbidden" if the token role stored in Redis does
not match the role of the user that generated it
* /api/authtokens is hidden from documentation for now
Change-Id: I4eb76c2b08f2e24774fa84ba0ccf7412ce8670e8
* add additional centralised checks for inactive and read_only users.
* use_userdata_from_session=0 now for all auth realms to cause the data
re-fetched from the database, to avoid scenarios when a user is set
as inactive or read_only and UI keeps using the cached data.
the change only affects cookie and JWT subscriber based sessions
as in all other cases, the auth data is fetched from the storage regardless.
* add is_active=1 flag for the internal 'system' role, as otherwise
access would be permanently denied for it.
* default 403 error for denied api requests is changed to "Forbidden"
instead of "Forbidden path".
Change-Id: I1d6d3c765ca8e017e11845c1f5260243a3963c3b
Otherwise v1 session (cookies-based) is not created and v2 CSC
cannot load v1 "iframe" content. Also it was impossible to switch
between v1 and v2 CSC.
Change-Id: Iab3fac6e8da6e5a2e81a0626a3db6faa3e011396
* add quotation with ~ for square brackets ([])
comming from the database, as it is needed for I18N
Change-Id: Ia1253e90d47858a930a4a9569c2d27993a0cd4bc
* 'umploadtmp' option is now defined in Panel->config
and taken from ngcp_panel.conf otherwise falls back to /tmp
Change-Id: I836f2d7dd346bd1853c513dacd2ab5caffbcdf3e
* /api/callists "type" field now contains the same call type
value as it is in the database, for flexibility so that
customers can implement their own logic around it, as well as
filtering by the query parameter "type" works as expected.
* For history: in /api/callists in case of direction "in", the type
was replaced with type=call regardless of the what was in the database
Change-Id: I1174b34747fe1b739cd6bfc050911c58c4b0964a
* sip_lcr_reload is now called after "commit" in all API endpoints,
to correctly reflect updated DB changes. It was correct in
/api/peeringrules POST but not correct in DELETE, as well as
also not correct in /api/peeringservers and /api/peeringgroups
* sip_domain_reload does not check if the domain is successfully
reload in kamailio proxy as is logic is redundant, it fails
however if domain reload XMLRPC request failed on any available
proxy servers. Another reason is by default tcp_conn_wq_max
in kamailio-proxy is 32KB by default and that causes an impact
when domain.dump XMLRPC is used on very large domain sets (600+),
as well as sip_domain_reload has improved performance with the removed
XMLRPC domain.dump body parsing.
Change-Id: I17c5718198b06b1ce78b2654f3d7c3bd2830f60b
* restore password field in prepare_resource after
it was deleted in resource_from_item for admins
without show_passwords flag
* the password is restored only in case it's missing
from resource and it's present in DB
Change-Id: I390fb8fb94f4546734cb899c741dc90e439df068
* xmlrpc lcr.reload request is now sent after the transaction
is committed, otherwise the reload operation is performed without
the newly added changes in the peering rules
Change-Id: I728605a8d277b00d02a3f864c84f172306f7b090
* upon pressing the button, a new session object
with selected subscriber's details will be inserted
in Redis, and also a new ngcp-panel_subscriber
cookie will be created containing the session id
of the previously created session object; then
the user will be redirected to CSC v1 address
where the selected subscriber will be authenticated
based on the cookie and Redis info
* the new button will be available for admin,
reseller, ccare and ccareadmin roles
Change-Id: I03952efe4abe18e61884859c466d700a7885ead4
* /api/platforminfo does not have its own endpoint file
and therefore, does not appear in the rendered documentation.
it only supports GET method and renders the template file.
the endpoint is designed to provide with the prerendered JSON
data containing the current platform configuration.
* /api/platforminfo supports both authenticated and anonymous
requests, where based on that, the template provides with
the corresponding info withing the current scope.
Change-Id: Idc8138595eda2c14e7f8dc7ed97cc50039fd1adc
* the new filter params works as follows:
* if start_time is provided, recordings
with start time greater than provided value
are displayed
* if end_time is provided, recordings
with end time less than provided value
are displayed
Change-Id: Ie9cfb88141506581e2b724d4502b88091f9c7a02
* when a target host times out, instead of generating an error,
the host is skipped, this is due to the fact that some proxy
hosts can be disabled but still present in the xmlhosts table
* introduce new code in $ret = distpach(...), -1 indicates that
the host was skipped because of the timeout.
Change-Id: I0f7b5c64124c6481a142c1821a88ab9c3a652bd1
* new Plugin Catalyst/Plugin/NGCP/RealmCookie.pm
that extends Catalyst::Plugin::Session::State::Cookie
and overloads methods responsible for cookie_name creation.
It uses NGCP_REALM fastcgi header to append it to the cookie name.
Empty cookie with name "appprefix"_session is suppressed on Session
pre-setup.
* Base cookie_name is now set to 'ngcp-panel'
Change-Id: I6b4c10c5e1728d0dd7a6398bf5191925d5b904f6
* Replace wrong usage of 'reseller_id' filter
for missed templates resultsedl use 'id'
instead, because the query is made directly
on resellers table
Change-Id: I85bdcda79168979c8b1bb0503ab7bba91c5f8a78
* give access to subscribers roles to see,
create and update own registrations
* subscriberadmins can manage all registrations
of subscribers under same customer
Change-Id: I643121da901b0ed99fc718106a1632da4e1e1936
* Previous commit for full scan pagination
removed pagination for subscriber_id filter
which was anyway not working properly in
some corner cases
* Introduced usage of Data::Page which correctly
paginates through the results
Change-Id: Ic1c98c090b9e92362ab1f2d9b0de0c39660d9e20
The fix has been created by Gerhard Jungwirth three years ago for
branch 'mr5.5' and was not merged into branch 'master'.
It is a follow up master commit to address customer ticket TT#82306.
The cherry-pick has been done AS IS, with one small trivial resolution:
> + my $is_pbx_customer = $c->stash->{billing_mapping}->product->class eq "pbxaccount";
> my $base_number;
>
> ++<<<<<<< HEAD
> + if($subscriber->contract->product->class eq "pbxaccount") {
> ++=======
> + if($is_pbx_customer) {
> ++>>>>>>> 239d4a385... TT#44168 create additional form for subadmin non-pbx subscriber edit
Change-Id: Ie242c4ad44fc21319cdaa29dcca423fe241aab20
(cherry picked from commit 239d4a3859)
Add the missing 25% of French translations in i18n fr.po file.
The translation and proofreading were done by Alconost (Chawki
Benzehra).
Change-Id: I8078eef0dd0118716801114855ab3ede23c981d7
Unwrap wrapped lines in existing i18n PO translation files to prepare
them for new unwrapped versions from Crowdin. To promise consistent
format the normalization was done by 'script/extract_i18n.sh'.
Change-Id: I9ec8394c83fa6bfde25fdaa9ab1b5d94f2512fa9
Remove location file name duplicates repeated inside the same context
line.
Bring the new "u-Law" version of 'transcode_PCMU' voip_preferences
attribute.
Change-Id: Ibf16e5090f79ccf9a6ce3cb3bd171f22f7d07899
* it's now possible to filter reselelers by their status
(active, terminated), the default return of all resellers
has not changed.
Change-Id: I6e1f2b6745ac6c3c4a012fe261ee5db810084be3
If user is typing URL directly in the browser window,
the request has no 'referer' header and we should reset the 'framed'
session state to prevent corrupted 'framed=1' output which confuses
endusers a lot.
Change-Id: I8f381daec80dfd95fab6ecbaecfa66438f5d53f0
* PeeringRules.pm is back to the old model for
consistency and to be backward compatible
* it contains the duplicate check fix
Change-Id: I2253f0e740bea7115efb7d1f072ec73498f20040
* PeeeringRules.pm now uses the Entities approach
for fine transaction control that fixes the POST operations
Change-Id: Ieb666d3009393404e04171966adc0912f55a8a4f
* in mRender (custom_renderers), "data" variable is
a string, therefore data.escapeHtml could not be used
* add new function argument "opt", where it is a dedicated hash
containing custom passable options, so it now looks as
function(data, type, full, opt)
* adapted the existing code to include/use the new argument where
applicable
Change-Id: I4957eece3b2d0f6359cbc8f36caf5a350d7bad95
* implement support for 'expand' param which,
when used with the api call, will modify
the response to contain the subscriber object
Change-Id: Id25dc0bb258bc777d698e043ea8ddc785e12f68a
* deleting a registration would fail when the domain
of the registrations would not exist due to the
fact that multidomain is not enabled
Change-Id: If512c0c9ce6c8f7a72deaa5b6a8ebe6737404f2a
* change 'call' to 'me.call' to avoid ambigous
usage in SQL query, since 'call' is a column
in other joined tables
Change-Id: I3fb52aa7c42687b6be377e51f50779dd92f61ebe
- a validate logic is added for 'page' and 'rows'
query parameters and if either of them equals 0
then 400 Bad Request error is returned
Change-Id: Ida850c5d942e51a6328f5df01b8e28d55c32cc56
* Add handling of mysql duplicate billingprofile errors
for reseller_id-handle and reseller_id-name combinations
Change-Id: Ife81d723f4208202311ca8cf3c3a12e7bf4827a2
* ccare role was ommited because of a typo
when fetching the result set for customer
preferences; changing ccareadmin to ccare
in the reseller condition fixes the issue
Change-Id: Id387953901295b772c6d57e9a925cff85847ad68
* it will return user's username, role
and a structure where information about
the user's permitted operations on all
api endpoints and permitted operations
on the fields of that entity can be found
Change-Id: I11d2f5b60d24ca7b70ffc6dcf8ea94f9a3a221d1
* add color pickers and store the hex code of the colors
inside the branding table in panel UI
* implement /api/resellerbrandings endpoint, where all things
related to reseller branding can be managed; the branding
logo will still be retrieved using /api/resellerrandinglogos
Change-Id: Ib7ed364811acf67ffd62252d9799a0af8b91e9bc
* blobs can now be uploaded for blob type
preferences using the following form:
"some_blob_preference":
{ "content_type": "/application/data",
"data": "<base64 encoded file content>" },
* upon requesting GET, the "data" field will
contain the string "#blob" to avoid showing
raw blob data; if GET is requested with query
param 'preference=some_blob_pref', the
blob will be downloaded
Change-Id: Idcb6496db1f3244e8f5bae4d06301a6caf35b73f
* Create upload and content type form fields for 'blob'
type preferences
* Implement blob preference upload/download to database
* Show blob content in read only text area if content
is text
Change-Id: Ic4b800f84324eab0aadbf8eeb55c03c770ecc94f
* getPref will help retrieve exactly the preference
by name, or return a default value if preference
is not found; it should simplify device configs
a lot
Change-Id: I8e730b2f51a7819a39956879bff6cf771fb6132b
* predefined order_by in the resultset that is used in
Utils::CallLists::call_list_suppressions_rs caused
further $rs->union_all appliance to have an invalid syntax
with order_by inside each "select" where it should have been
outside "union all", therefore "order_by" is disabled
when using call_lists_suppresions_rs
* length(call_id) default order_by is not used when call_id
is specified in the query parameters in /api/calllists,
where explicit order_by and order_by_direction are correctly
applied now when specified
Change-Id: I26ae4f63ef40ba3b80bff9c35dfcda9274d5b81e
* Forbid non-master admin to change own is_master,
read_only, and is_acitve flags; we have this logic
in old UI already in place
Change-Id: I81ab266d942e32dfb560ba488e9fd471ebc923f4
* Add subscriber roles to MailToFaxSettingsItem
and allow them to only access their settings
* Don't return the 'active' field on subsciber
requests; instead, return 403 if mail2fax is
not active
Change-Id: I773df0c21fcba29f9e7b5172160178ff99482964
* The profile_set field was inactivated in form if subscriber
had a profile set, but just for cosmetic purposes; this is
only for pbx extensions, other subscribers don't have this
field inactivation; inactivating it, made subscriber editing
in Panel UI behave weirdly because a check for profile_set
would fail since it's missing
* Bottom line, we can sacrifice the cosmetic part for having
subscriber editing function properly
Change-Id: I6a9a7cf3e5c7250d20dd5873521f72cdcc1b6d55
* create /api/resellerbrandinglogos/ endpoint
which will return the reseller's branding logo
* the endpoint can be used directly with /{reseller_id}
or with /?subscriber_id={subscriber_id} to get
the logo of subscriber's customer contact reseller
Change-Id: I5db19e208ae21cf7c685d46aa77b5032c26554de
* Filtering by subscriber properties introduced a join
which confused the use of 'profile_id' for devices
Change-Id: I5e8fbdc0a83076b95183dbdb757921c8112e9e00
* Due to DB unique name constraint, enpoint was
returning 500 on duplicate source sets
* Proper 422 is now returned
Change-Id: I883fbe71aa77364645467941206ea6b272523c03
* Limit subscriber's extension to a predefined
customer extension range preference (both AP and api)
Change-Id: I0b6ac5c24b3838f07cc561e7ee6b7cfabe69385e
* Registration entries are now removed by
registration username + registration domain
instead of subscriber username + subscriber domain.
That is to account registrations by the device.
Change-Id: I86a0d97fabc2dcd0eda6042a018ed35f64c3f031
* When a customer is terminated all != terminated
subscribers are set to terminated using the common
Utils::Subscriber::terminate() call, so it's on
par when each subscriber is selectively terminated.
Change-Id: I77394804194ecdb352560047cc8d5b26e3eabc53
* Include alias numbers in registrations removal when
subscriber is terminated, alongside registrations
by username
Change-Id: I5c913c56718e4b9f98f4677c7cd72722ee9f30d3
* Enable filtering by subscriber's pbx_extension
and display_name with wildcard at the end of string
Change-Id: Ibaee1eddf760be44d11f2df5a9dbc544fe35495c
*Introduce pagination in redis scanning; previously
all the registrations where dumped in an array and
then spliced by page/rows; this was causing huge
loading time for big redis DB's hence the timeout
Change-Id: I1409c48b520d8d860cd8c11aea1a543286aa0334
suppress executing "ul.flush" kamailio xmlrpc after
"ul.add" or "ul.rm", as it seems to be another source of timeouts.
Change-Id: I8faf907c4cbfd6adbe3e3645f5c32069df2eb999
* conference. subdomain was missing
* mod_sipwise_vhosts_sql module is now taking care of [de]activation
of the subdomains
* send quit command when leaving the console to avoid error in log
> Oct 19 19:22:43 sp1 (debug) prosody[25167]: socket: connection failed in read event: closed
Change-Id: If1d80652efba0a587f29ecc692282c8db067e450
* Remove bootstrap methods from forms and other code
* Delete SipwiseProfile and SipwiseRedirect modules
Change-Id: Iabf6c2730aae27af67830a9470ab176392c1ba50
* Only allow unique values for allowed_clis in
both Admin Panel and API PUT
* In case of PATCH, check only if new clis are
unique, since customers may have systems where
allowed_clis are duplicated already
* Fix tests
Change-Id: I7253271081e7ecc0eae9690a3545ddb5324edac7
* Remove old XMLRPC redirection logic
* Implement Hawk header generation for SRAPS authorization
* Implement bootstraping provisioning profile on SRAPS,
then add the device into said profile
* Implement deletion of device
* Add 'Profile' and 'Product family' fields in SNOM device
models
Change-Id: I44ecf5199a7c04c6b0cb2e969aaa7f75578d874c
* Access was restricted only for emergency containers
* Added user's reseller_id to DB query to only show
mappings from the same reseller for reseller admins
Change-Id: Ia5fe29e74fe71dbfa5dbc58088fae86a75ac6acc
* This fixes showing the framed v1 Admin Panel when
logging out from v2 and then switching to v1 and
logging back in from there
Change-Id: Idde09409f750f37dfc943c06baaa6a918f0624d3
Model is necessary inside the device configuration template
to provide the necessary flexibility inside the general template
for the several devices if the difference is minor.
For example, SNOM devices configs are perfectly matches
inside the one template for all the models, but firmware
URLs to download new firmware from SNOM SRAPS server are different.
In the past we had to create a different templates in this case,
now we can create a simple tt2 statement:
[% IF phone.model == "D715" -%]
<firmware perm="">https://....</firmware>
[% ELSE; -%]
...
Change-Id: I3cbeb57009f944902cf148e8d491a30235620551