[OpenSIPS-Users] How to printout certain variables?

Dmitry Kravchenko dimskraft at gmail.com
Tue Oct 19 15:48:08 CEST 2010


Hi!

> Those values - uri and myself can only be used for comparisons/tests,
> you can not print them.

But why??? Who invented this "quark gluon plasma"??

> The uri is the same as $ru so you can print that
> and myself is the list of local IP addresses, hostnames  and DNS names(
> if you have auto_aliases=yes) and aliases ( set with the alias parameter
> in the global section of the script).

And what about msg:len? Is it also QGP?

Is it possible to replace the code

if( uri == myself )

with some explicit contruct?

It is impossible to debug such magic expressions which are
thing-in-itselfs. When they work they work, but when they do not work,
you have no way to know why.

> On 10/19/2010 03:45 PM, Dmitry Kravchenko wrote:
>> Hi!
>>
>> Is there a way to printout (with xlog) certain variables, like myself,
>> uri, msg:len and so on?
>>
>> I have tried the following ways, but failed:
>>
>>
>>          #xlog("L_NOTICE", "DIMS: uri (" + $uri + ") == myself (" +
>> $myself + " block...");
>>
>>          #xlog("L_NOTICE", "DIMS: uri (" + uri + ") == myself (" +
>> myself + " block...");
>>
>>          #$var(myuri) = uri;
>>          #$var(mymyself) = myself;
>>          #xlog("L_NOTICE", "DIMS: uri ($var(myuri)) == myself
>> ($var(mymyself))  block...");
>>
>>          #xlog("L_NOTICE", "DIMS: uri ($uri) == myself ($myself)  block...");
>>
>>          #xlog("L_NOTICE", "DIMS: uri ($var(uri)) == myself
>> ($var(myself))  block...");
>>
>>          #$avp(myuri) = uri;
>>          #$avp(mymyself) = myself;
>>          #xlog("L_NOTICE", "DIMS: uri ($vap(myuri)) == myself
>> ($avp(mymyself))  block...");
>>
>> All versions of code cause some error.
>>
>> Thanks.
>>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users



More information about the Users mailing list