Extensions , how to matrix it


i am trying to mix\load balance my extensions on my 5 sip-accounts

heere is my scenario:
i have city code:

9991 & 9993 are teh most used heavy traffic , i checked the CDR for the past 10 dasy ,and noticed that :
99914 & 9992 & 99938 are the most utilized on the overall calls( 80% of the total calls)

I tried to put them alone in my extenions but its failing to take teh new number,:
exten => _99914.,1,Set(CALLERID(num)=MYNUMBER-1)
exten => _99914,n,Dial(SIP/context_outgoing/${EXTEN:3},30,t)
exten => _99914,n,Hangup()

exten => _9991.,1,Set(CALLERID(num)=MYNUMBER-2
exten => _9991,n,Dial(SIP/context_outgoing/${EXTEN:3},30,t)
exten => _9991,n,Hangup()

if i dial 99914 from my extension its using “Number-2” and not "number-1"
calls are working fine ,but i am now using a long extensions file where i have put all the possible number 99910-99911-99912…99919 .and so on

can anyone let me know how to configure ,in a proper way, :
the 9991X >> >> to go to 1 number
the 99912 >> to go to a different number

thanks in advanced

It’s not entirely clear what you want, but I think you are missing the "."s from the end of the patterns.

that was a copy\paste mistake in this topic

actually ,as you know each city has a code like 01 ; 02 ; 07 …
some of these cities have a huge number of calls than the other one , for example 01 is our capital city-code
and 015XXXXXX is the most utilized ,in htat city

i would like to configure my dialplans in a way ,that :

  1. any call going to 015XXXXXX , will be connected using trunk #1
  2. any calls going to 01XXXXXX, will go to trunk #2

when i tried this , both calls are going to the TRUNK#2 .

i hope its clear now, any ideas ,on what i am missing ?

Check the variable ${EXTEN} and with an gotoif you can use the Dial with the right trunk

I will try that .