Hi All, I am trying to do 4 things:- 1. get the ip address of the server selected by the dispatcher for the current session. 2. check if the request ip address is in the dispatcher list of servers 3. check if the request ip address is in the trusted server list 4. get the ip address of the selected lcr gateway server
I cannot seem to find the functions for these things in the documentation. Please help.
Regards Andrew Okri
Hi,
1. get the ip address of the server selected by the dispatcher for the
current session.
After calling one of the dispatcher selection functions (ds_select_dst, ds_next_dst and so on...) you'll have the selected gateway in the $du variable.
2. check if the request ip address is in the dispatcher list of servers
Use ds_is_from_list ( http://www.kamailio.org/docs/modules/devel/modules/dispatcher.html#dispatche...) for this
You can use permissions module and its allow_* functions ( http://www.kamailio.org/docs/modules/devel/modules/permissions.html)
As for 1), you can get the ip address of the gateway from the $du variable.
Regards,
Federico