[asterisk-users] is pattern matching inside macro valid?

Derek Andrew derek.andrew at usask.ca
Mon Sep 8 16:43:24 CDT 2014


There are some issues if you use WaitExten inside a macro.

On Mon, Sep 8, 2014 at 2:48 PM, Anurag Rana <anuragrana31189 at gmail.com>
wrote:

>   Can't we use pattern matching inside a macro?
>  Because when I am trying to do so call is terminating even for a very
> simple dummy dialplan.
>
> [demo3]
> exten=>98,1,NoOp()
> exten=>98,2,Macro(testme)
> exten=>h,1,NoOp(terminating call);
>
> [macro-testme]
> exten=>s,1,Playback(Digits/2)
> exten=>s,2,WaitExten(15)
> exten=>s,3,NoOp()
>
> exten=>_X,1,NoOp(${EXTEN})
> exten=>_X,2,Goto(s,3)
>
>
>  Even for this code when execution reaches the line 2 in macro 'testme'
> it terminates as soon as I input some number.
>
>  Error :
>
> WARNING[9984][C-0000000d]: pbx.c:6696 __ast_pbx_run: Invalid extension
> '5', but no rule 'i' or 'e' in context 'demo3'
>     -- Executing [h at demo3:1] NoOp("SIP/101-0000000d", "terminating call")
> in new stack
> [Sep  9 02:11:14] NOTICE[9984]: pbx_spool.c:402 attempt_thread: Call
> completed to SIP/101/009871888729
>
>  Anurag Rana
> http://newbie42.blogspot.in/
>
>
>
>


-- 
Copyright 2014 Derek Andrew (excluding quotations)

+1 306 966 4808
Information and Communications Technology
University of Saskatchewan
Peterson 120; 54 Innovation Boulevard
Saskatoon,Saskatchewan,Canada. S7N 2V3
Timezone GMT-6

Typed but not read.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20140908/ae73be7c/attachment.html>


More information about the asterisk-users mailing list