Local call routing 80 prefixes

I have about 80 prefixes for local call routing I would like to send out a zap channel when available. My current scheme uses a match-variable in the dial plan to send to zap or a another provider.

It’s an LCR problem, but only these 80 3-digit (of 7 dialed) prefixes make any difference. Everything that doesn’t match, including all 10-digit and/or when zap is busy, goes out to a different provider.

I’ve just stuffed a couple of variables with those numbers manually in the dial plan. My thinking it isn’t worth the larger LCR schemes routines.

If anyone has a suggestion on a different approach, I’d be interested.

Thanks, Andy

an example to jump to exten => _NXXXXXX,4 on a match else 5:

DOLE=791|393|814|917|628|
exten => _NXXXXXX,3,GoToIf($[$["${EXTEN:0:3}" = "${DOLE:0:3}"] | $["${EXTEN:0:3}" = "${DOLE:4:3}"] | $["${EXTEN:0:3}" = "${DOLE:8:3}"] | $["${EXTEN:0:3}" = "${DOLE:12:3}"] | $["${EXTEN:0:3}" = "${DOLE:16:3}"]]?4:5)
exten => _NXXXXXX,4,Dial(${ZAPTRUNK}/${EXTEN})
exten => _NXXXXXX,5,Dial(${TRUNK2}/1508${EXTEN})

repeat as necessary - it’s ugly and probably not intended - eh?