I was wondering why *foo at default should match '_*[0-9a-zA-Z].*0.' in 1.6.13. Who is making the parse error, * or me? CLI> dialplan show *foo at default '_*[0-9a-zA-Z].*0.' => 1. NoOp(${EXTEN}) [pbx_config] 2. Set(accountcode=${CUT(EXTEN,*,2)}) [pbx_config] 3. Set(extension=${CUT(EXTEN,*,3)}) [pbx_config] 4. Set(CDR(accountcode)=${accountcode}) [pbx_config] 7. ResetCDR() [pbx_config] 8. ... -- Daniel Tryba
On 12/20/2010 11:35 AM, Daniel Tryba wrote:> I was wondering why *foo at default should match '_*[0-9a-zA-Z].*0.' > in 1.6.13. Who is making the parse error, * or me? > > CLI> dialplan show *foo at default > '_*[0-9a-zA-Z].*0.' => > 1. NoOp(${EXTEN}) [pbx_config] > 2. Set(accountcode=${CUT(EXTEN,*,2)}) [pbx_config] > 3. Set(extension=${CUT(EXTEN,*,3)}) [pbx_config] > 4. Set(CDR(accountcode)=${accountcode}) [pbx_config] > 7. ResetCDR() [pbx_config] > 8. ... >'.' stops further matching. Your extension ends up being (effectively) shortened to _*[0-9a-zA-Z].
On Monday 20 December 2010 11:35:21 Daniel Tryba wrote:> I was wondering why *foo at default should match '_*[0-9a-zA-Z].*0.' > in 1.6.13. Who is making the parse error, * or me? > > CLI> dialplan show *foo at default > '_*[0-9a-zA-Z].*0.' => > 1. NoOp(${EXTEN}) [pbx_config] > 2. Set(accountcode=${CUT(EXTEN,*,2)}) [pbx_config] > 3. Set(extension=${CUT(EXTEN,*,3)}) [pbx_config] > 4. Set(CDR(accountcode)=${accountcode}) [pbx_config] > 7. ResetCDR() [pbx_config] > 8. ...You. "." is a short-circuit operator; everything after it is ignored. -- Tilghman