[OpenSIPS-Devel] [ opensips-Feature Requests-3002567 ] access to environment and command line arguments from script
SourceForge.net
noreply at sourceforge.net
Fri Oct 15 16:00:24 CEST 2010
Feature Requests item #3002567, was opened at 2010-05-17 10:05
Message generated for change (Comment added) made by razvancrainea
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=1086413&aid=3002567&group_id=232389
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: None
>Status: Closed
Priority: 5
Private: No
Submitted By: Victor Gamov (vitspec)
Assigned to: Razvan Crainea (razvancrainea)
Summary: access to environment and command line arguments from script
Initial Comment:
For example all OPENSIPS_* environmet variables may be accessible as $env[].
All arguments passed as, for example, -o "arg1=var1 arg2=val2" ay be accessible as
$argv[arg1] and $argv[arg2]
It may be useful for example to pass IP-address of upstream provider to set $du or at other situations without using M4.
----------------------------------------------------------------------
>Comment By: Razvan Crainea (razvancrainea)
Date: 2010-10-15 17:00
Message:
Hello Victor,
I have just added two more pseudo-variables that provide the
functionalities you requested:
You can now specify arguments in command line (e.g. -o arg1=val1 -o
arg2=val2 ), and read values in the script using 'argv' core
pseudo-variable ( $argv(arg1) ). You can find documentation at:
http://www.opensips.org/Resources/DocsCoreVar#toc13
Environment variables are also available from the script using 'env'
pseudo-variable from cfgutils module.
Regards,
Razvan
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=1086413&aid=3002567&group_id=232389
More information about the Devel
mailing list