You must provision in the destinations table with all prefixes for PSTN destinations (at least all country codes). The software will find the longest match from that table.
Adrian
Trying cdrtool prepaid rating, got stuck with something.
When a request like "MaxSessionTime From=sip:me at example.com To=sip:0031650222 at example.com Duration=7200 Lock=0" is given, cdrtool always return "0", no matter what amount of balance is available in prepaid table. This is what I see in syslog:
"CDRTool rating[5759]: Error: cannot figure out the destination id for sip:0031650222 at example.com"
Cdrtool version is 6.3.2. Apparently rating engine needs the variable $CDR->DestinationID set (rating_lib.phtml, line #5926), but this is not happening. It isn't clear to me how this is initialised (In weak defense, I'm totally clueless about php), and it doesn't work even if DestinationID parameter is added in the above stated request.
Adrian Georgescu ag@ag-projects.com wrote:
You must provision in the destinations table with all prefixes for PSTN destinations (at least all country codes). The software will find the longest match from that table.
Actually, destinations table entries are already present. This table was populated using setup/csv/destinations.csv.