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
We were using a mix of .new() and :new() and
that lead us to errors when calling new with parameters
Just be consistent and choose one
Change-Id: Icc2078efb377b80942b2fb518db52df339ecda6a
https://www.lua.org/manual/5.2/manual.html#8.3
> (Modules are not expected to set global variables anymore.)
EXPORT_ASSERT_TO_GLOBALS was just there for backwards compatibility
Change-Id: I11ac6d24746ca3c965b16ad523efff1f12ef0e9a
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
In the new version of LuaUnit assertTrue() and assertFalse()
functions are changed to striclty evaluate that the data is
True or false.
Where necessary the fuctions have been substituted in the test
with the new assertEvalToTrue() or assertNil().
Change-Id: I0c728323752a4458e93f516c7529670433c516d1
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.