[OpenSIPS-Users] duplicate information in sip_trace table
Ali Pey
alipey at gmail.com
Thu Oct 11 17:53:37 CEST 2012
Did you try to add logs to make sure sip_trace() is not called twice?
Regards,
Ali Pey
On Wed, Oct 10, 2012 at 10:29 AM, Dragomir Haralambiev
<goup2010 at gmail.com>wrote:
> Hi,
>
> Thanks for your replay.
> The problem is not in IF operator.
>
> When use sip_trace() Opnesips make two records in sip_trace.
>
> Best regards,
> PlayMen
> 2012/10/10
>
>> Hi,
>> Do it like this:
>> if (is_avp_set("$avp(trace_id)"){
>> # Do tracing
>> }
>> or like this :
>> If (!avp_check("$avp(trace_id)","re/^$/")){
>>
>> # Do tracing
>> }
>> where "/^$/" regex pattern for empty string.
>>
>> // Binan
>>
>> ------------------------------
>> *Från:* Dragomir Haralambiev <goup2010 at gmail.com>
>> *Till:* OpenSIPS users mailling list <users at lists.opensips.org>
>> *Skickat:* tisdag, 9 oktober 2012 22:55
>> *Ämne:* [OpenSIPS-Users] duplicate information in sip_trace table
>>
>> Hello ,
>>
>> I see duplicate information in sip_trace table (Opensips: 1.8.1):
>> one line with traced_user=empty;
>> other traced_user=$avp(trace_id).
>>
>> How to setup Opensips to remove traced_user=empty ?
>> Here is part of opensips.cfg:
>>
>> modparam("siptrace", "db_url", "mysql://user:password@localhost
>> /opensips")
>> modparam("siptrace", "trace_on", 1)
>> modparam("siptrace", "enable_ack_trace", 1)
>> modparam("siptrace", "traced_user_avp", "$avp(trace_id)")
>> ......
>> if (is_method("INVITE")) {
>> ..... receive $avp(trace_id) from radius_send_auth .......
>> if ( $avp(trace_id) ) {
>> xlog("L_ERR", "Trace ON. Trace_id=$avp(trace_id)\n");
>> sip_trace();
>> }
>> .....
>> }
>>
>> Best regards,
>> PlayMen
>>
>>
>> _______________________________________________
>> 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
>>
>>
>
> _______________________________________________
> 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/20121011/879d1bfe/attachment.htm>
More information about the Users
mailing list