[SR-Users] usage of app_mono : how to communicate results back to config file

Daniel-Constantin Mierla miconda at gmail.com
Mon Nov 21 12:57:46 CET 2016


Hello,


On 15/11/16 01:12, Pranathi Venkatayogi wrote:
>
> Hi,
>
>  I am using app_mono module and building my logic in c# app.
>
>  I am unable to understand how to send the decision back to kamalio.cfg.
>
>  
>
> More precisely:
>
>    I would like my routing logic to allow specific user names though
> they are not registered as subscribers. Like:
> translate at myip.cyracom.com <mailto:translate at myip.cyracom.com>
>
>    I have the logic in c# app which takes $ru and validates such that:
>
>             Host is myip.cyracom.com
>
>             User is translate
>
>    How do I communicate the decision if it is valid or not back to my
> config script.
>
>    Do I need to introduce new pseudo variable for this purpose?
>
you don't need to introduce new variables, you can use $var(name), with
your choice of name, to pass information from kamailio.cfg to mono and back:

  - in mono:

SR.PV.SetS("$var(myname)", "abcd");

- in kamailio.cfg, after execution of hte mono program, $var(myname)
should be "abcd"

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20161121/0a3c88eb/attachment.html>


More information about the sr-users mailing list