[OpenSIPS-Users] Using pseudo variables in xlog

Liviu Chircu liviu at opensips.org
Thu Apr 12 12:06:38 EDT 2018


Hi John,

The current variable naming syntax allows "." as part of the name, so in 
your 1st example, OpenSIPS doesn't start because it cannot look up the 
"$si." variable. An example of this naming convention in practice are 
the NAT traversal variables [1].

Nevertheless, your topic has helped me uncover a bug in the ViM syntax 
highlighting regexes, which I will promptly fix. Nice!

Cheers,

[1]: 
http://www.opensips.org/html/docs/modules/2.4.x/nat_traversal.html#exported_pseudo_variables

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 06.04.2018 16:06, John Quick wrote:
> I've noticed this weird problem in xlog for several years/several versions
> and it just happened to me again.
> It could catch someone out so I thought I should report it:
>
> xlog("L_WARN", "NAT detected in request from $si.  Call-ID=$ci\n");
> ...opensips will fail to start
>
> xlog("L_WARN", "NAT detected in request from $si   Call-ID=$ci\n");
> ...it will start with no problem
>
> The difference is the full stop after the $si
> I think the same happens if you put a full stop after any other core pseudo
> variable in the text of an xlog.
>
> John Quick
> Smartvox Limited
> Web: www.smartvox.co.uk
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users




More information about the Users mailing list