[OpenSIPS-Devel] [ opensips-Feature Requests-3002567 ] access to environment and command line arguments from script

Victor Gamov vit at euro-comm.net
Mon Oct 18 22:06:26 CEST 2010


Hi Razvan!

I test '-o arg1=val1 -o arg2=val2' construction at trunk-7304 and it
works fine!

Thank you very much!

On 15.10.2010 18:00, SourceForge.net wrote:
> 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



-- 
CU,
Victor Gamov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vit.vcf
Type: text/x-vcard
Size: 156 bytes
Desc: not available
Url : http://lists.opensips.org/pipermail/devel/attachments/20101019/64cc38f6/attachment.vcf 


More information about the Devel mailing list