Again, I think ‘
dialplan show <x>’ in ‘
preformatted text’ may be more useful.
You’re missing a ‘dollar sign.’
You have a space between a dollar sign and it’s open brace.
You’re comparing the value of a variable with 11, not the length of the variable. Also, if you want to test if a variable is longer than 11 digits, you must allow more than 11 digits. What do you want to do if it is less than 11 digits? As written (assuming you figure out how to test the length of a variable), anything less than 11 gets ‘invalidvoice’ as well.
You’re missing an argument in read().
You’re using background()/playback() in ways that seem odd and unlikely to give you the caller experience you desire.
You’re using the ‘s’ extension in a non-typical way. Not wrong, just confusing. ‘s’ actually means something specific in most dialplans.
Both ‘yes’ and ‘no’ end up at step 9. Is that consistent with the caller experience you desire?
Have you tried executing this? It certainly won’t do as you expect as presented.
Also “it didn’t work” without a ‘
preformatted text’ console log doesn’t give anyone much to work with.
I think you would benefit from taking a step back, think about what you want to accomplish, reading about dialplan and dialplan applications, and trying before posting.