That's quite easy - that's a typical load-balancer setup.
Just store the mapping for example in a DB and then use the sqlops
module to query the DB and get the respective IP address of the user.
But before you add this "routing logic" I would recommend to add
Kamailio with a static forwarding - e.g. always route to a single
Asterisk server and make sure the config works fine. You also have to
deal with calls in direction Ast -> Kamailio -> client. Therefore you
usually have to a) use the PATH module (only supported in latest
Asterisk) or b) store the registrations also in Kamailio.
Only if it works with this static routing, add the dynamic routing.
Klaus
On 28.11.2013 10:52, driver wrote:
Hello,
I have such infrastructure:
Asterisk1 (provider 1) - IP1
Asterisk2 (provider 2) - IP2
Softphones on client computers with configured two IPs to two Asterisk servers. User has
to manually switch between each server.
I need to change this that user will have only one account configured (eg. Kamailio) and
Kamailio will be used only to forward to Ast1 or Ast2 by previously defined rules. How is
it possible?
comp1 --------> Kamailio -------> Ast1
comp2 --------> Kamailio -------> Ast1
comp3 --------> Kamailio -------> Ast2
comp4 --------> Kamailio -------> Ast2
Thank you,
Marcin
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users