Thanks. I will try it. Meanwhile I was trying below code. call goes to 'test' context and from there is passed to macro 'age'. In 'age' macro when I am using any patter to accept even single digit, its not working. So instead of using pattern I hardcoded the extension, but still when I am pressing the key '2' it is throwing below error. Please note that when diaplan execution is inside macro 'age', it searches the extension inside its parent context 'test'...why? am I do something wrong?
[test] exten=>s,1,Macro(age) [macro-age] exten=>s,1,Background(my/age) exten=>s,2,WaitExten(15) exten=>s,3,NoOp(${AGE}) exten=>s,n,GotoIf($[${LEN(${AGE})} > 0]?notEmpty) exten=>s,n,Goto(s,1) exten=>s(notEmpty),n,Background(my/thank-you) exten=>s,n,Wait(1) exten=>2,1,(TEMP=${EXTEN}) ;; exten=>_X,1,(TEMP=${EXTEN}) is also not working exten=>2,n,Read(AGE,,1,10) exten=>2,n,Set(AGE=${${TEMP}*10+${AGE}}) exten=>2,n,Goto(s,3) ----- OUTPUT ----- == Using SIP RTP CoS mark 5 -- Executing [s@test:1] Wait("SIP/101-00000005", "1") in new stack -- Executing [s@test:2] Macro("SIP/101-00000005", "age") in new stack -- Executing [s@macro-age:1] BackGround("SIP/101-00000005", "my/age") in new stack -- <SIP/101-00000005> Playing 'my/age.slin' (language 'en') [Sep 9 00:55:11] WARNING[9759][C-00000005]: pbx.c:6696 __ast_pbx_run:* Invalid extension '2', but no rule 'i' or 'e' in context 'test'* -- Executing [h@test:1] NoOp("SIP/101-00000005", ",,,,,") in new stack [Sep 9 00:55:11] NOTICE[9759]: pbx_spool.c:402 attempt_thread: Call completed to SIP/XXXXXXXX
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users