Dear Kamailio users,
I am trying to use a python script using the module app_python3 to do some
The only argument i want to pass to the python script is duration which i
$dlg_var('call_start') = $TS;
$var('v_duration') = $TS - $dlg_var('call_start');
So my $var('v_duration') has the duration of the call in seconds.
Then i execute from my kamailio.cfg:
The script works randomly - sometimes all is good and sometimes it throw
app_python3 [python_support.c:156]: python_handle_exception(): apy_exec:
calculateCost(4): Unhandled exception in the Python code:
TypeError: an integer is
required (got type NoneType)
The above exception was
the direct cause of the following exception:
Traceback (most recent
"/etc/kamailio/kamailio-python.py", line 282, in calculateCost
It looks like the kamailio log show calculateCost(4) so argument 4 is
passed to python function but once it executes it appear like there is no
string/integer but NoneType argument.
I cannot figure this out why this randomly happens - maybe it's an
app_python3 module issue?
Looking to hear back from you!
Show replies by date