[ previous ] [ next ] [ threads ]
 To :  yate@v...
 From :  Paul Chitescu <paulc@v...>
 Subject :  Re: [yate] Segfaults if lateroute doesn't exist
 Date :  Tue, 1 Jun 2010 13:21:07 +0300
Hi, Sven.

Please make sure you avoid infinite routing loops, infinite recursion and 
infinite diverts (the last ones are quite tricky especially if not all are 
under your control).

You are now spawning a rabbit (or two if both extensions are offline) that eat 
all stack memory of one of the threads.

You can easily avoid that by writing:

${id}^fork/^=fork lateroute/10 lateroute/20

which reads "if the id of the calling leg does not start with fork/ ..."

You should also consider if you really want all previously unmatched called 
numbers to go to extensions 10 and 20.


Paul


On Tuesday 01 June 2010 01:00:13 pm Sven wrote:
> Hi
> 
> On r3352 from svn, yate segfaults whenever it hits something like ".*=fork
> lateroute/10 lateroute/20" in regexroute and either 10 or 20 are not online. 
Is
> this a bug or a configuration flaw of mine?
> 
> If both 10 and 20 are online, everything works just fine. Before the 
segfault,
> yate spills the following two lines exacly 255 times:
> 
>  Late routing call to 'lateroute/10' via 'fork lateroute/10 
lateroute/20'
>  Routing call to '10' in context 'incoming' via 'fork lateroute/10
> lateroute/20' in 20 usec
> 
> Thanks for your hints,   -sven