Hello,
I want to deploy two kamailio servers, both using same MYSQL database placed on Server 2008. Both are using different static IP's. Hopefully, I can add two A records in DNS server, both against same domain name, pointing to two different IP's to which two servers are attached. My question is that in load balancing scenario if user 1 is attached to server 1, and user 2 is attached to server 2. How can user1 call user2. Because request will go to server 1 to which user 1 is attached. But it wont be able to locate user 2 because it is not connected to server1 (but connected to server 2). I am using same domain name for two servers. What can be done in kamailio to solve this issue ??
Regards, aawaise
-- View this message in context: http://sip-router.1086192.n5.nabble.com/Call-connection-from-one-server-to-a... Sent from the Users mailing list archive at Nabble.com.
Hello,
On 08/09/14 08:05, aawaise wrote:
Hello,
I want to deploy two kamailio servers, both using same MYSQL database placed on Server 2008. Both are using different static IP's. Hopefully, I can add two A records in DNS server, both against same domain name, pointing to two different IP's to which two servers are attached. My question is that in load balancing scenario if user 1 is attached to server 1, and user 2 is attached to server 2. How can user1 call user2. Because request will go to server 1 to which user 1 is attached. But it wont be able to locate user 2 because it is not connected to server1 (but connected to server 2). I am using same domain name for two servers. What can be done in kamailio to solve this issue ??
you can run kamailio with usrloc in db only mode, then they share the same location database.
On the other hand, this is not going to work if the phones are behind symmetric nat. This is due to very restrictive rules in symmetric nat routers. In that case you have to think to a different platform architecture (e.g., don't share the location table, but forward call to the other server if the callee is not found locally).
Cheers, Daniel
How can we avoid sharing of location table ? Because both are using same database and siremis on both servers will be attached to common database ? How can a call be forwarded in kamailio on checking that user is available locally or not ?? I need some help with code in this regard.
-- View this message in context: http://sip-router.1086192.n5.nabble.com/Call-connection-from-one-server-to-a... Sent from the Users mailing list archive at Nabble.com.
Am 09.09.2014 um 05:57 schrieb aawaise:
How can we avoid sharing of location table ? Because both are using same database and siremis on both servers will be attached to common database ? How can a call be forwarded in kamailio on checking that user is available locally or not ?? I need some help with code in this regard.
-- View this message in context: http://sip-router.1086192.n5.nabble.com/Call-connection-from-one-server-to-a... Sent from the Users mailing list archive at Nabble.com.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
change the usrloc db_mode in your kamailio.cfg on both kamailio server.
mode 2 will store the location Data to your mysql server.
modparam("usrloc", "db_mode", 2)
2 - Write-Back scheme. This is a combination of previous two schemes. All changes are made to memory and database synchronization is done in the timer. The timer deletes all expired contacts and flushes all modified or new contacts to database. Use this scheme if you encounter high-load peaks and want them to process as fast as possible. The mode will not help at all if the load is high all the time. Also, latency of this mode is much lower than latency of mode 1, but slightly higher than latency of mode 0.
source -> http://kamailio.org/docs/modules/4.1.x/modules/usrloc.html#usrloc.p.db_mode