<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">This ended up doing the trick.<div class=""><div class=""><br class=""></div><div class="">Turns out I needed to just do an ifelse() statement.</div><div class=""><br class=""></div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">I append “GrandStream” in front of the devices MAC address. </div><div class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">If it's not a Grandsream that I use, then I use the circuit ID. </span></div><div class=""><span style="background-color: rgb(255, 255, 255); color: rgb(9, 89, 132); font-family: Menlo, Monaco, "Courier New", monospace; white-space: pre;" class=""><br class=""></span></div><div class=""><span style="background-color: rgb(255, 255, 255); color: rgb(9, 89, 132); font-family: Menlo, Monaco, "Courier New", monospace; white-space: pre;" class="">"identifier-expression"</span><font color="#363636" face="Menlo, Monaco, Courier New, monospace" style="background-color: rgb(255, 255, 255);" class=""><span style="white-space: pre;" class="">: </span></font><span style="background-color: rgb(255, 255, 255); color: rgb(162, 86, 55); font-family: Menlo, Monaco, "Courier New", monospace; white-space: pre;" class="">"ifelse(substring(option[60].hex,0,18) == 'HT8XX <a href="http://dslforum.org" class="">dslforum.org</a>' or substring(option[60].hex,0,18) == 'HT802 <a href="http://dslforum.org" class="">dslforum.org</a>' or substring(option[60].hex,0,18) == 'HT812 <a href="http://dslforum.org" class="">dslforum.org</a>','GrandStream ' + relay4[2].hex,relay4[1].hex)</span><font color="#a25637" face="Menlo, Monaco, Courier New, monospace" style="background-color: rgb(255, 255, 255);" class=""><span style="white-space: pre;" class="">”</span></font><font color="#363636" face="Menlo, Monaco, Courier New, monospace" style="background-color: rgb(255, 255, 255);" class=""><span style="white-space: pre;" class="">,</span></font></div><div class=""><br class=""></div><div class="">Thanks! </div><div class=""><br class=""></div><div class="">- Allan<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Oct 26, 2021, at 10:49 AM, Allan Tinker <<a href="mailto:allan@m33access.com" class="">allan@m33access.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">In IPv4 Im trying to use the circuit ID as the identifier to restrict IPv4 leases to one IP address at bridged clients. <div class=""><br class=""></div><div class="">However, some clients have phone service and we put a GrandStream ATA as a bridge after their ONU but before the router. </div><div class="">The ATA does pull from its own shared pool for IP leases, but it grabs that circuit ID and stores it in the lease table, not allowing anything else past it to obtain an IP address</div><div class=""><br class=""></div><div class="">Im trying to do an if statement in the “identifier-expression” under the flex_id hook to swap it out. </div><div class=""><br class=""></div><div class="">This is what I have.. Im sure it's a syntax issue or something along those lines. But Im hoping that it's possible to do something like this:</div><div class=""><br class=""></div><div class=""><div style="color: rgb(54, 54, 54); background-color: rgb(255, 255, 255); font-family: Menlo, Monaco, "Courier New", monospace; line-height: 18px; white-space: pre;" class=""><div class="">    {</div><div class="">    <span style="color: rgb(9, 89, 132);" class="">"library"</span>: <span style="color: rgb(162, 86, 55);" class="">"/usr/local/lib/kea/hooks/libdhcp_flex_id.so"</span>,</div><div class="">        <span style="color: rgb(9, 89, 132);" class="">"parameters"</span>: { </div><div class="">    <span style="color: rgb(146, 205, 120);" class="">//  "identifier-expression": "relay4[1].hex",</span></div><div class="">        <span style="color: rgb(9, 89, 132);" class="">"identifier-expression"</span>: <span style="color: rgb(162, 86, 55);" class="">"if (substring(option[60].hex,0,18) == 'HT8XX <a href="http://dslforum.org/" class="">dslforum.org</a>' or substring(option[60].hex,0,18) == 'HT802 <a href="http://dslforum.org/" class="">dslforum.org</a>' or substring(option[60].hex,0,18) == 'HT812 <a href="http://dslforum.org/" class="">dslforum.org</a>') {option[60].hex,0,18} else {relay4[1].hex}"</span>,</div><div class="">        <span style="color: rgb(9, 89, 132);" class="">"replace-client-id"</span>: <span style="color: rgb(63, 151, 223);" class="">true</span></div><div class="">        }</div><div class="">    },</div></div></div><div class=""><br class=""></div><div class="">Any help would be great</div><div class=""><br class=""></div><div class="">Thanks! </div><div class=""><br class=""></div><div class="">- Allan</div></div>_______________________________________________<br class="">ISC funds the development of this software with paid support subscriptions. Contact us at <a href="https://www.isc.org/contact/" class="">https://www.isc.org/contact/</a> for more information.<br class=""><br class="">To unsubscribe visit <a href="https://lists.isc.org/mailman/listinfo/kea-users" class="">https://lists.isc.org/mailman/listinfo/kea-users</a>.<br class=""><br class="">Kea-users mailing list<br class=""><a href="mailto:Kea-users@lists.isc.org" class="">Kea-users@lists.isc.org</a><br class="">https://lists.isc.org/mailman/listinfo/kea-users<br class=""></div></blockquote></div><br class=""></div></div></body></html>