[SR-Users] drouting module: can I use non-digit prefix?

Yufei Tao yufei.tao at redembedded.com
Tue Jun 12 16:33:36 CEST 2012


Hi Daniel

Thanks for the reply!

I tried it again and the log seems to suggest it crashed when loading
the dr_rules table that contains non-digit prefix, e.g. prefix bing 'abc.':

1. First crash when doing MI command "dr_reload":
"
Jun 12 15:19:07 myserver2 /usr/sbin/kamailio[2293]: INFO: drouting
[drouting.c:476]: "dr_reload" MI command received!
Jun 12 15:19:08 myserver2 /usr/sbin/kamailio[2293]: ERROR: drouting
[dr_load.c:251]: failed to add prefix route
Jun 12 15:19:08 myserver2 /usr/sbin/kamailio[2293]: ERROR: drouting
[dr_load.c:555]: failed to add rule id 1 -> skipping
Jun 12 15:19:08 myserver2 /usr/sbin/kamailio[2293]: WARNING: drouting
[dr_load.c:577]: no valid routing rules -> discarding all destinations
Jun 12 15:19:08 myserver2 /usr/sbin/kamailio[2357]: : <core>
[pass_fd.c:293]: ERROR: receive_fd: EOF on 30
Jun 12 15:19:08 myserver2 /usr/sbin/kamailio[2274]: ALERT: <core>
[main.c:751]: child process 2293 exited by a signal 11
Jun 12 15:19:08 myserver2 /usr/sbin/kamailio[2274]: ALERT: <core>
[main.c:754]: core was not generated
Jun 12 15:19:08 myserver2 /usr/sbin/kamailio[2274]: INFO: <core>
[main.c:766]: INFO: terminating due to SIGCHLD
Jun 12 15:19:08 myserver2 /usr/sbin/kamailio[2357]: INFO: <core>
[main.c:817]: INFO: signal 15 received
Jun 12 15:19:08 myserver2 /usr/sbin/kamailio[2356]: INFO: <core>
[main.c:817]: INFO: signal 15 received
... ...
"

2. And the second crash on start up (with the bad dr_rules prefix):

"
Jun 12 15:20:16 myserver2 /usr/sbin/kamailio[5352]: WARNING: drouting
[dr_load.c:577]: no valid routing rules -> discarding all destinations
Jun 12 15:20:16 myserver2 /usr/sbin/kamailio[5352]: : <core>
[mem/q_malloc.c:440]: BUG: qm_free: bad pointer 0x4 (out of memory
block!) - aborting
Jun 12 15:20:16 myserver2 /usr/sbin/kamailio[5393]: : <core>
[pass_fd.c:293]: ERROR: receive_fd: EOF on 30
Jun 12 15:20:16 myserver2 /usr/sbin/kamailio[5333]: ALERT: <core>
[main.c:751]: child process 5352 exited by a signal 6
Jun 12 15:20:16 myserver2 /usr/sbin/kamailio[5393]: DEBUG: <core>
[tcp_main.c:3555]: DBG: handle_ser_child: dead child 19, pid 5352
(shutting down?)
Jun 12 15:20:16 myserver2 /usr/sbin/kamailio[5333]: ALERT: <core>
[main.c:754]: core was not generated
Jun 12 15:20:16 myserver2 /usr/sbin/kamailio[5393]: DEBUG: <core>
[io_wait.h:617]: DBG: io_watch_del (0x825cec0, 30, -1, 0x0) fd_no=65 called
Jun 12 15:20:16 myserver2 /usr/sbin/kamailio[5333]: INFO: <core>
[main.c:766]: INFO: terminating due to SIGCHLD
Jun 12 15:20:16 myserver2 /usr/sbin/kamailio[5392]: INFO: <core>
[main.c:817]: INFO: signal 15 received
Jun 12 15:20:16 myserver2 /usr/sbin/kamailio[5391]: INFO: <core>
[main.c:817]: INFO: signal 15 received
... ...
"

Thanks very much!

Yufei

On 12/06/12 10:53, Daniel-Constantin Mierla wrote:
> Hello,
>
> On 6/1/12 4:57 PM, Yufei Tao wrote:
>> Hi
>>
>> I'm using drouting module and seems that it only allows digit-only
>> prefixes. Also all the number of digits to be stripped ('strip' defined
>> in dr_gateways) must be all digits too. When I used non-digits in these,
>> Kamailio crashed.
>>
>> Is there any way in drouting module that I can use prefixes with
>> alphabet and dots, e.g. "gateway1."? Thanks very much!
> iirc, drouting accepts only digit based prefixes. Alphanumeric keys
> are not suitable for tree structures, like used by drouting, because
> there will be soo many children for each node that will use lot of
> memory.
>
> Anyhow, it should not crash, do you have a backtrace or a log for it?
>
> Maybe you can combine several modules to get you go, if you want to
> use drouting. Like using mtree (it has a way to define the characters
> allowed in the prefixes -- still not suitable for all the characters)
> or htable to map your alphanumeric key to a digit only key. Then you
> can use the result with drouting.
>
>
> Cheers,
> Daniel
>
>>
>> Yufei
>> --
>> Yufei Tao
>> Red Embedded
>>
>> This E-mail and any attachments hereto are strictly confidential and
>> intended solely for the addressee. If you are not the intended
>> addressee please notify the sender by return and delete the message.
>>
>> You must not disclose, forward or copy this E-mail or attachments to
>> any third party without the prior consent of the sender.
>>
>> Red Embedded Design, Company Number 06688253 Registered in England:
>> The Waterfront, Salts Mill Rd, Saltaire, BD17 7EZ
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
--
Yufei Tao
Red Embedded

This E-mail and any attachments hereto are strictly confidential and intended solely for the addressee. If you are not the intended addressee please notify the sender by return and delete the message.

You must not disclose, forward or copy this E-mail or attachments to any third party without the prior consent of the sender.

Red Embedded Design, Company Number 06688253 Registered in England: The Waterfront, Salts Mill Rd, Saltaire, BD17 7EZ



More information about the sr-users mailing list