Hello,<br><br>I'm trying to write a post-paid billing script, I have the CDR on my database and also a "rates" table, the CDR contains fields like caller_destination_number, variable_duration, etc. and the rates table contains: destination, prefix, rate (cost).<br>
<br>The problem is that I can't just strip the destination number to take the prefix from it because I have to deal with destination numbers from different countries and they all have different prefix lengths... so I need to find another way to take the prefix from the destination number.<br>
<br>Any ideas how to do this?<br><br>Thanks,<br><br>Diego<br><br>