Discussion:
[SR-Users] Call connection from one server to another
aawaise
2014-09-08 06:05:11 UTC
Permalink
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-another-tp130318.html
Sent from the Users mailing list archive at Nabble.com.
Daniel-Constantin Mierla
2014-09-08 10:25:23 UTC
Permalink
Hello,
Post by aawaise
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
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Next Kamailio Advanced Trainings 2014 - http://www.asipto.com
Sep 22-25, Berlin, Germany
aawaise
2014-09-09 03:57:19 UTC
Permalink
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-another-tp130318p130378.html
Sent from the Users mailing list archive at Nabble.com.
Rainer Piper
2014-09-09 06:42:15 UTC
Permalink
Post by 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-another-tp130318p130378.html
Sent from the Users mailing list archive at Nabble.com.
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
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
--
*Rainer Piper*
Integration engineer
Koeslinstr. 56
53123 BONN
GERMANY
Phone: +49 228 97167161
P2P: sip:7000-fwazL+***@public.gmane.org:5072 (pjsip-test)
Loading...