Hello,
I would go for this logic: if lookup("location") returns false and the source ip different than the other server, then relay to the other server.
Say the other server ip is a.b.c.d:
if(!lookup("location")) { if(src_ip != a.b.c.d) { $du = "sip:a.b.c.d"; route(RELAY); exit; } send_reply("404", "Not found"); exit; }
You may want to adjust some other parts of processing based on source ip being the other server, like: - don't do authentication for requests - don't do nat contact fixing - don't do rtp relaying if already done by the other server
Cheers, Daniel
On 16/04/14 09:25, aawaise wrote:
Hello,
They can register to any of the servers as the registration process is independent of domain part of user id.
My scenario is that once there are two users registered to different servers. And one user make a call to other. How will server decide using domain part from location table of database that the callee user is on other server and then make a decision on this base about call routing. I need some coding hints, how can it be achieved. Using which module or logic etc...
Cheers, Aawaise
-- View this message in context: http://sip-router.1086192.n5.nabble.com/Routing-decision-based-on-domain-ent... 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