[asterisk-bugs] [Asterisk 0014076]: Extensions configuration is not being sorted correctly
Asterisk Bug Tracker
noreply at bugs.digium.com
Mon Dec 15 09:47:40 CST 2008
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=14076
======================================================================
Reported By: toc
Assigned To: blitzrage
======================================================================
Project: Asterisk
Issue ID: 14076
Category: Core/Configuration
Reproducibility: always
Severity: minor
Priority: normal
Status: acknowledged
Asterisk Version: 1.6.0
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Disclaimer on File?: N/A
Request Review:
======================================================================
Date Submitted: 2008-12-15 06:53 CST
Last Modified: 2008-12-15 09:47 CST
======================================================================
Summary: Extensions configuration is not being sorted
correctly
Description:
The matching performed on extensions.conf is not sorting the items as
expected.
Take this example:
[test-ext]
exten => _.,1,NoOp(Match 1)
exten => s-Nothing,1,NoOp(Match 3)
exten => _s.,1,NoOp(Match 2)
exten => _s-.,1,NoOp(Match 4)
The result of:
[test-ext]
exten => _.,1,NoOp(Match 1)
exten => s-Nothing,1,NoOp(Match 3)
exten => _s.,1,NoOp(Match 2)
exten => _s-.,1,NoOp(Match 4)
Is:
— Executing [s-Test at test-ext:1] NoOp("Local/s-Test at test-ext-0cbc;2",
"Match 2") in new stack
I would expect the match to occur on Match 4, this is the closed match
based on the number of items to match on.
Swap them around:
[test-ext]
exten => _.,1,NoOp(Match 1)
exten => s-Nothing,1,NoOp(Match 3)
exten => _s-.,1,NoOp(Match 4)
exten => _s.,1,NoOp(Match 2)
And this is the output:
— Executing [s-Test at test-ext:1] NoOp("Local/s-Test at test-ext-5f64;2",
"Match 4") in new stack
It appears to be inconsistent in applying the matching as I would expect
regardless of entry position, the same results to occur due to the
matching.
======================================================================
----------------------------------------------------------------------
(0096382) blitzrage (administrator) - 2008-12-15 09:47
http://bugs.digium.com/view.php?id=14076#c96382
----------------------------------------------------------------------
Actually I get a separate error even than you with latest trunk. It seems
the dialplan doesn't even allow us to load _s-. because it seems to think
we've already loaded that extension:
-- Registered extension context 'test-ext' (0xfa95fe0) in local table
0xfa98b60; registrar: pbx_config
[Dec 15 06:45:17] WARNING[27102]: pbx_config.c:1550 pbx_load_config: The
use of '_.' for an extension is strongly discouraged and can have
unexpected behavior. Please use '_X.' instead at line 257
-- Added extension '_.' priority 1 to test-ext (0xfa95fe0)
-- Added extension 's-Nothing' priority 1 to test-ext (0xfa95fe0)
-- Added extension '_s.' priority 1 to test-ext (0xfa95fe0)
[Dec 15 06:45:17] WARNING[27102]: pbx.c:7276 add_pri: Unable to register
extension '_s-.', priority 1 in 'test-ext', already in use
And the dialplan I copy/pasted:
[test-ext]
exten => _.,1,NoOp(Match 1)
exten => s-Nothing,1,NoOp(Match 3)
exten => _s.,1,NoOp(Match 2)
exten => _s-.,1,NoOp(Match 4)
So it would seem something has changed in the way the extensions are
parsed in the dialplan.
Issue History
Date Modified Username Field Change
======================================================================
2008-12-15 09:47 blitzrage Note Added: 0096382
======================================================================
More information about the asterisk-bugs
mailing list