An Inter-Machine Trunk sends calls from one FreeSWITCH™ box to another. All calls get routed through the public context on the destination server. Each server allows the other access via the Access Control List (ACL).
Let us assume you have BoxA (10.0.0.1) with extensions 1000-1019 and BoxB (10.2.2.2) has extensions 1100-1119.
First we need to make sure that the boxes have access to talk to each other. This is done in the ACL (access control list) section (autoload_configs/acl.conf.xml).
On BoxA add the following in the node <list name="domains" ...>
<node type="allow" cidr="10.2.2.2/32"/>
On BoxB add the following in the node <list name="domains" ...>
<node type="allow" cidr="10.0.0.1/32"/>
Now that the boxes are allowed to talk to each other, they still don't know about the extensions each FreeSWITCH is serving nor how to reach the other FS box. Therefore you need to tell FreeSWITCH where to send which calls. This is called "routing" and is performed by the dialplan using the bridge application. This example uses the internal sofia profile (sip_profiles/internal.xml). Despite the name internal, it will handle calls destined for another switch just fine.
On BoxA add the following lines to the dialplan (dialplan/default.xml)
On BoxB add the following lines to the dialplan (dialplan/default.xml)
Now calls are sent (routed) from the originating switch to the destination switch and thanks to the ACL, it is allowed. However the destination switch does not know what to do with the call as for him it is a public call. Therefore an inbound dialplan entry is needed to make it work. We tell FreeSWITCH to route it through the normal default dialplan.
On BoxA add the following lines in the public dialplan (dialplan/public.xml)
On BoxB add the following lines in the public dialplan (dialplan/public.xml)
On both machines, run the following commands:
You should now be able to call 11xx extensions of BoxB correctly from extensions on BoxA and vice-versa.