<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I'd suggest creating a separate htable with your gateways and just query it, you don't need a separate module for key-value matching<br class=""><div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><br class="Apple-interchange-newline">________________________________</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">Alexandru Covalschi</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">VoIP Engineer and System Administrator<br class="">tel: +373 673 98 493</div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">29 нояб. 2017 г., в 13:58, voipspace voipspace <<a href="mailto:voipspace@yandex.com" class="">voipspace@yandex.com</a>> написал(а):</div><br class="Apple-interchange-newline"><div class=""><div class="">I suppose I just could do sql direct on lcr_gw table like</div><div class=""> </div><div class="">select ip_addr, prefix from lcr_gw where gw_name = "my_termination_provider"</div><div class=""> </div><div class="">What I wanted to know is a module already doing this function.</div><div class=""> </div><div class="">I am looking for a function because in theory it will be more tested and because i heard sql directly is prone to memory leaks</div><div class=""> </div><div class=""> </div><div class=""> </div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">29.11.2017, 11:29, "voipspace voipspace" <<a href="mailto:voipspace@yandex.com" class="">voipspace@yandex.com</a>>:</div><blockquote type="cite" class=""><div class=""><div class=""><div class="">Hi</div><div class=""> </div><div class="">I want to build the following scenerio</div><div class=""> </div><div class="">There should be some sort of database table to hold a list of gateway entries with fields ip, prefix, and name/description.</div><div class=""> </div><div class="">It would be good to use exiting tables to use what is avaiable. Have been looking at the lcr and drouting tables</div><div class="">but it seems they are designed to choose automaticaly for you and not just returning data about specific entries.</div><div class=""> </div><div class="">Please suggest how I may archive the following</div><div class=""> </div><div class="">Kamailio will receive a request it will then send to another Kamailio redirect server.</div><div class="">The response from the redirect will have a sip header value holding the id/name of the gateway choosen.</div><div class=""> </div><div class="">I want Kamailio processing the reponse to use the gateway id/name to lookup on the table and access the full details</div><div class="">ip, prefix details. </div><div class=""> </div><div class="">This data can then be used to construct the relay parameter.</div><div class=""> </div><div class="">Regards</div><div class=""> </div></div></div></blockquote>_______________________________________________<br class="">Kamailio (SER) - Users Mailing List<br class=""><a href="mailto:sr-users@lists.kamailio.org" class="">sr-users@lists.kamailio.org</a><br class="">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users<br class=""></div></blockquote></div><br class=""></body></html>