Victor Seva
64f7a41a07
MT#33031 support reseller preferences
...
Change-Id: I3e715932181ba895dee79155bfd4969ddeed7cd0
2 years ago
Victor Seva
6f08b673d0
TT#165251 NGCPRedis class
...
Unify redis interaction in a class
* allow passing partial config via new()
config will be merged using defined defaults so
missing keys will be appended using values from defaults
Change-Id: I486637e99e0e36fbe1f5a06c703c6b7d2fa77d77
3 years ago
Victor Seva
48b0d4d018
TT#78651 Refactor code
...
* use proper class inherance
Change-Id: I69c9b14c64762ec1a1e17267961830f4794f2246
5 years ago
Victor Seva
dc1ba69f3f
TT#78651 migrate to new KEMI interface
...
We are going to use both modules app_lua and app_lua_sr until we
solve the missing pieces on KEMI:
* KSR.pvx.xavp_get() returns a string like '<<xavp:%p>>' not a table like
sr.xavp.get()
* KEMI lacks of something like sr.xavp.get_keys() funtion
So, migrate everything that we can to KEMI and keep using sr approach
for just that two cases
- mocks/sr.lua: use same objects for same behaviour
Change-Id: I475ff8f820586cdc94c75bff7466238215e05673
5 years ago
Kirill Solomko
efab0961ea
TT#12593 add fax_prefs xavp load for caller callee
...
* xavp caller_fax_prefs and callee_fax_prefs is
added and automatically fetched as a part of
caller_usr_load and callee_usr_load
* fax_prefs are load all related subscriber's
NOT NULL fax preferences from
provisioning.voip_fax_preferences
Change-Id: I2dcedf30433b3d5b94efa9292437a4e7501588a3
8 years ago
Kirill Solomko
bdbe03b1b7
MT#18499 ngcp contract load by location ip (location_id)
...
Change-Id: I9554a687f6e4edfc06b746f85f19f7b708c8338c
9 years ago
Victor Seva
51a8be0b69
MT#12025 code refactoring with luacheck help
...
- don't leak globals, libs should return metatable
- fix requires
- remove unnecessary declarations of variables
- split mocks/sr
- remove unused tests
- fix tests
Change-Id: I2bda46410cf62c61c38ce1a9bf4b96f1a7a961bc
9 years ago
Victor Seva
7a52fc6ad5
MT#12025 clean luacheck error
...
Change-Id: I247be4018189e393c1a8d7ee9fa7b455cc38f1a7
10 years ago
Victor Seva
9afb7095d7
MT#12025 move NGCPConfig to new config.lua file
...
Change-Id: I5ce296dd8cd77317b642e0b5988487bf8922d3b3
10 years ago
Victor Seva
e6d69e0dc0
MT#9067 set message of reconnection to debug level
...
People are scared of the warning message
11 years ago
Victor Seva
555326aa09
MT#10199 remove defaults from profile. Fix empty results on profile load
11 years ago
Victor Seva
3cb2ea70a9
MT#10199 add prof_preferences
11 years ago
Victor Seva
cd32667b03
MT#9067 change warn message on reconnection
11 years ago
Victor Seva
e9be0888eb
MT#9067 NGCPConfig: check connection before
11 years ago
Victor Seva
6f8b67f4d5
MT#9067 use one MySQL connection only on NGCP
...
Don't close the connection, just the cursor.
We may need a ping function to test the connection.
https://github.com/keplerproject/luasql/pull/12
11 years ago
Andreas Granig
471aa9a994
MT#7471 Implement contract pref loading.
11 years ago
Victor Seva
e252a72278
I don't know why I'm saying fix. Defaults!!
12 years ago
Victor Seva
97e9453a69
Added copyright in all lua. Removed unused script.
12 years ago
Victor Seva
e6439d5a18
Fixing default prefs.
...
default dict has only peer, dom and usr keys.
You should check for a default on real level always. It is always
created even if you load only dom prefs.
12 years ago
Victor Seva
0abf856f7d
Remove creation of avps. Fix default creation.
12 years ago
Andreas Granig
6888a74fcf
Migrated all AVPs to XAVPs.
12 years ago
Andreas Granig
859f8756e2
Migrate account_id to xavp.
12 years ago
Andrew Pogrebennyk
1c76d7d1a5
Drop avp prefs that have been replaced with xavp.
12 years ago
Victor Seva
cd09baef02
Fix forgotten caller_sound_set Thanks Andrew
12 years ago
Victor Seva
ef435a20a8
Fix log_var function.
...
Add _str_var and __tostring functions to be able to test the results.
(cherry picked from commit 1fdf196a30
)
12 years ago
Victor Seva
bf5eb95c2d
Add no_nat_sipping used on the registrar
12 years ago
Victor Seva
9a3a80834a
Added __tostring() properly to ngcp, xavp and prefs
12 years ago
Victor Seva
6ed63ee7c7
Fix loading lua-sql-mysql on lua5.1 on squeeze
12 years ago
Victor Seva
9e1f52f495
Fix load lua-sql-mysql driver on wheezy. See ( #677739 )
...
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=677739
12 years ago
Victor Seva
73ed362e73
Added ngcp.log_var function
12 years ago
Victor Seva
d3c665078a
Added ngcp.log_pref helper function
12 years ago
Victor Seva
f7fc117dfa
Fix indent
12 years ago
Victor Seva
8de567f413
Changes from master. PBX cloud
12 years ago
Victor Seva
3fb2dfda7a
callee_usr_load old vars.
12 years ago
Victor Seva
6d226d7d2d
caller_usr_load with old vars.
12 years ago
Victor Seva
cc2c08d527
callee_peer_load with old vars
12 years ago
Victor Seva
c76e9aa378
NGCPConfig: Added default
...
- use default to keep the vars/prefs defaults
NGCP: Added avp vars. Create the avp vars on load. Clean avp vars.
12 years ago
Victor Seva
1a1d09fea9
Change load API.
...
Use {caller|callee}_{usr|peer}_load().
peer_load just copies peer prefs to real prefs.
12 years ago
Victor Seva
28e18d4eb1
Added group param for clean.
12 years ago
Victor Seva
e50b421690
Fix Typo
12 years ago
Victor Seva
ae723023db
Test just test_kamailio.
...
Print info loaded.
12 years ago
Victor Seva
a3908d5456
No index
12 years ago
Victor Seva
422e50afeb
Fix clean. Test it.
12 years ago
Victor Seva
2d24a0700c
Added real prefs.
12 years ago
Victor Seva
a93fc95c37
Added log for NGCPDomainPrefs, NGCP
...
Fix lemock use on test for NGCPDomainPrefs
12 years ago
Victor Seva
7208736c32
Fixed getDBConnection. Added test.
12 years ago
Victor Seva
86ff015f82
using xavps.
...
using lemock the right way
12 years ago
Victor Seva
4f4f571709
- Added lemock library ( Debian package needed )
...
- Added Mock for kamailio sr module
- Added NGCP, NGCPPrefs, NGCPConfig, NGCPPeerPrefs and NGCPDomainPref classes.
This is just a playground to figure out how can we organize the code. WIP
12 years ago