Re: [OpenSIPS-Users] Selective logging

2016-04-29 Thread John Nash
OK thank you.

On Fri, Apr 29, 2016 at 9:59 PM, Bogdan-Andrei Iancu 
wrote:

> You can force whatever log level you want via xlog :
> http://www.opensips.org/Documentation/Script-CoreFunctions-1-11#toc56
>
> Use L_ALERT to get them all the time :)
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 29.04.2016 19:26, John Nash wrote:
>
> OK.  Any way to use Xlog to print DBG messages even if script has debug
> level as ERR ?
>
> On Fri, Apr 29, 2016 at 9:29 PM, Bogdan-Andrei Iancu <
> bog...@opensips.org> wrote:
>
>> Hi Nash,
>>
>> You can do a small route in your script for logging to combine filtering
>> (maybe based on src address check or dialplan for usernames or acls, etc)
>> and xlog() :
>>
>> route[my_xlog]
>> {
>> if ( check_source_address("10") )
>> xlog("DBG: $si: $param(1) \n");
>> }
>>
>> And call it as:
>>
>> route(my_xlog,"this is just a simple log");
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>
>> On 29.04.2016 14:22, John Nash wrote:
>>
>> Is there any way to log messages (Custom messages and SIP trace) from
>> script for a given parameter say IP or ruri.
>>
>> A crude way can be to store say user in local cache and match with the
>> user in script and log else pass but ..
>>
>> 1- I am not sure if any other smart way to do it
>> 2- How can I dunp SIP messages
>>
>>
>>
>>
>> ___
>> Users mailing 
>> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Selective logging

2016-04-29 Thread Bogdan-Andrei Iancu

You can force whatever log level you want via xlog :
http://www.opensips.org/Documentation/Script-CoreFunctions-1-11#toc56

Use L_ALERT to get them all the time :)

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 29.04.2016 19:26, John Nash wrote:
OK.  Any way to use Xlog to print DBG messages even if script has 
debug level as ERR ?


On Fri, Apr 29, 2016 at 9:29 PM, Bogdan-Andrei Iancu 
> wrote:


Hi Nash,

You can do a small route in your script for logging to combine
filtering (maybe based on src address check or dialplan for
usernames or acls, etc) and xlog() :

route[my_xlog]
{
if ( check_source_address("10") )
xlog("DBG: $si: $param(1) \n");
}

And call it as:

route(my_xlog,"this is just a simple log");

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 29.04.2016 14:22, John Nash wrote:

Is there any way to log messages (Custom messages and SIP trace)
from script for a given parameter say IP or ruri.

A crude way can be to store say user in local cache and match
with the user in script and log else pass but ..

1- I am not sure if any other smart way to do it
2- How can I dunp SIP messages



___
Users mailing list
Users@lists.opensips.org 
http://lists.opensips.org/cgi-bin/mailman/listinfo/users





___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Selective logging

2016-04-29 Thread Bogdan-Andrei Iancu

Hi Nash,

You can do a small route in your script for logging to combine filtering 
(maybe based on src address check or dialplan for usernames or acls, 
etc) and xlog() :


route[my_xlog]
{
if ( check_source_address("10") )
xlog("DBG: $si: $param(1) \n");
}

And call it as:

route(my_xlog,"this is just a simple log");

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 29.04.2016 14:22, John Nash wrote:
Is there any way to log messages (Custom messages and SIP trace) from 
script for a given parameter say IP or ruri.


A crude way can be to store say user in local cache and match with the 
user in script and log else pass but ..


1- I am not sure if any other smart way to do it
2- How can I dunp SIP messages



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Selective logging

2016-04-29 Thread John Nash
Is there any way to log messages (Custom messages and SIP trace) from
script for a given parameter say IP or ruri.

A crude way can be to store say user in local cache and match with the user
in script and log else pass but ..

1- I am not sure if any other smart way to do it
2- How can I dunp SIP messages
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users