Hi, I have two identical hosts running Kamailio with the same set of users. They are located in different locations. Both are running behind NAT and I've enabled rtpproxy for that and also advertised the public IP. Both the MySQL DBs are similar and have the same data.
Both the hosts have different sub-domains in alias and I have set auto_alias=no
Now, the problem is my users are not able to communicate from one server to another.
user1@mydomain.com from host1 is not able to communicate to user1@mydomain.com at host2, though inter-server communication is happening nicely.
Any idea how to solve this? Thanks.
regards Ganesh Kumar
On Sunday, September 11, 2016, Infinicalls Infinicalls < infinicalls@gmail.com> wrote:
Hi, I have two identical hosts running Kamailio with the same set of users. They are located in different locations. Both are running behind NAT and I've enabled rtpproxy for that and also advertised the public IP. Both the MySQL DBs are similar and have the same data.
Both the hosts have different sub-domains in alias and I have set auto_alias=no
Now, the problem is my users are not able to communicate from one server to another.
user1@mydomain.com javascript:; from host1 is not able to communicate to user1@mydomain.com javascript:; at host2, though inter-server communication is happening nicely.
Any idea how to solve this? Thanks.
regards Ganesh Kumar
--
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org javascript:; http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Do a lookup of source ip(s) user is registered to and route appropriately and or share user location database / replicate. Either way however you want original source responding to proper AOR, so just do a little conditional checking and re route appropriately between the two.
On Sunday, September 11, 2016, Infinicalls Infinicalls < infinicalls@gmail.com> wrote:
Hi, I have two identical hosts running Kamailio with the same set of users. They are located in different locations. Both are running behind NAT and I've enabled rtpproxy for that and also advertised the public IP. Both the MySQL DBs are similar and have the same data.
Both the hosts have different sub-domains in alias and I have set auto_alias=no
Now, the problem is my users are not able to communicate from one server to another.
user1@mydomain.com javascript:; from host1 is not able to communicate to user1@mydomain.com javascript:; at host2, though inter-server communication is happening nicely.
Any idea how to solve this? Thanks.
regards Ganesh Kumar
--
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org javascript:; http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hi, I am sorry, I am not sure how to implement Brandon's method. Isn't there any simpler solution to achieve this? Could someone elaborate me more on this or point me to relevant links?
My problem is simple. I have 2 hosts (host1.mydomain.com and host2.mydomain.com located in different places) and user1 and user2 are registered in both the servers.(local DBs having identical records).
Now, I want user1@host1.mydomain.com to talk to user2@host2.mydomain.com without issues.
Any help would be gladly appreciated. Thanks.
regards Ganesh Kumar
On 9/11/16, Brandon Armstead brandon@cryy.com wrote:
Do a lookup of source ip(s) user is registered to and route appropriately and or share user location database / replicate. Either way however you want original source responding to proper AOR, so just do a little conditional checking and re route appropriately between the two.
On Sunday, September 11, 2016, Infinicalls Infinicalls < infinicalls@gmail.com> wrote:
Hi, I have two identical hosts running Kamailio with the same set of users. They are located in different locations. Both are running behind NAT and I've enabled rtpproxy for that and also advertised the public IP. Both the MySQL DBs are similar and have the same data.
Both the hosts have different sub-domains in alias and I have set auto_alias=no
Now, the problem is my users are not able to communicate from one server to another.
user1@mydomain.com javascript:; from host1 is not able to communicate to user1@mydomain.com javascript:; at host2, though inter-server communication is happening nicely.
Any idea how to solve this? Thanks.
regards Ganesh Kumar
--
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org javascript:; http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Sent from Gmail Mobile
On Mon, Sep 26, 2016 at 05:18:32PM +0530, Infinicalls Infinicalls wrote:
I am sorry, I am not sure how to implement Brandon's method. Isn't there any simpler solution to achieve this? Could someone elaborate me more on this or point me to relevant links?
My problem is simple. I have 2 hosts (host1.mydomain.com and host2.mydomain.com located in different places) and user1 and user2 are registered in both the servers.(local DBs having identical records).
Now, I want user1@host1.mydomain.com to talk to user2@host2.mydomain.com without issues.
The problem you have is that a lookup() will succeed on host1 when a UAC is registered to host2 (but stateful firewalls/NAT prohibit traffic from ipadresses other than host2).
You can either figure out which host was used to register by looking at the socket value in the location table (using sqlops/avp_db_query) and send the INVITE to the other host if socket doesn't contain a local ipadress (by simply setting $rd to the other host and setting $du to null) or just wait for a failure route (which adds a delay) to trigger and send the invite to the other host (again setting $du to null and $rd to the other host).
Hi,
You can either figure out which host was used to register by looking at the socket value in the location table (using sqlops/avp_db_query) and send the INVITE to the other host if socket doesn't contain a local ipadress (by simply setting $rd to the other host and setting $du to null)
The socket value I get here is the internal IP only. For eg. 10.0.0.4:5060. Can you tell me how do I get the static IP here? I am behind NAT and use rtpproxy and advertised it.
or just wait for a failure route (which adds a delay) to trigger and send the invite to the other host (again setting $du to null and $rd to the other host).
# uncomment the following lines if you want to redirect the failed # calls to a different new destination ## if (t_check_status("486|408")) { ## sethostport("MySecondIP:5061"); ## append_branch(); ## # do not set the missed call flag again ## t_relay(); ##}
Is this sufficient? In my case, if calls are only sent to the second IP, how do I add a mesh of servers (I have 5 of them now). Will that add more delay time? Any idea? Thanks.
regards Ganesh Kumar
On Thu, Sep 29, 2016 at 01:53:14PM +0530, Infinicalls Infinicalls wrote:
You can either figure out which host was used to register by looking at the socket value in the location table (using sqlops/avp_db_query) and send the INVITE to the other host if socket doesn't contain a local ipadress (by simply setting $rd to the other host and setting $du to null)
The socket value I get here is the internal IP only. For eg. 10.0.0.4:5060. Can you tell me how do I get the static IP here? I am behind NAT and use rtpproxy and advertised it.
In that case there is no direct way to get the external ip as far as I know. As far as location is concerned that information is lost. You might want to look into the Path module to store information about the REGISTER (you might have to fake a Path header before save from available info during the REGISTER).
or just wait for a failure route (which adds a delay) to trigger and send the invite to the other host (again setting $du to null and $rd to the other host).
# uncomment the following lines if you want to redirect the failed # calls to a different new destination ## if (t_check_status("486|408")) { ## sethostport("MySecondIP:5061"); ## append_branch(); ## # do not set the missed call flag again ## t_relay(); ##}
Is this sufficient? In my case, if calls are only sent to the second IP, how do I add a mesh of servers (I have 5 of them now). Will that add more delay time? Any idea? Thanks.
It is the correct idea, but it might be a little bit fragile. There might be no response (in which case you get a local generated 408), but if a device is listening it might decide to send any 4/5/6xx code.
You might want to take a look at you solution though. For example you might want to introduce edge proxies, clients connect with those directly, but they forward the requests to a (specific or loadbalanced) registrar (essentially the machines you have up and running now). These proxies insert Path information about themselves in any messages coming from the outside world (add_path_received()) , the registrar saves the Path info: modparam("registrar", "use_path", 1) modparam("registrar", "path_use_received", 1)
Now any registrar looking at the shared location data knows which edge proxy to sent the request for the enduser to directly.
Hi,
You might want to take a look at you solution though. For example you might want to introduce edge proxies, clients connect with those directly, but they forward the requests to a (specific or loadbalanced) registrar (essentially the machines you have up and running now). These proxies insert Path information about themselves in any messages coming from the outside world (add_path_received()) , the registrar saves the Path info: modparam("registrar", "use_path", 1) modparam("registrar", "path_use_received", 1)
Now any registrar looking at the shared location data knows which edge proxy to sent the request for the enduser to directly.
Edge proxies is a nice suggestion. Thanks.
Can I implement, as suggested here, https://blog.voipxswitch.com/2015/03/27/kamailio-basic-sip-proxy-all-request... to setup a proxy and direct requests to the registrar?
But, my main intention was to bring down the server load of the sole registrar and as bonus act as failover.
regards Ganesh Kumar
On Fri, Sep 30, 2016 at 09:08:50AM +0530, Infinicalls Infinicalls wrote:
Edge proxies is a nice suggestion. Thanks.
Can I implement, as suggested here, https://blog.voipxswitch.com/2015/03/27/kamailio-basic-sip-proxy-all-request... to setup a proxy and direct requests to the registrar?
Looks similar to my own setup, which I posted here http://lists.sip-router.org/pipermail/sr-users/2016-August/094280.html
But, my main intention was to bring down the server load of the sole registrar and as bonus act as failover.
Than a edge proxy setup will help, the config in them is static (and can be stateless). Dispatcher can distribute anyway you want, if you need to do maintenance/add more registrars you just edit dispatcher.list and reload them on the edge.