[Home]

Summary:ASTERISK-04695: template matching code needs to be case sensitive
Reporter:sedwards (sedwards)Labels:
Date Opened:2005-07-26 16:17:58Date Closed:2005-08-26 19:47:17
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/Configuration
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description: The extensions.conf snippet below shows that the template matching code needs to be case sensitive:

[T](!)
       exten = T,1, goto(max-time,s,1)
[t](!)
       exten = t,1, goto(${CONTEXT},s,1)
[test](T,t)

This yields the following output:

   -- Registered extension context 'test'
   -- Added extension 'T' priority 1 to test
Jul 26 13:41:17 WARNING[18004]: pbx.c:4644 ast_add_extension2: Unable to register extension 'T', priority 1 in 'test', already in use
Jul 26 13:41:17 WARNING[18004]: pbx_config.c:1758 pbx_load_module: Unable to register extension at line 45
ap1> show dialplan test
[ Context 'test' created by 'pbx_config' ]
 'T' => 1. goto(max-time|s|1) [pbx_config]
Comments:By: Kevin P. Fleming (kpfleming) 2005-07-26 17:44:32

This is not correct; extension matching is done case-insensitively, so you cannot use both 't' and 'T' with the same priority in a single context.

By: sedwards (sedwards) 2005-07-27 00:33:43

Context matching is not case sensitive. If you have a context "[test]," executing "goto(TEST,s,1) fails with:

Channel 'foo' sent into invalid extension 's' in context 'TEST', but no invalid handler

Also, you CAN have "t" and "T" extensions in the same context with the same priority:

fs> show dialplan test
[ Context 'test' created by 'pbx_config' ]
 'T' =>            1. hangup()                                   [pbx_config]
 's' =>            1. hangup()                                   [pbx_config]
 't' =>            1. hangup()                                   [pbx_config]

"T" is the absolute timeout
"t" is the digit timeout

See:

http://www.voip-info.org/tiki-index.php?page=Asterisk+standard+extensionshttp://www.voip-info.org/tiki-index.php?page=Asterisk+standard+extensions

Thus, I think template matching should also be case-insensitive.

By: Kevin P. Fleming (kpfleming) 2005-08-26 19:47:07

The actual issue here is that _context_ names are not case-sensitive (and are documented that way), so what's really happening is that you are trying to inherit the 'T' context twice, rather than 'T' and 't'.

This will not be changed, you will have to use different context names.