[OpenSER-Devel] [ openser-Bugs-1896648 ] carrierroute: improper info in the logs

SourceForge.net noreply at sourceforge.net
Sun Mar 2 18:52:18 CET 2008


Bugs item #1896648, was opened at 2008-02-19 00:20
Message generated for change (Comment added) made by osas
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1896648&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: ver 1.3.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Ovidiu Sas (osas)
Assigned to: Henning Westerholt (henningw)
Summary: carrierroute: improper info in the logs

Initial Comment:
I was routing the following INVITE via carrierroute:
INVITE sip:19059993908
From:sip:9059993908

And I got the following logs:
INFO:carrierroute:rewrite_uri_recursor: URI or route tree nodes empty, empty rule list
INFO:carrierroute:rewrite_uri_recursor: empty rule list for URI 93908
INFO:carrierroute:carrier_rewrite_msg: uri 19059993908 was rewritten to sip:19059993908 at GW_IP


It seems that the second INFO probe is showing the last digits of the URI instead of the prefix:
"93908" instead of "1905999".


Regards,
Ovidiu Sas

----------------------------------------------------------------------

>Comment By: Ovidiu Sas (osas)
Date: 2008-03-02 12:52

Message:
Logged In: YES 
user_id=1395524
Originator: YES

Here's a patch against 1.3 that will fix the prefix log:
Index: modules/carrierroute/route_func.c
===================================================================
--- modules/carrierroute/route_func.c   (revision 3815)
+++ modules/carrierroute/route_func.c   (working copy)
@@ -632,7 +632,9 @@
                                if (route_tree->rule_list != NULL) {
                                        return rewrite_on_rule(route_tree,
dest, msg, user, hash_source, alg);
                                } else {
-                                       LM_INFO("empty rule list for URI
%.*s", re_uri.len, re_uri.s);
+                                       LM_INFO("empty rule list for
prefix [%.*s]%.*s\n",
+                                               user->len - re_uri.len,
user->s,
+                                               re_uri.len, re_uri.s);
                                        return 1;
                                }
                        default:

----------------------------------------------------------------------

Comment By: Ovidiu Sas (osas)
Date: 2008-02-19 22:49

Message:
Logged In: YES 
user_id=1395524
Originator: YES

Also, it seems that the carrier field that is displayed in the
"ERROR:carrierroute:carrier_rewrite_msg:" is some sort of index instead of
being the real id of the carrier from the carrier column of carrierroute
table.

----------------------------------------------------------------------

Comment By: Ovidiu Sas (osas)
Date: 2008-02-19 20:51

Message:
Logged In: YES 
user_id=1395524
Originator: YES

It doesn't seem to do the trick:
INFO:carrierroute:rewrite_uri_recursor: URI or route tree nodes empty,
empty rule list 
INFO:carrierroute:rewrite_uri_recursor: empty rule list for URI 4
INFO:carrierroute:rewrite_uri_recursor: empty rule list for URI 8
INFO:carrierroute:rewrite_uri_recursor: empty rule list for URI 3
INFO:carrierroute:rewrite_uri_recursor: empty rule list for URI 1
INFO:carrierroute:rewrite_uri_recursor: empty rule list for URI 4
INFO:carrierroute:rewrite_uri_recursor: empty rule list for URI 1
ERROR:carrierroute:carrier_rewrite_msg: during rewrite_uri_recursor, uri
14138437466, carrier 3, domain 1 

----------------------------------------------------------------------

Comment By: Henning Westerholt (henningw)
Date: 2008-02-19 05:29

Message:
Logged In: YES 
user_id=337916
Originator: NO

Hi Osas,

ok, i've commited a fix. Can you please test, if the log info is correct i
will backport this to the 1.3 branch too.

Cheers,

Henning

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1896648&group_id=139143



More information about the Devel mailing list