[SR-Users] Passing Command-Line Arguments to Kamailio Config Script

AliReza Khoshgoftar Monfared khoshgoftar at gmail.com
Wed Jun 25 02:31:06 CEST 2014


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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20140624/19c984c1/attachment.html>


More information about the sr-users mailing list