*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
* Request was failing with /?page=1&rows=10
because query params was an empty array
containing an empty hash; it should be
empty array only.
Change-Id: I69717ab589c78ebb27c4cc4825b78f6900800eaf
* on administrator login, store said variables so
we can automatically log in to v2 without having
to redirect
Change-Id: I50d79996198561c54e555d264388d26610905ca6
* The new endpoint will only accept POSTs
* The request body should have two parameters
called 'new_password' and 'token'
* First, look for the token in redis (for admins),
if not found, look for it in DB (for subscribers),
if neither is found, return
Change-Id: I4163a0d5bd886961317b21aeca20c8ccfdeab0dd
* It will be used in case of devices that
don't need to contact any redirect server
for provisioning
Change-Id: I423993f52b72680d243394e8ca69bd7abdf5022b
* whenever webpassword was not PATCHed, the
request would fail because the resource would
have the encrypted webpassword from the DB
and form valdiation would complai it's too long
* the approach now is to remove the webpassword
from resource before form validation if the
resource has the same webpassword as the DB
(i.e. webpassword wasn't (PATCHed) and then
reassign it to the resource after form validation
Change-Id: I86fab0f4bf789bd3518a74d49daf1a0402f20125
On 8/21/20 7:17 AM, Zhang Jason wrote:
> For the RPS, we switched to new EDS domain:
> https://api.eds.al-enterprise.com
>
> And for the previous domain name,
> to keep compatibility, it’s still usable;
We need to switch to new URL as old one works in
backward compatibility mode only.
Change-Id: I9c0db38a9422f32c79940fb79581d47c75e8fce5
* this is needed in order to prevent error when
requesting api documentation
* add 'type' and 'domain' to field list in form
to show up in api documentation
Change-Id: I210ce214523a2c27f84098e630cbfeb5de227848
unfortunately, preference types were changed over time,
eg. some boolean prefs were turned into enum prefs.
this requires an api client to adopt accordinngly. if
this is not an option, this change allows to add simple
workarounds in the rest-api directly, by registration
of transformation functions for specific preferences.
Change-Id: I215f0e19cd861c67c51e42fd1ab6560e56132041
* The new endpoint will only accept POSTs
* The request body should have two parameters
called 'type', 'username' and 'domain'
* 'type' will accept either 'administrator',
in which case only 'username' is needed,
or 'subscriber', in which case 'username'
and 'domain' will be needed
* The regular password reset email will be sent
to either the admin or the subscriber
Change-Id: If1457c8c625a95295e5e93b6637927e3905698d9
* the GET request will show whether an admin
has or has not a certificate
* the DELETE request will remove an admin's
certificate
Change-Id: I2b233a76a4436a4d3a95749410e74aabd9fca531
* this endpoint will be used to logout from v1
automatically when logging out of v2
* allow unauthenticated acces to it
Change-Id: Ia40cb624f618ef0b0cada8f22dc2cc68f234af53
* "month", "day", "hour", "minute" can now
be entered as "day":"30-12" where max < min,
that is to allow timeset date ranges entered via the API.
That also brings it equal to how it is accepted to be entered in
timesets UI form.
Change-Id: Icbfa8f4a3e9086d917fca061525999202b105b64
* Param 'number' is renamed to 'numbers'
* 'numbers' can be a single value like
it is currently used, or an array which
will result in all array elements having
the sub's rewriterule applied and returned
in the same order
Change-Id: Ic24179d2ecbec80cebd23e5af751df0ebbcc7141
* Add check for existence of webpassword on subscriber
log in to prevent the code from trying to use the
undefined password
* Subscribers with no webpassword cannot log in the old CSC
Change-Id: I7b82c014fa5f70fa36ee7282db94a747e54ce2ae
* Admin with lawful intercept will no longer be able
to have any flags besides 'is_active', 'read_only',
'can_reset_password'
* Remove reseller filter on interceptions since LI
admins should see all interceptions
* Add permissions to /api/admincerts and reseller ajax
for LI admins
Change-Id: Id912424b9bbd3ab3cbbc373ac116fda035f81fd3
* The endpoint generates a jwt token and stores it in
Redis, then redirects to /v2/#/?v1_auth={token}
* Also added an id in DOM to indentify the Panel V1 login page
Change-Id: I307a3f457f88bbba04bb7735d60fa51bdc5d0438
* The resource was not having the rewriterules before
patching the json, because they were added only at
the end in the hal resource
Change-Id: I43decadb95b6cf06828969b968c61a4b87062fb6
the cash_balance_interval column of customer's contract_balance
records does not include prepaid call costs.
nowadays there is the possibility to use data from
accounting.cdr_period_costs (fraud data)
Change-Id: I02ac981016d52eb9f7afdc4047aeaae143aea4dd
* own_transaction_control is enabled for PUT method let the
changes be visible for dialplan.reload
Change-Id: Ie3f6d02e38fe769547b19053877db8b2c6d5aed7
* if there are no more *enabled* CFT left after editing
callforwards (simple/advanced) or if CFT is deleted,
the ringtimeout has to be removed.
Change-Id: Icfa2fb1db281a5a5b4b2edce28ad7b0d69ddf47c
if there are no more *enabled* CFT left after editing
callforwards (simple/advanced), the ringtimeout has to
be removed.
Change-Id: Idc450b410a3822d787f32229a06d5c1f1438e632
datatables for contact selectors are squeezed, causing undesired
linebreaks.
the firstname and lastname columns therefore are collapsed to form
a single "Name" column. It will use up less hspace in the end.
Change-Id: I0ec99961d8632eb924b48978ce5a6d2d79602361
* LI admins wil only be visible to the is_system
administrator.
* It's not possible for an andmin to be both ccare
and LI at the same time
* LI admins can only read/modify themselves
* Non-system admins cannot create/read/modify LI admins
Change-Id: I7b2189a87a5433d270380393d8e5ffec0283d9e5
* new c.users.role 'lintercept', that set to when an admin user has
enabled 'lawful_intercept' flag
* only Administrator page /api/admins and /api/interceptions are available for
the role
* 'lintercept' role can only see own user and only change password
and email
Change-Id: Iadcb022a124afbd77b224e734026f380af0170e8
* Allow ccareadmin access to reseller ajax;
it is needed when ccareadmins create a
customer contact
Change-Id: I5fff19ed8b19cfa3d1118a574455e136aa240236
This reverts commit ec674132df.
Reason for revert: Feature was partially backported and lawful intercept admins were deleted from databse. Feature needs redesign.
Change-Id: I500e66f3bd3b4a0c29fa05e1113568d3776eacf9
* LI Admins are no longer visible in NGCP Panel;
they will be managed via config.yml; creation,
deletion, email update ar all handled when
adding/removing/updating a LI admin in config.yml
* LI Admins can only change their password and
email via Panel UI and API
Change-Id: Idec849e52962b2d5c4cb2a4365cf8c90414c0431
* As click2dial2 was implemented for pro versions,
the version of click2dial is now in ngcp_panel.conf
and it will be taken from there
Change-Id: Iee1d6eea2cae3a80616272bd3fd5bce9b35fc496
* Introduce endopint '/resetpassword' for asking for
password reset using admin username
* Create form for introducing username
* Create url with unique token pointing to '/recoverpassword'
where admin user can introduce new password and email
said url to admin's email address
* Create form for setting new password
* Store username and unique token in Redis expiring
in 5 minutes to store password reset attempt
and identify it when user accesses url in email
* Limit admin access to be able to only change own password
due to new password reset possibility as requested in
TT#76110
Change-Id: Ie3acb961444398afa5b2fdc85e3ca8ceccf9244a
* there is a catch when changing the admin password;
first of all, according to TT#76110 only own admin
users can change the password via PUT/PATCH;
secondly, inside the code, for PATCH to work we need
a dummy 'password' key on the old resource which has
been set to the saltedpass; when updating the admin,
if the password is still equal to saltedpass, no change
is made to the password
Change-Id: I423ebe13988c58b527db65d666f09b73a483422d
* Remove headers, menu, site title and footer if
parameter 'framed' is sent
* Persist 'framed' in the session once it's sent
and only restore header/footer once 'framed' is
sent again with the value 0
Change-Id: Ie1dcc698b901ea3c659a05391ffcdc882113ef13
* Introduce posibility to provision source sets,
time sets, b number sets and destination sets
in the same request with defining cf mappings
which include advanced cf setting with multiple
cf rules.
Change-Id: I9d2865c3fbdac0651a287b926a3fb0e190fca814
- persist prov tmeplates in the database: create, update
and permanently remove them again.
- prov templates from config.yml are still supported,
but cannot be edited though. the templates from
config.yml are merged with those from the db.
- each reseller can have their own prov templates,
while the prov templates from config.yml are visible
to all.
- YAML syntax highlighting and parse check when saving.
Scripting language (perl/javascript) is currently parsed
when executing a provisioning templates only. It is
possible to further extend the parsing checks.
- the prov template "name" + reseller is the unique
identifier. relevant also for the command line tool.
Change-Id: I58d7c54fa82fe512b263b3219bfc84d7e49c56a8
* add admin_jwt realm
* admin JWT tokens are now used to access all non /api
content
Change-Id: I711d6419f0b624b02b53876a8c9171ab638b5d09
(cherry picked from commit dc4d9ec84b5b1199f17631e9e1f9a39ab1996807)
* Utils::Admin was renamed to Utils::Auth in
the commit that introduced support for
bcrypted subscribers webpasswords
Change-Id: I61a90bb135f218e9a0854e9ccdda9e83ffd4ba83
* Change the way webpassword is handled accross
NGCP Panel UI/API to comply with new password
encryption
* At login, if password is not encrypted with
high cost due to the ngcp-bcrypt-webpassword
script, encrypt it with proper cost
* Accept old password format as well until all
webpasswords are encrypted
Change-Id: Iefa9584a62ab4b7d2a224d10bdd415e9cbb8dfb5
* /admin_login_jwt now returns a JWT token for admin
users and also the JWT token is supported in the
authorization process for the admin requests
Change-Id: I987640d46bd8a339a959a6b2efb65b6dce06bf8c
Following "TT#74160 Allow reuse of API TestFramework object",
allow calling the same API TestFramework object with different
'unique_id" value.
Change-Id: I4119361fee64629466668d49244961123c4b72b6
OWNER_VAT_SETTINGS = 1: apply the callist "owner's" VAT settings
(VAT rate and Add VAT Y/N) for each CDR displayed.
OWNER_VAT_SETTINGS = 0: apply the CDR's source/destination
account's VAT settings for each CDR individually.
Change-Id: I08cc88afeb0a0c7cc5592b9542dc9da25bb86286
* Deleting or diasbling a peering server was leaving
the peer_probe value in kamailio htable which was
falsely identifying peering server as up when it
was actually down
* Sending htable.delete peer_probe whenever deleting,
disabling or disabling 'probe' for a peering server
fixes the issue
Change-Id: Ie54fd4bd00391a0cc02544d8d7b55108240c74e8
complete the renaming of "sub rowlock_contract" into
"sub acquire_contract_rowlocks" to distinguish it from
"sub recursevly_lock_contract" (which is related to set
the subscriber lock level, not db row write locks)
Change-Id: I287ee611e20c71a90121007511c3781359968bd2
acquire the billing.contract row lock *before* any
unordered billing.voip_numbers rowlocks by
sub manage_subscriber_numbers().
- "deadlock" waittimeout errors will cease when
creating subscribers concurrently via api
- max_subscribers, is_pilot and other per-contract
constraints will be respected accurately
Change-Id: I73bb7525b327bbb09217b790be9c14cc65ddebcc
* Obfuscate nubmers from the same customer which have
CLIR enabled if calllist_clir_scope is set to 'all'
Change-Id: I1953cb760fec5b4921adb2b3c25b7a2a2d2605a7
* A new endpoint is now available that will
return subscriber's preferences and also
the preferences that the subscriber inherits
from its domain
Change-Id: Iaa29fbe57d520f79ac7051dc8fd151d26df41384
- prevent unneccesary redis "scan"s
- avoid filter/scan (iterating all registrations) by properly
un-aliasing filednames
- ignore any registration of subs that no longer exists
- apply the fixes for ->search(), but also ->find()
Change-Id: I32c89482fc06e76b0369034cd8f3eda24ebbe1bf
* Implement checking/creation of server, profile
and prepare request for device creation on ALE
RPS
* Prepare request for device deletion on ALE RPS
* Changes in Panel to support provisioning via
the ALE RPS
Change-Id: I24b62c03b64c56fcbcabea71428d0b70b46706e6
This program allows to run a 'provisioning template' defined
in config.yml. This will produce a subscriber setup including
required billing contact, contract, preferences, etc. from an
input form defined by that template. The form fields can be
passed as command line options.
Change-Id: I9e155c5ad192937b859f0df97e206c1192e88770
* Default to 1 if no 'enabled' param is sent
* Send mapping's 'enabled' value to UI Form
to stop defaulting to 1 when trying to edit
Change-Id: Iec22f878bd87999c85a0cc99eabcda68fd7f2985
* Add check wether recording stream actually
exists, to prevent throwing error in case
there's a DB entry for the stream, but no
actual file is saved
Change-Id: Ibd051496f570f05ca7067dcaa9f2f9e85e5d84d6
* Introduce posibility to provision header rules,
conditions and actions at the same time
using only the /api/headerrules endpoint;
also rules can be modified with PUT/PATCH on
/api/headerrules
Change-Id: I5ef9a85b4bf0f28693d22603cc74f269ea483983
* Introduce posibility to provision source sets,
time sets, b number sets and destination sets
in the same request with defining call forwards.
Change-Id: I8dd426bcf50a605e257af5e62ca404884bfe9c0d
* Introduce posibility to provision rule sets,
rules, condition and actions at the same time
using only the /api/headerrulesets endpoint;
also rules can be modified with PUT/PATCH on
/api/headerrulesets
Change-Id: I8c054f72a2632d45fec76166774521f8c22aea05
Allow reusing previously created NGCP::API::TestFramework object for
running a new test scenario, while using previously collected data.
- Save 'retained' variables inside module $self object.
- Move 'unique_id' generation from the module to wrapper script.
- Allow rewriting of 'file_path' object.
Change-Id: Ie961f7d0fb34f71e04353125e026ad00715efe91
Make new 'ngcp-api-testframework' package with module:
NGCP::API::TestFramework
Move the module source from t/api/rest2/lib/ to lib/
Change paths accordingly in module files.
Change-Id: I7a4b08ecac1059533628771ea4faf2eb10dba41f
The kamailio lcr.reload RPC command was executed before the gateway
were actually removed from the DB.
The execution has been moved afterwards.
Change-Id: I5c514744cf49a4a32f2a8f08dc8f2a45c0b3c87a
If this attribute set to 1 (or true for backward compatibility) - the
cookie send by the server to the client will got the secure flag that
tells the browser to send this cookies back to the server only via
HTTPS.
Change-Id: Ia99bf2187965893d14f7fed7f7c11c0b016aea53