[Asterisk-Users] Incoming/Outgoing call question

Kevin Smith kevin.smith at mercury.net
Thu Feb 23 15:53:10 MST 2006


Hey everyone,

I have a more of an opinion question then a technical question. The 
asterisk server I am setting up is going to host 3 different businesses. 
Each business is in the same building, and on the same network. My 
question is regarding calls coming in and going out. We are a small ISP 
and have a lot of numbers that are forwarded to our phone system. The 
other companies have about 3 to 5 numbers going into their offices. My 
question is if there is a good way to test for which number and where to 
send it to.

Right now my though process was something like this (keep in mind I 
haven't wrote it):

[default]
include => Our-Numbers
include => Business1
include => Business2

[Out-Numbers]
exten => s,1,gotoif,$[${EXTEN}=Number1 | 
${EXTEN}=Number2......${EXTEN}=NumberN]?Match:1|:

Is that the best way to test for the number that is being dialed? Or can 
you recommend a better way. If anyone has done something similar could 
you share how you did this type of a setup? I know I could manually put 
in each one, but I think there probably is a better way. If I have to go 
that route, then I probably will write a script to generate the file.

Thanks,
Kevin




More information about the asterisk-users mailing list