<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="">There is a strong reason to have lcr_count variable - it actually represents the size of in-memory table that is created to store all lcr_id's on module loading, I don't think there is a way to avoid that, unless you rewrite lcr module to not load lcr in-memory, but query database (which IMO is a terrible idea).<div class="">If you need to dynamically assign kamailio lcr_id you can use <span style="orphans: 2; white-space: pre-wrap; widows: 2;" class="">event_route[core:worker-one-init] and write lcr_id inside $shv().</span><div 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;">________________________________</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 г., в 8:54, Patrick Wakano <<a href="mailto:pwakano@gmail.com" class="">pwakano@gmail.com</a>> написал(а):</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div class="">Hello Kamailio list!</div><div class=""><br class=""></div>I've been working with the LCR module and I wanted to use the lcr_id to match some ID's I have somewhere else.<br class=""></div>However, due to the lcr_count my lcr_ids must be less than the lcr_count. I understand the reason behind the lcr_count, what I think is a mistake is to have the lcr_id dependent of the lcr_count.<br class=""></div>Ideally we should be able to use any lcr_id value, just observing that the total amount of lcr groups should not exceed the lcr_count.<br class=""></div>The problem is this if that appears in the load_gws, to_gw and from_gw functions in lcr_mod.c:<br class="">    if ((lcr_id < 1) || (lcr_id > lcr_count_param)) {<br class="">    LM_ERR("invalid lcr_id parameter value %d\n", lcr_id);<br class="">    return -1;<br class="">    }<br class=""></div><br class=""></div></div><div class="">I ended up using another table to make the conversion of ids, but this is horrible.... Any other reason to force the lcr_id to be less than the lcr_count?<br class=""></div><div class=""><br class=""></div>Best Regards,<br class=""></div>Patrick Wakano<br class=""></div>
_______________________________________________<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=""></div></div></body></html>