[Kamailio-Users] finding out which gw id was used
Anders
vaerge at gmail.com
Fri Dec 4 00:48:12 CET 2009
Hi,
I would like to know which gw was used for a call. Right now, it is doing this:
sql_query("cb", "select id from gw where ip_addr='$rd'", "rb");
...in route[1], but that's not good enough, because I have more than
one gw with the same IP, so it just takes the first one available. If
I could do something like "select id from gw where
grp_id='grp_id_from_lcr'" , where grp_id_from_lcr is the the grp_id in
the lcr table, which lead to the gw used... then I'd have the right id
of the gw, since I use unique numbers for the grp_id in the gw table.
How do I do this?
Thanks!!
More information about the Users
mailing list