[OpenSIPS-Users] How to printout certain variables?

Max Mühlbronner mm at 42com.com
Tue Oct 19 16:44:54 CEST 2010


  Hi,

you could use the pseudo variable $ml  (*$ml* - reference to SIP message 
length ).  or if needed: $cl (content-length header)

Hope this helps.


Max M.

Am 19.10.2010 15:48, schrieb Dmitry Kravchenko:
> 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
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20101019/a72b9654/attachment.htm 


More information about the Users mailing list