I have deployed two kamailio servers with independent domain names, BOTH sharing the same database. When an "INVITE" packet approaches one server from a user. As per my understanding it checks "Location Table" (containing online users) to find about status (online or not) of called user. If user is present in LOCATION TABLE, kamailio server sends INVITE to callee else it disconnects the call.
In LOCATION TABLE, DOMAIN NAME is also mentioned along with user name, I want to extract that domain name of callee user from LOCATION TABLE with every INVITE packet. What variable stores this information ?? How can it be extracted ?? I have tried using "$du". It consumes RURI and gives domain name, it picks domain name from invite packet, which is not required here. Requirement is to pick domain name from LOCATION TABLE, by which user is logged into the system. (In multidomain setup, they both can be different). I have also tried "$td", they also pick domain name from INVITE packet header. I want to print (i.e xlog) value of domain from the LOCATION TABLE. And it is bothering for quite a few days now. Any help will be much appreciated. Thanks.
Regards, Aawaise.
-- View this message in context: http://sip-router.1086192.n5.nabble.com/Issue-in-Multi-Domain-Environment-tp... Sent from the Users mailing list archive at Nabble.com.
Hello,
the username and domain in location are matched against the username and domain in r-uri at the moment you execute lookup("location").
Therefore, just use $rd before doing lookup("location") to retrieve the domain -- you can store it in $var(xyz) to have it after lookup("location").
Cheers, Daniel
On 13/05/14 11:12, aawaise wrote:
I have deployed two kamailio servers with independent domain names, BOTH sharing the same database. When an "INVITE" packet approaches one server from a user. As per my understanding it checks "Location Table" (containing online users) to find about status (online or not) of called user. If user is present in LOCATION TABLE, kamailio server sends INVITE to callee else it disconnects the call.
In LOCATION TABLE, DOMAIN NAME is also mentioned along with user name, I want to extract that domain name of callee user from LOCATION TABLE with every INVITE packet. What variable stores this information ?? How can it be extracted ?? I have tried using "$du". It consumes RURI and gives domain name, it picks domain name from invite packet, which is not required here. Requirement is to pick domain name from LOCATION TABLE, by which user is logged into the system. (In multidomain setup, they both can be different). I have also tried "$td", they also pick domain name from INVITE packet header. I want to print (i.e xlog) value of domain from the LOCATION TABLE. And it is bothering for quite a few days now. Any help will be much appreciated. Thanks.
Regards, Aawaise.
-- View this message in context: http://sip-router.1086192.n5.nabble.com/Issue-in-Multi-Domain-Environment-tp... 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
I have tried extracting the value of $rd right at start of main route function i.e route(....) Still I am getting domain name from the INVITE packet. I have added this code as I want this check to execute at every incoming INVITE. if(is_method("INVITE")) { xlog("$rd"); xlog("$ru"); } And I am checking the log messages to note the effect of this code.
Regarding lookup("location"), it is used in route (Location), I have tried extracting value of "$rd" there also but still I am getting domain name from INVITE packet, not from Location Table. Any help will be much appreciated.
-- View this message in context: http://sip-router.1086192.n5.nabble.com/Issue-in-Multi-Domain-Environment-tp... Sent from the Users mailing list archive at Nabble.com.