I think it _is_ broken. At least, sanitizing on DID is. So here's my discovery:
cid_sanitize: DID
Is set in my database and a bunch of DIDs are nicely assigned to customers. However, when the call was being made it was presenting the card ID as the caller ID. Sure, I could add whatever I wanted under the SIP settings for each voip account but that defeats the object of an automated system. So debugging and verbosity galore, and I discovered that:
1. The Class.A2Billing.php script does spot that I'm sanitizing based on DID.
2. It does a query
3. It returns 0 in the array, not the DID assigned.
So MySQL commands and a long story short but there are two typos near each other in Class.A2Billing.php. In v1.9.4 the first is at line 2361 and the second just below on 2363.
The SQL to check the validity of the card as the 'greater than or equal to' symbol in its 'handwritten' not SQL format and there is a space missing for the 'ORDER by' bit. So...
original line 2361Code:
" WHERE (cc_did.activated=1 OR cc_did.activated='t') AND cc_did_destination.activated=1 AND cc_did.startingdate <= NOW() AND cc_did.expirationdate => NOW()".
becomes
Code:
" WHERE (cc_did.activated=1 OR cc_did.activated='t') AND cc_did_destination.activated=1 AND cc_did.startingdate <= NOW() AND cc_did.expirationdate >= NOW()".
original line 2363Code:
$QUERY .= "ORDER BY 1";
becomes
Code:
$QUERY .= " ORDER BY 1";
I hope this helps you all. Easiest thing in the world for someone to write a patch to. Or just do it manually.
cw