From embedded lua/python/etc., leverage $var(...) to pass the values, it
can be done both ways, there are functions to get/set via KSR.pv or KSR.pvx:
-
https://www.kamailio.org/docs/tutorials/devel/kamailio-kemi-framework/core/…
-
https://www.kamailio.org/docs/tutorials/devel/kamailio-kemi-framework/modul…
For exec, there is exec_avp() that could help.
Cheers,
Daniel
On 08.02.23 19:16, Dmytro M wrote:
What is the simplest way to return values from
external application
into Kamailio config and assign it to a variable?
I'm looking for the most light weight mechanism to do it and to
offload some logic to external app. Something like this would be ideal:
$var(myVar), $var(err) = lua_run("lua_func1", "$rU");
OR
$var(encString) = exec_cmd("echo 'abc $rU' | base64");
There is this method:
http_client_query("http://...", "", "",
"$var(result)");
but there is an overhead of networking and HTTP protocol.
Please advise.
Thanks, Dmytro
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-leave(a)lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only
to the sender!
Edit mailing list options or unsubscribe:
--
Daniel-Constantin Mierla --
www.asipto.com
www.twitter.com/miconda --
www.linkedin.com/in/miconda
Kamailio World Conference - June 5-7, 2023 -
www.kamailioworld.com