Caller Domain Variable?
Is there a way to access the caller's domain? I do not see it in app info. I can use sofia_profile_name to determine the domain name. However, it would be more convenient access the domain name directly so as to have a DRY approach. Matt
Every chunk of the sip packet you can imagine gets a variable set that you should be able to access. Can you give an example of the sip packet and what your not seeing in the vars? On Sep 25, 2013, at 8:24 AM, Matt <code.name.eric@gmail.com> wrote:
Is there a way to access the caller's domain?
I do not see it in app info.
I can use sofia_profile_name to determine the domain name. However, it would be more convenient access the domain name directly so as to have a DRY approach.
Matt
I am so sorry - I am not sure how to give an example of the sip packet as I just touched Freeswitch for the first time two days ago. However, to provide more detail: I have two sip profiles named foo-192.168.20.0 and foo-192.168.21.0. In them, I force the domains to foo-20 and foo-21, respectively. When dialing the voicemail extension, the example invocation is: <action application="voicemail" data="check default ${domain_name}/> This fails because ${domain_name} expands to something else altogether. So, I am looking for a way to use the caller domain when invoking voicemail. I could use separate contexts. If I knew that I would have a consistent sip profile and domain naming system, I could do some text manipulation to construct the domain name. At the moment, I am using an if/elseif in a lua script like this: session:answer() session:sleep(1000) sofia_profile_name = session:getVariable("sofia_profile_name") if (sofia_profile_name == "foo-192.168.19.0") then caller_domain = "foo-20" elseif (sofia_profile_name == "foo-192.168.21.0") then caller_domain = "foo-21" end session:execute("voicemail", "check default " .. caller_domain) The vars reported by info do not seem to have the caller's domain (foo-20 or foo-21). Again, I may be asking the wrong questions as I have just started working with this about 60 hours ago. Matt On 9/25/13 5:31 PM, Michael Jerris wrote:
Every chunk of the sip packet you can imagine gets a variable set that you should be able to access. Can you give an example of the sip packet and what your not seeing in the vars?
On Sep 25, 2013, at 8:24 AM, Matt <code.name.eric@gmail.com> wrote:
Is there a way to access the caller's domain?
I do not see it in app info.
I can use sofia_profile_name to determine the domain name. However, it would be more convenient access the domain name directly so as to have a DRY approach.
Matt
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
you need this: http://wiki.freeswitch.org/wiki/Multi-tenant but before reading that, you need to read the FreeSWITCH book. http://www.packtpub.com/freeswitch-1-2/book then you will start answering questions on this mailing list, instead of asking :-)) ________________________________ From: Matt <code.name.eric@gmail.com> To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Sent: Thursday, September 26, 2013 4:34 AM Subject: Re: [Freeswitch-users] Caller Domain Variable? I am so sorry - I am not sure how to give an example of the sip packet as I just touched Freeswitch for the first time two days ago. However, to provide more detail: I have two sip profiles named foo-192.168.20.0 and foo-192.168.21.0. In them, I force the domains to foo-20 and foo-21, respectively. When dialing the voicemail extension, the example invocation is: <action application="voicemail" data="check default ${domain_name}/> This fails because ${domain_name} expands to something else altogether. So, I am looking for a way to use the caller domain when invoking voicemail. I could use separate contexts. If I knew that I would have a consistent sip profile and domain naming system, I could do some text manipulation to construct the domain name. At the moment, I am using an if/elseif in a lua script like this: session:answer() session:sleep(1000) sofia_profile_name = session:getVariable("sofia_profile_name") if (sofia_profile_name == "foo-192.168.19.0") then caller_domain = "foo-20" elseif (sofia_profile_name == "foo-192.168.21.0") then caller_domain = "foo-21" end session:execute("voicemail", "check default " .. caller_domain) The vars reported by info do not seem to have the caller's domain (foo-20 or foo-21). Again, I may be asking the wrong questions as I have just started working with this about 60 hours ago. Matt On 9/25/13 5:31 PM, Michael Jerris wrote:
Every chunk of the sip packet you can imagine gets a variable set that you should be able to access. Can you give an example of the sip packet and what your not seeing in the vars?
On Sep 25, 2013, at 8:24 AM, Matt <code.name.eric@gmail.com> wrote:
Is there a way to access the caller's domain?
I do not see it in app info.
I can use sofia_profile_name to determine the domain name. However, it would be more convenient access the domain name directly so as to have a DRY approach.
Matt
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
I have already perused the Multi-tenant section of the wiki. I purchased the book a couple of days ago. The FAQ (at least what I could find) didn't answer my question about accessing the value of domain name variable as it is set in the sip profile. We have multiple subnets and vlans. In particular, the hardphones are on a subnet of their own. Using the example in the Multi-tenant section of the wiki, one would have to create different voicemail numbers in order to set the domain. Obviously, that it is unwieldy and impractical. This is not an insurmountable obstacle to implementation. The bit of Lua code I am using now is viable - however, it would be convenient to be able to create a new sip profile and have things like the voicemail app automagically work with modifying downstream code. I could possibly do this by one of the following: 1. Unify the sip profile and domain name. 2. Set the initial context to the desired domain name. 3. Use a strict sip profile naming convention so that I can do some text manipulation on it to build the domain name. If there is not a better option, I am leaning toward method (2). Matt On 9/26/13 3:41 AM, Stanislav Sinyagin wrote:
you need this: http://wiki.freeswitch.org/wiki/Multi-tenant
but before reading that, you need to read the FreeSWITCH book. http://www.packtpub.com/freeswitch-1-2/book
then you will start answering questions on this mailing list, instead of asking :-))
Matt, I've re-read your posts a few times now, but I'm still struggling to understand what you are trying to achieve, and what the exact problem is that you are having (as you mentioned in your post, perhaps you are asking the wrong questions). Can you try re-wording into specific questions (i.e. how do I get X, or "what is the best way to do X"). Hopefully this will get you a better response - also welcome to FreeSWITCH! Cal On Thu, Sep 26, 2013 at 3:05 PM, Matt <code.name.eric@gmail.com> wrote:
I have already perused the Multi-tenant section of the wiki. I purchased the book a couple of days ago.
The FAQ (at least what I could find) didn't answer my question about accessing the value of domain name variable as it is set in the sip profile.
We have multiple subnets and vlans. In particular, the hardphones are on a subnet of their own. Using the example in the Multi-tenant section of the wiki, one would have to create different voicemail numbers in order to set the domain. Obviously, that it is unwieldy and impractical.
This is not an insurmountable obstacle to implementation. The bit of Lua code I am using now is viable - however, it would be convenient to be able to create a new sip profile and have things like the voicemail app automagically work with modifying downstream code.
I could possibly do this by one of the following:
1. Unify the sip profile and domain name. 2. Set the initial context to the desired domain name. 3. Use a strict sip profile naming convention so that I can do some text manipulation on it to build the domain name.
If there is not a better option, I am leaning toward method (2).
Matt
On 9/26/13 3:41 AM, Stanislav Sinyagin wrote:
you need this: http://wiki.freeswitch.org/wiki/Multi-tenant
but before reading that, you need to read the FreeSWITCH book. http://www.packtpub.com/freeswitch-1-2/book
then you will start answering questions on this mailing list, instead of asking :-))
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Given multiple domains, what is the canonical way to invoke the voicemail application so that the correct domain is in argument #3? Matt On 9/26/13 9:31 AM, Cal Leeming [Simplicity Media Ltd] wrote:
Matt,
I've re-read your posts a few times now, but I'm still struggling to understand what you are trying to achieve, and what the exact problem is that you are having (as you mentioned in your post, perhaps you are asking the wrong questions).
Can you try re-wording into specific questions (i.e. how do I get X, or "what is the best way to do X").
Hopefully this will get you a better response - also welcome to FreeSWITCH!
Cal
It sounds like your approach to multi tenancy has not been correctly implemented.
From what I can tell, you are forcing the domain on the two profiles, perhaps review these docs and ensure this has been done correctly; http://wiki.freeswitch.org/wiki/Multiple_Companies#Enabling_Multiple_Domains
If ${domain}/${domain_name} do not contain the correct values at the correct point in time, then something isn't right with your multi tenancy config. I know this has already been said but, you really need to have a read over the multi-tenancy docs and compare what's different in your config, it could just be a one minute fix, or it could take you a few days to figure out. That's all part of the fun :) Cal On Thu, Sep 26, 2013 at 3:40 PM, Matt <code.name.eric@gmail.com> wrote:
Given multiple domains, what is the canonical way to invoke the voicemail application so that the correct domain is in argument #3?
Matt
On 9/26/13 9:31 AM, Cal Leeming [Simplicity Media Ltd] wrote:
Matt,
I've re-read your posts a few times now, but I'm still struggling to understand what you are trying to achieve, and what the exact problem is that you are having (as you mentioned in your post, perhaps you are asking the wrong questions).
Can you try re-wording into specific questions (i.e. how do I get X, or "what is the best way to do X").
Hopefully this will get you a better response - also welcome to FreeSWITCH!
Cal
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Oh, I have reviewed the Multiple Companies and Multi-tenant docs several times - and will do so again. If I do not force the domains in the sip profile to the desired domains, ${domain_name} equates to 192.168.20.3 (the address of the interface in the server). This obviously causes an issue when a phone is on a different subnet and voicemail is getting passed 1010@192.168.20.3 instead of 1010@192.168.21.3 (or 1010@foo-21). This is likely unrelated: The production machines have multiple network interfaces. However, for testing I am using a virtual machine with an actual address of 192.168.20.3 and an alias of 192.168.21.3. It is an assumption on my part that interface aliases are not an issue. I will probably take a break from this particular issue today so as to get FreeTDM up and running on a future production machine with a Digium card. Matt On 9/26/13 10:12 AM, Cal Leeming [Simplicity Media Ltd] wrote:
It sounds like your approach to multi tenancy has not been correctly implemented.
From what I can tell, you are forcing the domain on the two profiles, perhaps review these docs and ensure this has been done correctly; http://wiki.freeswitch.org/wiki/Multiple_Companies#Enabling_Multiple_Domains
If ${domain}/${domain_name} do not contain the correct values at the correct point in time, then something isn't right with your multi tenancy config.
I know this has already been said but, you really need to have a read over the multi-tenancy docs and compare what's different in your config, it could just be a one minute fix, or it could take you a few days to figure out. That's all part of the fun :)
Cal
The thing that concerns me is that you are forcing the domain in the profile, but then that domain is not appearing in $domain or $domain_name, which indicates you are not setting it properly. Unless I have misunderstood? Let us know how you get on! Cal On Thu, Sep 26, 2013 at 4:49 PM, Matt <code.name.eric@gmail.com> wrote:
Oh, I have reviewed the Multiple Companies and Multi-tenant docs several times - and will do so again.
If I do not force the domains in the sip profile to the desired domains, ${domain_name} equates to 192.168.20.3 (the address of the interface in the server).
This obviously causes an issue when a phone is on a different subnet and voicemail is getting passed 1010@192.168.20.3 instead of 1010@192.168.21.3 (or 1010@foo-21).
This is likely unrelated: The production machines have multiple network interfaces. However, for testing I am using a virtual machine with an actual address of 192.168.20.3 and an alias of 192.168.21.3. It is an assumption on my part that interface aliases are not an issue.
I will probably take a break from this particular issue today so as to get FreeTDM up and running on a future production machine with a Digium card.
Matt
On 9/26/13 10:12 AM, Cal Leeming [Simplicity Media Ltd] wrote:
It sounds like your approach to multi tenancy has not been correctly implemented.
From what I can tell, you are forcing the domain on the two profiles, perhaps review these docs and ensure this has been done correctly;
http://wiki.freeswitch.org/wiki/Multiple_Companies#Enabling_Multiple_Domains
If ${domain}/${domain_name} do not contain the correct values at the correct point in time, then something isn't right with your multi tenancy config.
I know this has already been said but, you really need to have a read over the multi-tenancy docs and compare what's different in your config, it could just be a one minute fix, or it could take you a few days to figure out. That's all part of the fun :)
Cal
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
You are correct. I am using: <param name="force-subscription-domain" value="foo-21"/> <param name="force-register-domain" value="foo-21"/> <param name="force-register-db-domain" value="foo-21"/> I should have noted in my previous email that, even with forcing those params, $domain_name still evals to address of the physical interface of the machine - 192.168.20.3. I am likely missing something obvious. My workaround is functional, but I would prefer to do things right. Matt On 9/26/13 11:05 AM, Cal Leeming [Simplicity Media Ltd] wrote:
The thing that concerns me is that you are forcing the domain in the profile, but then that domain is not appearing in $domain or $domain_name, which indicates you are not setting it properly. Unless I have misunderstood?
Let us know how you get on!
Cal
On Thu, Sep 26, 2013 at 4:49 PM, Matt <code.name.eric@gmail.com <mailto:code.name.eric@gmail.com>> wrote:
Oh, I have reviewed the Multiple Companies and Multi-tenant docs several times - and will do so again.
If I do not force the domains in the sip profile to the desired domains, ${domain_name} equates to 192.168.20.3 (the address of the interface in the server).
This obviously causes an issue when a phone is on a different subnet and voicemail is getting passed 1010@192.168.20.3 <mailto:1010@192.168.20.3> instead of 1010@192.168.21.3 <mailto:1010@192.168.21.3> (or 1010@foo-21).
This is likely unrelated: The production machines have multiple network interfaces. However, for testing I am using a virtual machine with an actual address of 192.168.20.3 and an alias of 192.168.21.3. It is an assumption on my part that interface aliases are not an issue.
I will probably take a break from this particular issue today so as to get FreeTDM up and running on a future production machine with a Digium card.
Matt
On 9/26/13 10:12 AM, Cal Leeming [Simplicity Media Ltd] wrote: > It sounds like your approach to multi tenancy has not been correctly > implemented. > > From what I can tell, you are forcing the domain on the two profiles, > perhaps review these docs and ensure this has been done correctly; > http://wiki.freeswitch.org/wiki/Multiple_Companies#Enabling_Multiple_Domains > > If ${domain}/${domain_name} do not contain the correct values at the > correct point in time, then something isn't right with your multi > tenancy config. > > I know this has already been said but, you really need to have a read > over the multi-tenancy docs and compare what's different in your > config, it could just be a one minute fix, or it could take you a few > days to figure out. That's all part of the fun :) > > Cal > >
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
In default configuration, in vars.xml, there's <X-PRE-PROCESS cmd="set" data="domain=$${local_ip_v4}"/> <X-PRE-PROCESS cmd="set" data="domain_name=$${domain}"/> I guess that's what causes what you see. 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. ________________________________ From: Matt <code.name.eric@gmail.com> To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Sent: Thursday, September 26, 2013 6:43 PM Subject: Re: [Freeswitch-users] Caller Domain Variable? You are correct. I am using: <param name="force-subscription-domain" value="foo-21"/> <param name="force-register-domain" value="foo-21"/> <param name="force-register-db-domain" value="foo-21"/> I should have noted in my previous email that, even with forcing those params, $domain_name still evals to address of the physical interface of the machine - 192.168.20.3. I am likely missing something obvious. My workaround is functional, but I would prefer to do things right. Matt On 9/26/13 11:05 AM, Cal Leeming [Simplicity Media Ltd] wrote:
The thing that concerns me is that you are forcing the domain in the profile, but then that domain is not appearing in $domain or $domain_name, which indicates you are not setting it properly. Unless I have misunderstood?
Let us know how you get on!
Cal
On Thu, Sep 26, 2013 at 4:49 PM, Matt <code.name.eric@gmail.com <mailto:code.name.eric@gmail.com>> wrote:
Oh, I have reviewed the Multiple Companies and Multi-tenant docs several times - and will do so again.
If I do not force the domains in the sip profile to the desired domains, ${domain_name} equates to 192.168.20.3 (the address of the interface in the server).
This obviously causes an issue when a phone is on a different subnet and voicemail is getting passed 1010@192.168.20.3 <mailto:1010@192.168.20.3> instead of 1010@192.168.21.3 <mailto:1010@192.168.21.3> (or 1010@foo-21).
This is likely unrelated: The production machines have multiple network interfaces. However, for testing I am using a virtual machine with an actual address of 192.168.20.3 and an alias of 192.168.21.3. It is an assumption on my part that interface aliases are not an issue.
I will probably take a break from this particular issue today so as to get FreeTDM up and running on a future production machine with a Digium card.
Matt
On 9/26/13 10:12 AM, Cal Leeming [Simplicity Media Ltd] wrote: > It sounds like your approach to multi tenancy has not been correctly > implemented. > > From what I can tell, you are forcing the domain on the two profiles, > perhaps review these docs and ensure this has been done correctly; > http://wiki.freeswitch.org/wiki/Multiple_Companies#Enabling_Multiple_Domains > > If ${domain}/${domain_name} do not contain the correct values at the > correct point in time, then something isn't right with your multi > tenancy config. > > I know this has already been said but, you really need to have a read > over the multi-tenancy docs and compare what's different in your > config, it could just be a one minute fix, or it could take you a few > days to figure out. That's all part of the fun :) > > Cal > >
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Matt, Can you confirm if the fix posted by Stanislav was able to resolve your problem? It would be good to get a concrete answer on this so this thread can help others in future. Thanks Cal On Fri, Sep 27, 2013 at 2:04 AM, Stanislav Sinyagin <ssinyagin@yahoo.com>wrote:
In default configuration, in vars.xml, there's
<X-PRE-PROCESS cmd="set" data="domain=$${local_ip_v4}"/> <X-PRE-PROCESS cmd="set" data="domain_name=$${domain}"/>
I guess that's what causes what you see.
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.
------------------------------ *From:* Matt <code.name.eric@gmail.com> *To:* FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> *Sent:* Thursday, September 26, 2013 6:43 PM
*Subject:* Re: [Freeswitch-users] Caller Domain Variable?
You are correct. I am using:
<param name="force-subscription-domain" value="foo-21"/> <param name="force-register-domain" value="foo-21"/> <param name="force-register-db-domain" value="foo-21"/>
I should have noted in my previous email that, even with forcing those params, $domain_name still evals to address of the physical interface of the machine - 192.168.20.3.
I am likely missing something obvious. My workaround is functional, but I would prefer to do things right.
Matt
On 9/26/13 11:05 AM, Cal Leeming [Simplicity Media Ltd] wrote:
The thing that concerns me is that you are forcing the domain in the profile, but then that domain is not appearing in $domain or $domain_name, which indicates you are not setting it properly. Unless I have misunderstood?
Let us know how you get on!
Cal
On Thu, Sep 26, 2013 at 4:49 PM, Matt <code.name.eric@gmail.com <mailto:code.name.eric@gmail.com>> wrote:
Oh, I have reviewed the Multiple Companies and Multi-tenant docs several times - and will do so again.
If I do not force the domains in the sip profile to the desired domains, ${domain_name} equates to 192.168.20.3 (the address of the interface in the server).
This obviously causes an issue when a phone is on a different subnet and voicemail is getting passed 1010@192.168.20.3 <mailto:1010@192.168.20.3> instead of 1010@192.168.21.3 <mailto:1010@192.168.21.3> (or 1010@foo-21).
This is likely unrelated: The production machines have multiple network interfaces. However, for testing I am using a virtual machine with an actual address of 192.168.20.3 and an alias of 192.168.21.3. It is an assumption on my part that interface aliases are not an issue.
I will probably take a break from this particular issue today so as to get FreeTDM up and running on a future production machine with a Digium card.
Matt
On 9/26/13 10:12 AM, Cal Leeming [Simplicity Media Ltd] wrote:
It sounds like your approach to multi tenancy has not been correctly implemented.
From what I can tell, you are forcing the domain on the two profiles, perhaps review these docs and ensure this has been done correctly;
http://wiki.freeswitch.org/wiki/Multiple_Companies#Enabling_Multiple_Domains
If ${domain}/${domain_name} do not contain the correct values at the correct point in time, then something isn't right with your multi tenancy config.
I know this has already been said but, you really need to have a
read
over the multi-tenancy docs and compare what's different in your config, it could just be a one minute fix, or it could take you a few days to figure out. That's all part of the fun :)
Cal
_________________________________________________________________________
Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (4)
-
Cal Leeming [Simplicity Media Ltd]
-
Matt
-
Michael Jerris
-
Stanislav Sinyagin