From FreeSWITCH Wiki
hey nice page. when you point a phone at company-a.com. where does it register? it comes up as an alias to internal when issuing a sofia status command. my question is how to you register different devices with different user directories ( 1001 to -> company-a, 1001 to -> company-b 1001 to -> default) so they don't overlap? how do users register to their parent directories.
Hi, I followed the guidelines and so far so good. Now I would like to select a trunk per domain and assume that the outbound_gateway variable should be used for this. I created several sip trunks in /sip_profiles/external but when addressed it will just take the first one configured there. Maybe I need to test against a condition but here frankly I am stuck. The outbound gateway part is lacking in this information and frankly I just saw the the first line in the wiki page explaining that this document is not finished yet. The correct question here should be that if this wiki page ever is going to be completed or hint me to a solution to be able to address a gateway per domain.
In your outbound dialplan, you need to specify the gateway - if the extension is in the domain "foo". and the gate way is defined in the "foo" domain, it should use that gateway