Help with a custom dialplan

This may be more of an asterisk question. I am trying to get a custom dialplan to work. Here it is (put in extensions_custom.conf) -

[page-timeout]
exten => _.,1,Noop(Page Timeout)
same => n,NoOp(Checking if call to paging is a transfer)
same => n,GotoIf($[“${BLINDTRANSFER}” != “”]?transfer_blocked)
same => n,GotoIf($[“${ATTENDEDTRANSFER}” != “”]?transfer_blocked)
same => n,Set(TIMEOUT(absolute)=10)
same => n,Goto(app-pagegroups,${EXTEN},1)
same => n(transfer_blocked),Hangup

Simple, put a timeout on the page group and prevent a call from being transferred to it.

I have Custom Destinations set to: (399 is the page group, and it works if dialed)

and I set up a Misc Application for code 398 -

But when I dial 398 I get this -

-- Executing [398@from-internal:6] Goto("PJSIP/1209-00006992", "page-timeout,399,1") in new stack
-- Goto (page-timeout,399,1)

[2026-06-05 12:48:10] WARNING[2775751][C-00002988]: pbx.c:4521 __ast_pbx_run: Channel ‘PJSIP/1209-00006992’ sent to invalid extension but no invalid handler: 
context,exten,priority=page-timeout,399,1

And the call drops. Why is it saying the extension is invalid when I have ._ as the wildcard? What am I not understanding? Thanks

Your quotes for “${BLINDTRANSFER}” would be my first suspect. Did you copy this from somewhere that uses fancy quotes?

What do you get when you run

asterisk -rx “dialplan show page-timeout”
asterisk -rx “dialplan show 399@page-timeout”

Yes, I did. Will not deny it. I guess I did not pay enough attention. Oddly I get

sangoma*CLI> dialplan show page-timeout
There is no existence of ‘page-timeout’ context
Command ‘dialplan show page-timeout’ failed.

Hmmm. Why is it not showing it, Oh, now I see it. There was a typo with the context before it. :man_facepalming: I feel rather stupid. I guess I figured it out, thanks for the tip.

Blind transfer detection works as expected, but the attend does not. I will keep working on it. Thanks again