[SR-Users] Best way to implement custom LCR
KamDev Essa
kamdevessa at yahoo.com
Tue May 22 22:15:10 CEST 2018
Perfect.
Thanks
KD
On Tuesday, May 22, 2018, 3:44:48 PM EDT, Alex Balashov <abalashov at evaristesys.com> wrote:
It does not return a function, but it can set variables and manipulate
message values within the API exposed into Python:
https://github.com/kamailio/kamailio/blob/master/src/modules/app_python/python_examples/handler.py
In a larger sense, app_python implements the KEMI framework:
https://kamailio.org/docs/tutorials/devel/kamailio-kemi-framework/kemi/
-- Alex
On Tue, May 22, 2018 at 07:32:35PM +0000, KamDev Essa wrote:
> On the app_python. How do I get the value of rn back to to kamailio. does the function return a value? likern = python_exec("my_python_function", "$rU");and evaluate rn later in teh script?
> KD
>
>
>
> On Tuesday, May 22, 2018, 3:18:01 PM EDT, Alex Balashov <abalashov at evaristesys.com> wrote:
>
> https://kamailio.org/docs/modules/5.1.x/modules/app_python.html
>
> Or, if you absolutely must — though I don't recommend it:
>
> https://kamailio.org/docs/modules/5.1.x/modules/exec.html
>
> -- Alex
>
> On Tue, May 22, 2018 at 07:14:32PM +0000, KamDev Essa wrote:
>
> > Awesome. Where can I get info on shelling out to run a lua or python script and getting data. That could very well be a quick and dirty option if its not to bad on performance stats.
> > KD
> > On Tuesday, May 22, 2018, 3:05:08 PM EDT, Henning Westerholt <hw at kamailio.org> wrote:
> >
> > #yiv3106319993 p, #yiv3106319993 li {white-space:pre-wrap;}
> > Am Dienstag, 22. Mai 2018, 21:00:47 CEST schrieb KamDev Essa:
> >
> > > In the LRN request via ENUM using dig I provide an IP of my LRN dip provide
> >
> > > and a E.164 formatted TN of the requested user. I get a text dump from
> >
> > > which I extract the rn value if present. I dont not know how to automate
> >
> > > those steps or other steps to get the same solution. KD
> >
> > > [..]
> >
> >
> >
> > Hello,
> >
> >
> >
> > if the enum module somehow does not work for you, maybe you could think of adding some python or lua code. You could exec with python_exec e.g. a DNS query and put the result in a pseudo-variable. Just an idea, not tested obviously.
> >
> >
> >
> > Henning
> >
>
> > _______________________________________________
> > Kamailio (SER) - Users Mailing List
> > sr-users at lists.kamailio.org
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users at lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180522/dedd922c/attachment.html>
More information about the sr-users
mailing list