<div dir="ltr">Hi,<div><div class="gmail_extra"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div>1. get the ip address of the server selected by the dispatcher for the current session.</div></div></blockquote><div><br></div><div>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.<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div>2. check if the request ip address is in the dispatcher list of servers </div></div></blockquote><div><br></div><div>Use ds_is_from_list (<a href="http://www.kamailio.org/docs/modules/devel/modules/dispatcher.html#dispatcher.f.ds_is_from_list">http://www.kamailio.org/docs/modules/devel/modules/dispatcher.html#dispatcher.f.ds_is_from_list</a>) for this</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div>3. check if the request ip address is in the trusted server list<br></div></div></blockquote><div><br></div><div>You can use permissions module and its allow_* functions (<a href="http://www.kamailio.org/docs/modules/devel/modules/permissions.html">http://www.kamailio.org/docs/modules/devel/modules/permissions.html</a>)</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div>
<span style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px"><div style="word-wrap:break-word"><span style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px"><div style="word-wrap:break-word"><div>4. get the ip address of the selected lcr gateway server</div></div></span></div></span></div></div></div></blockquote><div> <br></div><div>As for 1), you can get the ip address of the gateway from the $du variable.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div><span style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px"><div style="word-wrap:break-word"><span style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px"><div style="word-wrap:break-word"><div><br></div><div>I cannot seem to find the functions for these things in the documentation. Please help.</div><div><br></div><div>Regards</div><span class=""><font color="#888888"><div>Andrew Okri</div></font></span></div></span></div></span></div></div></div></blockquote><div> </div><div>Regards,</div><div><br></div><div>Federico</div><div><br></div></div></div></div></div>