<div dir="auto"><div>Hi Alexandru!</div><div dir="auto">I aggre with the lcr_count purpose and its usage for in-memory data. However the problem I mentioned is that I cannot have an lcr_id of 1000 <span style="font-family:sans-serif">eventough</span> I have only one entry because my lcr_count is 50...</div><div dir="auto">It is not about having a huge amount of lcr_ids but being able to have id numbers greater than the lcr_count, which is not possible at the moment...</div><div dir="auto">Cheers</div><div dir="auto">Patrick Wakano<br><div class="gmail_extra" dir="auto"><br><div class="gmail_quote">On 29 Nov. 2017 18:05, "Alexandru Covalschi" <<a href="mailto:568691@gmail.com">568691@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">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>If you need to dynamically assign kamailio lcr_id you can use <span style="white-space:pre-wrap">event_route[core:worker-<wbr>one-init] and write lcr_id inside $shv().</span><div><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;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">______________________________<wbr>__</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;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing: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;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">VoIP Engineer and System Administrator<br>tel: <a href="tel:+373%20673%2098%20493" value="+37367398493" target="_blank">+373 673 98 493</a></div>
</div>
<br><div><blockquote type="cite"><div>29 нояб. 2017 г., в 8:54, Patrick Wakano <<a href="mailto:pwakano@gmail.com" target="_blank">pwakano@gmail.com</a>> написал(а):</div><br class="m_112405133859107196Apple-interchange-newline"><div><div class="elided-text"><div dir="ltr"><div><div><div><div><div><div><div><div>Hello Kamailio list!</div><div><br></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></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></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></div>The problem is this if that appears in the load_gws, to_gw and from_gw functions in lcr_mod.c:<br>    if ((lcr_id < 1) || (lcr_id > lcr_count_param)) {<br>    LM_ERR("invalid lcr_id parameter value %d\n", lcr_id);<br>    return -1;<br>    }<br></div><br></div></div><div>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></div><div><br></div>Best Regards,<br></div>Patrick Wakano<br></div></div>
______________________________<wbr>_________________<br>Kamailio (SER) - Users Mailing List<br><a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br><a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a><br></div></blockquote></div><br></div></div></div><br>______________________________<wbr>_________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a><br>
<br></blockquote></div><br></div></div></div>