[SR-Users] Passing Command-Line Arguments to Kamailio Config Script
Daniel-Constantin Mierla
miconda at gmail.com
Wed Jun 25 09:31:27 CEST 2014
Hello,
you can use pre-processor defines, passing it via -A command line parameter:
kamailio -A xyz='"abc"' ...
in config:
$var(x) = xyz
Cheers,
Daniel
On 25/06/14 02:31, AliReza Khoshgoftar Monfared wrote:
> Hi,
>
> I had a simple question to which I could not find a clear answer in
> the documentation.
>
> How can I pass a command line argument to Kamailio config script?
>
>
> For example, assume that I run my kamailio daemon using script myconf.cfg:
>
> >>kamailio -f myconf.cfg
>
> Now I want to pass a value, say an IP address and use it inside the
> script. Sth like
>
> >>kamailio -f myconf.cfg --ip __MY_IP__
>
> and then have an assignment of "$var=__MY_IP__" inside myconf.cfg
>
> Is there an easy way to do this?
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20140625/2b1c5e7e/attachment.html>
More information about the sr-users
mailing list