[sr-dev] [tracker] Comment added: kamailio 3.0.x: segfault in carrierroute

sip-router admin at sip-router.org
Thu Apr 8 16:32:33 CEST 2010


THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task has a new comment added:

FS#60 - kamailio 3.0.x: segfault in carrierroute
User who did this - Ovidiu Sas (osas)

----------
Hello Marius,

I performed some tests and the server is not crashing anymore.

Here's the output of the logs:
INFO: <script>: [1] cr_route("3", "1"); 
ERROR: carrierroute [cr_func.c:112]: could not find id '707' 
ERROR: carrierroute [cr_func.c:558]: invalid carrier id -1 

The verbosity of error logs are not good enough to debug the problem and a little bit misleading:
 - the avp i:707 exists and it is having a valid value
 - the carrier id that we were looking for is '3', not '-1'


On the other hand, I wonder if these error logs are really necessary.
Most of the time, I iterate through carriers until I run out of them.  In order to figure out if the routing is successful, I test the return of 'cr_route':
if ( cr_route(...) )
and in case of an error I print out an error log:
xlog("L_WARN", "WARNING: [$mi] Unable to route '$rU' via carrier '$avp(i:707)' and domain '$var(domain)'\n");
with the following output:
WARNING: <script>: WARNING: [1] Unable to route '123' via carrier '3' and domain '1'

I would see that trying to route via a non existing carrier is a script issue and the maintainer of the script should deal with it (by checking the return of 'cr_route') and the logs should be clean (the routing works as expected and if there are no routes, then no routing is performed which is properly reflected by the return code of cr_route).


Regards,
Ovidiu Sas
----------

More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=60#comment74

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.



More information about the sr-dev mailing list