The 'duration' variable is a string but it was written as int,
causing kamailio to write error lines
Change-Id: I2df1524d331e9b1d54bb0bdb84c06f4280e14fae
> ngcp/fp.lua:30:121: line is too long (126 > 120)
> ngcp/pprof.lua:28:121: line is too long (158 > 120)
Change-Id: Icf87f29049b2cc4ce29e7c1f5c78d9f2a53572c0
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
The script collects all the callID from redis, then, one by one
it checks if callID exist in kamailo. At this time a call existing
in redis before may be destroyed in kamailio dlg.list. And so
script believe it's a stuck call.
Solution: collect CallID from REDIS and kamailio.dlg at the same
time, and compare afterwards.
Change-Id: I233a498e42bf5113b5b11ea688487e1840cd84a6
We also need to switch from python-xmlrunner to python3-pytest, as
the former is not present in Debian unstable/testing anymore (see
<https://bugs.debian.org/935688>), and does not provide python3
support in Debian buster anyway.
Change-Id: I8af9ead2755af2e24f5bedf53d8cd20c4ed63b85
Merge two file stanzas for Sipwise copyright, and use the one with the
canonical Sipwise copyright entity.
Change-Id: Iae16419b8d7d6af0555968e109a777b7951c121c
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
systemctl(1) (provided by systemd) isn't necessarily available in the
environment yet, e.g. as identified by piuparts tests.
Instead of relying on systemctl(1) let's use service(8) from
init-system-helpers (which is an essential package), and while at it
report the exit code of the app_lua reload.
Fixes:
| /var/lib/dpkg/info/lua-ngcp-kamailio.postinst: 7: /var/lib/dpkg/info/lua-ngcp-kamailio.postinst: systemctl: not found
Change-Id: I52cf30d6421f58c77ce1983d95c141d3a331e939
When systemd detects that it's running inside a chroot (like in our
installation environment), then it doesn't output something like
"active" on stdout, but only string "Running in chroot, ignoring
request." on stderr.
Since stdout is empty, comparing nothing against string "active"
(so `[ = "active"`) will fail test(1) execution.
Fixes:
| Setting up lua-ngcp-kamailio (6.5.3.1+0~mr6.5.3.1) ...
| Running in chroot, ignoring request: is-active
| /var/lib/dpkg/info/lua-ngcp-kamailio.postinst: 7: [: =: unexpected operator
Change-Id: I11a6b9356b76cd686e0046275a6306431db64105