Cannot find extension

Losing hair in clumps here…

I have the dialplan ask for a user number, which it then does a SQL query to verify.
It was all working, until I added a check that if nothing was entered 3 times, go to hangup (a loop that increments a var by one until it >3, then goto hangup)

Now, if I dont enter a user number/enter wrong user number 3x, it hangs up. Perfect.
BUT…
If I now enter a CORRECT user number (a 4 digit number return from the DB), it errors out/hangs up:

Executing [##########@incoming:40] GotoIf(“SIP/###.###.###.###-00000000”, “1?USERIS,REDOUSER”) in new stack
[Sep 8 11:34:27] NOTICE[3182][C-00000001]: pbx.c:2948 pbx_extension_helper: Cannot find extension ‘USERIS’ in context ‘incoming’
[Sep 8 11:34:27] WARNING[3182][C-00000001]: pbx.c:8737 pbx_parseable_goto: Priority ‘REDOUSER’ must be a number > 0, or valid label

It shows a “1” saying TRUE, should go to 1st jump (USERIS), when it fails with a 0, it does jump to REDOUSER to ask again correctly.

  same => n,GotoIf($["${USERNUM}" != ""]?USERIS,REDOUSER)

is the gotoif it errors out at, but further down the dialplan:

  same => n(USERIS),NoOp()

and if I show dialplan:
[USERIS] 49. NoOp() [pbx_config]

its there.

What am I missing/not seeing???
I have gone back to older code and copied/pasted to make sure there is no unseen characters, etc.

Thanks

there should be a colon : between USERIS and REDOUSER, here is the syntax for GotoIf:

GotoIf(condition?[labeliftrue][:labeliffalse])

1 Like

slap to da forehead s/:/,/g …
I had it right further up the dialplan too…

Thanks!