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@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