<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span style="font-size: 12pt;">Hello, I have a piece of code as follows:</span><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><div class="y_msg_container"><div id="yiv5057600885"><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><div><font face="times new roman, new york, times, serif"><br></font></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><font face="times new roman, new york, times, serif">$avp(callfwdcount) = 0;</font></div><div><font face="times new roman, new york,
 times, serif">  $avp(dnumber) = $rU;</font></div><div><font face="times new roman, new york, times, serif">  $var(found) = 0;</font></div><div><font face="times new roman, new york, times, serif">  while($avp(callfwdcount) < 3) {</font></div><div><font face="times new roman, new york, times, serif">    if
 (avp_db_load("$avp(dnumber)", "$avp(callfwd_permanent)"))</font></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><font face="times new roman, new york, times, serif">   {</font></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><font face="times new roman, new york, times, serif">          .....</font></div><div style="background-color:transparent;"><font style="color: rgb(0, 0, 0); font-family: 'times new roman', 'new york', times, serif; font-size: 16px; font-style: normal;">         </font><span style="background-color:transparent;"><font face="times new roman, new york, times, serif">$avp(dst_number) =
 $avp(callfwd_permanent); # SET THE CALL FORWARD TO  NUMBER</font></span></div><div><span style="background-color:transparent;"><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><font face="times new roman, new york, times, serif">          ....</font></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><font face="times new roman, new york, times, serif">       }</font></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><font face="times new roman, new york, times, serif"><br></font></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times
 new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><font face="times new roman, new york, times, serif">Now this works if this is a single domain set up. I am running a multidomain set up and need to check the domain part to ( $rd ) and if there is match in the database with $rU and $rd then the forward to number needs to be set. Can someone let me know how this can be done?</font></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><font face="times new roman, new york, times, serif"><br></font></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><font face="times new roman, new york, times, serif">Thank you,</font></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: 'times
 new roman', 'new york', times, serif; background-color: transparent; font-style: normal;"><font face="times new roman, new york, times, serif">Arun</font></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 16px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><br></div></div></div><br><br></div> </div> </div>  </div></body></html>