Help - Area Codes for multiple servers


#1

I am setting up between a few other * servers. I want each to have its own area code example:
Server 1
777-555-1212

Server 2
722-555-0020

I know how to get them to talk across, however if you are on server 1 I just want my client to dial the 555-1212 and not hte full 777-555-1212 how would I do that?

Basically Im looking for each “extension” to answer to 777-555-1212 and 555-1212.

Thanks


#2

I’m not exactly sure what you are trying to do, so i’m going to take a guess to see if it helps.

You have two machines, 777 and 722. If a call comes in that has a phone number of length 10, the first three digits will determine which machine to route the call to. If a call comes in with a phone number of length 7, then you would have to assume that the call should be routed on the same machine it came in on. So if machine 777 gets a call to extension 555-1212, then it should automatically append 777 to the front to make a valid 10 digit phone number of 777-555-1212. If the call came in on machine 722, then it would automatically append 722 on the front of the phone number to make 722-555-1212. Please note you could append anything to the front of the 7 digit number to route you call. I.E both machines could append 777 to always route through one machine. This just depends on what you want to do.

Something in your dialplan like this may work. I have not tried this so I don’t know that it will work 100%. It should give you the idea though.

; Machine - 777
[mycontext]
exten => _NXXXXXX,1,Set(MYEXTEN=777${EXTEN})
exten => _NXXXXXX,n,Goto(${MYEXTEN})

exten => _NXXNXXXXXX,1,Set(MYEXTEN=${EXTEN})
exten => _NXXNXXXXXX,n,Dial(${MYEXTEN}, 20)

; Machine - 722
[mycontext]
exten => _NXXXXXX,1,Set(MYEXTEN=722${EXTEN})
exten => _NXXXXXX,n,Goto(${MYEXTEN})

exten => _NXXNXXXXXX,1,Set(MYEXTEN=${EXTEN})
exten => _NXXNXXXXXX,n,Dial(${MYEXTEN}, 20)

Good Luck,
Dan