<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt">In default configuration, in vars.xml, there's<br><br>&nbsp; &lt;X-PRE-PROCESS cmd="set" data="domain=$${local_ip_v4}"/&gt;<br>&nbsp; &lt;X-PRE-PROCESS cmd="set" data="domain_name=$${domain}"/&gt;<br><br>I guess that's what causes what you see.<br><br>As far as I understand, you don't really need multi-tenancy, you just need FreeSWITCH to work properly with multiple host IP addresses. In this case, you can create a normal domain name in your local DNS service, like pbx01.company.com, and create the corresponding SRV record. Then you change the global domain setting in vars.xml, and that's it -- all your clients would belong to the same SIP domain name.<br><br><br><br><br><div><span><br></span></div><div><br></div>  <div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"> <div style="font-family: times new roman, new york,
 times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1">  <font face="Arial" size="2"> <b><span style="font-weight:bold;">From:</span></b> Matt &lt;code.name.eric@gmail.com&gt;<br> <b><span style="font-weight: bold;">To:</span></b> FreeSWITCH Users Help &lt;freeswitch-users@lists.freeswitch.org&gt; <br> <b><span style="font-weight: bold;">Sent:</span></b> Thursday, September 26, 2013 6:43 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Freeswitch-users] Caller Domain Variable?<br> </font> </div> <div class="y_msg_container"><br>You are correct. I am using:<br><br>&nbsp; &nbsp; &lt;param name="force-subscription-domain" value="foo-21"/&gt;<br>&nbsp; &nbsp; &lt;param name="force-register-domain" value="foo-21"/&gt;<br>&nbsp; &nbsp; &lt;param name="force-register-db-domain" value="foo-21"/&gt;<br><br>I should have noted in my previous email that, even with forcing those<br>params, $domain_name still evals to address of the
 physical interface of<br>the machine - 192.168.20.3.<br><br>I am likely missing something obvious. My workaround is functional, but<br>I would prefer to do things right.<br><br>Matt<br><br><br> <br><br>On 9/26/13 11:05 AM, Cal Leeming [Simplicity Media Ltd] wrote:<br>&gt; The thing that concerns me is that you are forcing the domain in the<br>&gt; profile, but then that domain is not appearing in $domain or<br>&gt; $domain_name, which indicates you are not setting it properly. Unless<br>&gt; I have misunderstood?<br>&gt;<br>&gt; Let us know how you get on!<br>&gt;<br>&gt; Cal<br>&gt;<br>&gt;<br>&gt; On Thu, Sep 26, 2013 at 4:49 PM, Matt &lt;<a ymailto="mailto:code.name.eric@gmail.com" href="mailto:code.name.eric@gmail.com">code.name.eric@gmail.com</a><br>&gt; &lt;mailto:<a ymailto="mailto:code.name.eric@gmail.com" href="mailto:code.name.eric@gmail.com">code.name.eric@gmail.com</a>&gt;&gt; wrote:<br>&gt;<br>&gt;&nbsp; &nbsp;  Oh, I have reviewed the
 Multiple Companies and Multi-tenant docs<br>&gt;&nbsp; &nbsp;  several<br>&gt;&nbsp; &nbsp;  times - and will do so again.<br>&gt;<br>&gt;&nbsp; &nbsp;  If I do not force the domains in the sip profile to the desired<br>&gt;&nbsp; &nbsp;  domains,<br>&gt;&nbsp; &nbsp;  ${domain_name} equates to 192.168.20.3 (the address of the<br>&gt;&nbsp; &nbsp;  interface in<br>&gt;&nbsp; &nbsp;  the server).<br>&gt;<br>&gt;&nbsp; &nbsp;  This obviously causes an issue when a phone is on a different<br>&gt;&nbsp; &nbsp;  subnet and<br>&gt;&nbsp; &nbsp;  voicemail is getting passed <a ymailto="mailto:1010@192.168.20.3" href="mailto:1010@192.168.20.3">1010@192.168.20.3</a><br>&gt;&nbsp; &nbsp;  &lt;mailto:<a ymailto="mailto:1010@192.168.20.3" href="mailto:1010@192.168.20.3">1010@192.168.20.3</a>&gt; instead of<br>&gt;&nbsp; &nbsp;  <a ymailto="mailto:1010@192.168.21.3" href="mailto:1010@192.168.21.3">1010@192.168.21.3</a> &lt;mailto:<a
 ymailto="mailto:1010@192.168.21.3" href="mailto:1010@192.168.21.3">1010@192.168.21.3</a>&gt; (or <a ymailto="mailto:1010@foo-21" href="mailto:1010@foo-21">1010@foo-21</a>).<br>&gt;<br>&gt;&nbsp; &nbsp;  This is likely unrelated: The production machines have multiple<br>&gt;&nbsp; &nbsp;  network<br>&gt;&nbsp; &nbsp;  interfaces. However, for testing I am using a virtual machine with an<br>&gt;&nbsp; &nbsp;  actual address of 192.168.20.3 and an alias of 192.168.21.3. It is an<br>&gt;&nbsp; &nbsp;  assumption on my part that interface aliases are not an issue.<br>&gt;<br>&gt;&nbsp; &nbsp;  I will probably take a break from this particular issue today so as to<br>&gt;&nbsp; &nbsp;  get FreeTDM up and running on a future production machine with a<br>&gt;&nbsp; &nbsp;  Digium<br>&gt;&nbsp; &nbsp;  card.<br>&gt;<br>&gt;<br>&gt;&nbsp; &nbsp;  Matt<br>&gt;<br>&gt;&nbsp; &nbsp;  On 9/26/13 10:12 AM, Cal Leeming [Simplicity Media Ltd] wrote:<br>&gt;&nbsp; &nbsp;
  &gt; It sounds like your approach to multi tenancy has not been correctly<br>&gt;&nbsp; &nbsp;  &gt; implemented.<br>&gt;&nbsp; &nbsp;  &gt;<br>&gt;&nbsp; &nbsp;  &gt; From what I can tell, you are forcing the domain on the two<br>&gt;&nbsp; &nbsp;  profiles,<br>&gt;&nbsp; &nbsp;  &gt; perhaps review these docs and ensure this has been done correctly;<br>&gt;&nbsp; &nbsp;  &gt;<br>&gt;&nbsp; &nbsp;  <a href="http://wiki.freeswitch.org/wiki/Multiple_Companies#Enabling_Multiple_Domains" target="_blank">http://wiki.freeswitch.org/wiki/Multiple_Companies#Enabling_Multiple_Domains</a><br>&gt;&nbsp; &nbsp;  &gt;<br>&gt;&nbsp; &nbsp;  &gt; If ${domain}/${domain_name} do not contain the correct values at the<br>&gt;&nbsp; &nbsp;  &gt; correct point in time, then something isn't right with your multi<br>&gt;&nbsp; &nbsp;  &gt; tenancy config.<br>&gt;&nbsp; &nbsp;  &gt;<br>&gt;&nbsp; &nbsp;  &gt; I know this has already been said but, you really need to have
 a<br>&gt;&nbsp; &nbsp;  read<br>&gt;&nbsp; &nbsp;  &gt; over the multi-tenancy docs and compare what's different in your<br>&gt;&nbsp; &nbsp;  &gt; config, it could just be a one minute fix, or it could take you<br>&gt;&nbsp; &nbsp;  a few<br>&gt;&nbsp; &nbsp;  &gt; days to figure out. That's all part of the fun :)<br>&gt;&nbsp; &nbsp;  &gt;<br>&gt;&nbsp; &nbsp;  &gt; Cal<br>&gt;&nbsp; &nbsp;  &gt;<br>&gt;&nbsp; &nbsp;  &gt;<br>&gt;<br>&gt;<br>&gt;&nbsp; &nbsp;  _________________________________________________________________________<br>&gt;&nbsp; &nbsp;  Professional FreeSWITCH Consulting Services:<br>&gt;&nbsp; &nbsp;  <a ymailto="mailto:consulting@freeswitch.org" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a> &lt;mailto:<a ymailto="mailto:consulting@freeswitch.org" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>&gt;<br>&gt;&nbsp; &nbsp;  <a href="http://www.freeswitchsolutions.com/"
 target="_blank">http://www.freeswitchsolutions.com</a><br>&gt;<br>&gt;&nbsp; &nbsp;  FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>&gt;&nbsp; &nbsp;  <a href="http://www.cudatel.com/" target="_blank">http://www.cudatel.com</a><br>&gt;<br>&gt;&nbsp; &nbsp;  Official FreeSWITCH Sites<br>&gt;&nbsp; &nbsp;  <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br>&gt;&nbsp; &nbsp;  <a href="http://wiki.freeswitch.org/" target="_blank">http://wiki.freeswitch.org</a><br>&gt;&nbsp; &nbsp;  <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com</a><br>&gt;<br>&gt;&nbsp; &nbsp;  FreeSWITCH-users mailing list<br>&gt;&nbsp; &nbsp;  <a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>&gt;&nbsp; &nbsp;  &lt;mailto:<a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org"
 href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>&gt;<br>&gt;&nbsp; &nbsp;  <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>&gt;&nbsp; &nbsp;  UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>&gt;&nbsp; &nbsp;  <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; _________________________________________________________________________<br>&gt; Professional FreeSWITCH Consulting Services:<br>&gt; <a ymailto="mailto:consulting@freeswitch.org" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>&gt; <a href="http://www.freeswitchsolutions.com/"
 target="_blank">http://www.freeswitchsolutions.com</a><br>&gt;<br>&gt; FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>&gt; <a href="http://www.cudatel.com/" target="_blank">http://www.cudatel.com</a><br>&gt;<br>&gt; Official FreeSWITCH Sites<br>&gt; <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br>&gt; <a href="http://wiki.freeswitch.org/" target="_blank">http://wiki.freeswitch.org</a><br>&gt; <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com</a><br>&gt;<br>&gt; FreeSWITCH-users mailing list<br>&gt; <a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>&gt; UNSUBSCRIBE:<a
 href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>&gt; <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br><br><br>_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services:<br><a ymailto="mailto:consulting@freeswitch.org" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br><a href="http://www.freeswitchsolutions.com/" target="_blank">http://www.freeswitchsolutions.com</a><br><br>FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br><a href="http://www.cudatel.com/" target="_blank">http://www.cudatel.com</a><br><br>Official FreeSWITCH Sites<br><a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br><a href="http://wiki.freeswitch.org/" target="_blank">http://wiki.freeswitch.org</a><br><a
 href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com</a><br><br>FreeSWITCH-users mailing list<br><a ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br><a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br><br><br></div> </div> </div>  </div></body></html>