I'm trying to make a script that makes call files for Asterisk to execute, however I want the extensions within the call files to match my extensions's patterns.

Call file:

Channel: trunk/10
Context: call-file
Extension: 123
Priority: 1


exten = _XXX,1,NoOp(it works)

123 should be able to be matched by _XXX, however it only works if I explicitly write 123 in my extensions.conf. With the pattern I get the following error:

sent to invalid extension but no invalid handler: context,exten,priority=call-file,123,1

Please note, it first try call trunk/10.

You example works for me


exten = _XXX,1,NoOp(it works)
exten = _XXX,n,Wait(100)
exten => s,1,Answer
exten => s,2,Wait(10)

Channel: Local/s@call-file/n
Context: call-file
Extension: 123
Priority: 1


-- Executing [s@call-file:1] Answer("Local/s@call-file-00000000;2", "") in new stack
-- Executing [123@call-file:1] NoOp("Local/s@call-file-00000000;1", "it works") in new stack
-- Executing [123@call-file:2] Wait("Local/s@call-file-00000000;1", "100") in new stack
-- Remote UNIX connection
-- Executing [s@call-file:2] Wait("Local/s@call-file-00000000;2", "10") in new stack

Maybe it can't call trunk or you need update your asterisk.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.