[OpenSIPS-Users] routing function variable scope
Kingsley Tart
kingsley at dns99.co.uk
Mon May 10 10:41:04 EST 2021
Hi Ben,
Thanks for that - yes you're right, that is exactly what is happening.
It plays nicer if I use an AVP so I'll have to use that.
Thanks once again :)
Cheers,
Kingsley.
On Fri, 2021-05-07 at 17:32 +0000, Ben Newlin wrote:
> Kingsley,
>
> I think the issue here is the nested variable name references. I
> think within route csv_filter, you are actually setting a variable
> called “$var(N11_resultvar_name)”, not a variable with the name of
> the contents of that variable.
>
> I believe you can easily confirm this with two things:
> Remove (or ignore) the parameter providing the variable name and
> hardcode it to “N9_hdrval” in csv_filter for a test. You should see
> the variable is now set when printed after.
> and/or
> Add another log after csv_filter that prints the contents of
> $var($var(N11_resultvar_name)). I think you will find it also
> contains the correct value.
>
>
> Ben Newlin
[snip]
More information about the Users
mailing list