<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="">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></body></html>