The following scenario disclouse an issue with "ngcp_clean" lua
function in case of callee peer:
- A is a local subscriber with Peer_auth set and
force_outbound_call_to_peer set;
- B is a local subscriber with Peer_auth set and
force_outbound_call_to_peer set;
A calls B.
We clean and load callee preferences of B.
Call is detected as forced to PSTN.
We clean and load peer preferences.
When we set outbound peer_auth* values, the $xavp(callee_prefs)
still contains values from B (instead of peering preferences).
When we clean preferences for the callee peer, we only
clean "callee_peer_prefs" and not "callee_prefs".
"callee_prefs" are clean only in case of 'usr' or 'dom'
preferences.
This patch try to fix this problem in order to fix this
scenario with outbound user authentication.
Change-Id: I76dfa6f9e074b3d83ac67bd818e59233ca50492c
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
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
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.
- 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