make users on server B to make outbound call through pstn beehind the server A
Hi all
I have two trixbox servers link with iax2
from server A i can call extension on server B
from server B i can call extension on server A
On server A i have a pstn line connect so the users server A can make outbound call no problem.
My problem is now how can i setup my trixbox to make users on server B to make outbound call through pstn beehind the server A
any help will be appreciate

We do this a lot on PRI's.
We do this a lot on PRI's. I will try to explain it as best as possible. You will have to insert some custom dial plans. If I make the instruction seem like I am talking to an idiot don't take it personally. I just want to make sure that any user of any level can follow these instruction as it took me a while the first time to figure this out when I was a new user and I know how hard it is to follow directions if you are a new user.
Anything I type in " " make sure you remove the " " when pasting it on your system.
INBOUND ROUTE SETUP ON LOCAL PSTN Server
1. Log into FreePBX and go to the inbound route.
2. You will need to create a inbound route on the server that has the PSTN line that you want to send to a different server.
3. Under the destination for the inbound route you need to go to the custom application tab. For this example we will use "custom-1234567,s,1" with 1234567 being the phone number of the line you want to forward to the other server.
TRUNK SETUP BETWEEN BOXES
1. Setup a IAX or SIP trunk between box 1 and 2. If you need instruction how to do this let me know otherwise there are plenty of post that explain this quite well. Make sure you include the context of "context=from-pstn" in the trunk setup.
CONFIG FILE EDIT ON LOCAL PSTN SERVER
1. Now open up a command line and type in "nano /etc/asterisk/extensions_custom.conf" and press enter
2. Type in the following as 2 separate lines in the above config file.
"[custom-1234567]"
"exten => s,1,Dial(IAX2/trunkname/1234567,30,r);"
Trunkname is the name that you entered in FreePBX for the trunk between the 2 sites and 1234567 represents the phone number that you entered above that you wish to pass to the remote server,
3. Now exit out of nano by pressing the control button and the X key at the same time.
4. Press y key and the enter key to save changes and than press the enter key to save the file name.
FREEPBX SETUP ON NON PSTN SERVER or remote side
1. Setup a inbound route on the remote server with a DID of "1234567" with 1234567 being the phone number that you entered above and point it to what ever destination you want.
In closing what this allows you to do is route a analog line or DID on a PRI to a remote server as if it were a incoming PSTN line.
Let me know how it works and if anybody has correction or comments please feel free to post them.