[Home]

Summary:ASTERISK-12151: [patch] extenpatternmatchnew=yes breaks GotoIf
Reporter:Chris Maciejewski (chris-mac)Labels:
Date Opened:2008-06-05 15:54:16Date Closed:2008-06-09 11:29:36
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/NewFeature
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20080608__bug12800.diff.txt
( 1) 20080609__bug12800__1.6.diff.txt
Description:The following works just fine with extenpatternmatchnew=no

[macro-DialPSTN]
exten => s,1,NoOp(**************** DialPSTN ********************** )
exten => s,n,Set(DYNAMIC_FEATURES=apps)
exten => s,n,Set(CDR(DST_NAME)=${ARG1})
exten => s,n,Set(CDR(DIRECTION)=out)
exten => s,n,GotoIf($["${SIP_HEADER(X-DDI-local)}" = "1"]?local:pstn)
exten => s,n(local),Goto(from-pstn,${CDR(dst)},1)
exten => s,n(pstn),Set(CDR(DST_RATE)=${ARG2})
...

but with extenpatternmatchnew=yes I am getting the following error:

-- Executing [s@macro-DialPSTN:5] GotoIf("SIP/10001-081d6b00", "0?local:pstn") in new stack
[Jun  5 21:57:06] NOTICE[26908]: pbx.c:2926 pbx_extension_helper: Cannot find extension 's' in context 'macro-DialPSTN'
[Jun  5 21:57:06] WARNING[26908]: pbx.c:8053 pbx_parseable_goto: Priority 'pstn' must be a number > 0, or valid label
Comments:By: Tilghman Lesher (tilghman) 2008-06-08 19:14:48

Patch uploaded.  I need feedback from you on how it works for you.

By: Chris Maciejewski (chris-mac) 2008-06-09 03:19:39

Can't compile 1.6.0-beta9 after applying patch:
  [CC] pbx.c -> pbx.o
pbx.c: In function ‘new_find_extension’:
pbx.c:1078: error: ‘struct ast_exten’ has no member named ‘peer_label_table’
pbx.c:1083: error: ‘struct ast_exten’ has no member named ‘peer_label_table’
pbx.c:1088: error: ‘struct ast_exten’ has no member named ‘peer_label_table’
pbx.c:1146: error: ‘struct ast_exten’ has no member named ‘peer_label_table’
make[1]: *** [pbx.o] Error 1
make[1]: Leaving directory `/usr/src/asterisk-1.6.0-beta9/main'
make: *** [main] Error 2

However just checked with trunk r121228 and my dialplan works OK with extenpatternmatchnew=yes so looks like this issue is already solved.

Thanks

By: Tilghman Lesher (tilghman) 2008-06-09 10:34:18

Sorry, I was able to reproduce this problem on trunk just fine, and that's what that original patch did.  I have modified the patch to compile on 1.6, though I have not yet tested it in that configuration.

By: Digium Subversion (svnbot) 2008-06-09 11:28:22

Repository: asterisk
Revision: 121279

U   trunk/main/pbx.c

------------------------------------------------------------------------
r121279 | tilghman | 2008-06-09 11:28:21 -0500 (Mon, 09 Jun 2008) | 6 lines

Implement FINDLABEL matching for the new extension matching engine.
(closes issue ASTERISK-12151)
Reported by: chris-mac
Patches:
      20080608__bug12800.diff.txt uploaded by Corydon76 (license 14)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=121279

By: Digium Subversion (svnbot) 2008-06-09 11:29:36

Repository: asterisk
Revision: 121281

_U  branches/1.6.0/
U   branches/1.6.0/main/pbx.c

------------------------------------------------------------------------
r121281 | tilghman | 2008-06-09 11:29:36 -0500 (Mon, 09 Jun 2008) | 14 lines

Merged revisions 121279 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r121279 | tilghman | 2008-06-09 11:35:06 -0500 (Mon, 09 Jun 2008) | 6 lines

Implement FINDLABEL matching for the new extension matching engine.
(closes issue ASTERISK-12151)
Reported by: chris-mac
Patches:
      20080608__bug12800.diff.txt uploaded by Corydon76 (license 14)

........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=121281