DialPlan help requested

Hello all; i’m a long-time user of asterisk. I thought i started using it in 2004 but apparently i didnt since i see the release date was 2005! either way, long time user. saw a presentation at a Phreaknic in nashville and did even more with it. Now im using it to allow friends to dial families via wifi from afghanistan and other countries. Its great; however i have a problem with a dialplan since i recently made some changes.

exten => s,1,Set(CALLERID(ALL)="redacted: <123-456-7890)
same => n,Dial(SIP/${MACRO_EXTEN}@sipbroker.com,20)
same => n,Goto(s-${DIALSTATUS},1)
exten => s-NOANSWER,1,Hangup
exten => s-CONGESTION,1,Congestion
exten => s-CANCEL,1,Hangup
exten => s-BUSY,1,Busy
exten => s-CHANUNAVAIL,1,Dial(Motif/motif-7890/${MACRO_EXTEN}@voice.google.com,r)
same => n,Hangup

exten => _*X.,1,Macro(sipbroker)
exten => _X.,1,Macro(sipbroker)

exten => _+1NXXNXXXXXX,1,Dial(Motif/motif-7890/${EXTEN}@voice.google.com,r)
exten => _1NXXNXXXXXX,1,Dial(Motif/motif-7890/${EXTEN}@voice.google.com,r)
exten => _NXXNXXXXXX,1,Dial(Motif/motif-7890/${EXTEN}@voice.google.com,r)

exten => _+1NXXNXXXXXX,1,Dial(Motif/motif-3456/${EXTEN}@voice.google.com,r)
exten => _1NXXNXXXXXX,1,Dial(Motif/motif-3456/${EXTEN}@voice.google.com,r)
exten => _NXXNXXXXXX,1,Dial(Motif/motif-3456/${EXTEN}@voice.google.com,r)[/code]

basically, as you can see when a person dials any number; it hits the sipbroker-out and if chanunavail it hard dials through 7890. the sipbroker numbers vary so much it’s hard to limit the numbers it accepts. so the context of a phone allows them to dial sipbroker-out or 3456-out; but it always defaults to sipbroker-out and then uses 7890-out. how can i get it to fallback to the appropriate -out? or is there something else i should do to make this more efficient?

I would prefer to avoid introducing predot numbers; im relatively certain this can be macroed somehow or i can ditch the macro and hard code it into every XXXX-out context… i just think theres a more clever way