Dialplan Assistance

I have an Asterisk box peered to a Switchvox at another location over one of our WAN connections. I can dial from the Switchvox to the Asterisk – from 16199 to 19222. What I am having trouble with is dialing back to the Switchvox from Asterisk – from 19222 to 16199. If I put this statement in the Asterisk dialplan it works:
exten => 16199,1,DIAL(SIP/${EXTEN@10.40.0.30},20,t)
exten => 16199,2,Busy
exten => 16199,104,Hangup
;
Per a recommendation from Switchvox tech support, they gave me this format to encompass all five (5) digit extensions beginning with 161. However, it does not work. What am I missing here?
exten => _161XX,1,DIAL(SIP/${EXTEN@10.40.0.30},20,t)
exten => _161XX,2,Busy
exten => _161XX,104,Hangup
;
Thank You.

The wildcard pattern is OK. However neither version should work, as the “}” should be immediately after the N of EXTEN.

The:

exten => 16199,104,Hangup

is unreachable, so pointless.

The:

exten => _161XX,2,Busy

forces failed calls to appear as busy, rather than as the most appropriate status for the actual failure reason.

“t” is a weird option to use on calls outgoing on a trunk, even a tie trunk. It allows transfers to be initiated from the remote end, but not from the local end.

20 is the timeout on ringing, assuming that Switchvox doesn’t answer immediately.

Thanks, david55. As I said, I got that from a Switchvox tech who wasn’t too savvy on Asterisk. I’ll figure out the syntax to make it go to voicemail if they are busy or don’t answer. Interestingly, the version with the exact extension number does work every time. Again, Thank You.