We have 15+ systems that are running various distros (Elastix, AsteriskNow) on various versions and all seems to experience the same issue and I’m wondering if anyone out there has any tips or fixes for this.
When a user logs in to the User Portal / ARI they see all calls made by other extensions with the same outbound Caller ID; It is however picking up the uniqueid field as it only places a playback / Monitor icon next the calls that extension really made. The calls that other extensions made do not have the monitor icons.
What’s been done:
One on particular system that was setup with AsteriskNow 1.5, I’ve upgraded FreePBX from 2.7 to 2.9, but the issue still exists. I did notice that the footer on the User Portal still says “FreePBX 2.5… Original work based on ARI from LittleJohn Consulting”. I’m not sure if FreePBX 2.9 hasn’t updated this or if that part isn’t being changed with new FW ARI code.
I’ve also changed the following variables in /var/www/html/recordings/includes/main.conf.php:
$CALLMONITOR_AGGRESSIVE_MATCHING = 1;
$CALLMONITOR_ONLY_EXACT_MATCHING = 1;
Has anyone else had these issues or know if a fix is out there?
I have seen the same problem. I’ve been through the code and I don’t see how to fix it. The underlying issue is that when the outbound caller ID is set in FreePBX, the CDR database uses that value in the src field. Thus, the query to match the src/dest uses this caller ID and will return records from other extensions because the caller id value is set to the same for these multiple extensions.
This is different than the matching used for the monitoring files. The monitor files will still only show up for the user…that is, each user will only have access to their individual monitor files.
Because the root problem lies in the CDR data, I did not see a quick fix. I believe the fix would require a change to the CDR database (e.g. have the extension added to the CDR table) and then modify the search logic used in the ARI call monitor page. I think this would be a pretty significant change.
what ip-rob is saying sounds kind of like an issue that I am having, but did not see in a previous installation running Asterisk 1.8 and the latest FreePBX. What you desscribe, renvorak, sounds almost like $CALLMONITOR_ADMIN_EXTENSIONS is set to “all” or to whichever particular user is seeing that.
Thanks Rob and Mark.
It looks like that system it was set to “”.
I’ve also tried to put in just one extension, and that extension can see all the calls, but the other user that was complaining still sees all the other calls with that same Outbound Caller ID.
Rob- that does make sense, but seems like it wouldn’t be too hard to change it, but maybe there just isn’t that big of a demand for it. It’s too bad ARI doesn’t let you sort by Monitor, then by date. That would at least alleviate their main concern of having to sort through pages and pages.
I periodically (every 5 minutes) run a php script via cron that will execute the following query to fix the CDR records. This is run on my trixbox server, which has a local MySQL. This has been good enough for me until someone comes up with a real fix. A previous post was correct that src = outbound callerid instead of the extension #.
// Correct cdr records --> put extension in place of outbound callerid
mysql_query(‘DROP TEMPORARY TABLE IF EXISTS cwMod’);
$sql = ‘
CREATE TEMPORARY TABLE cwMod
MID(channel, 5, LOCATE("-",channel) - 5) AS “src”,
CONCAT(""",u.NAME,"" <",u.extension,">") AS "clid"
WHERE uniqueid >= @cd
AND LEFT(channel,4) = "SIP/"
AND dcontext LIKE “from-internal%“
AND MID(channel, 5, LOCATE(”-”,channel) - 5) = u.extension
mysql_query(‘CREATE INDEX cwMod_uid ON cwMod (uniqueid)’);
$sql = ‘
asteriskcdrdb.cdr c, cwMod cw
SET c.src=cw.src, c.clid=cw.clid
WHERE c.uniqueid = cw.uniqueid
I use the following crontab entry to execute the script
*/5 * * * * /usr/bin/php /root/scripts/record-fix.php >> /root/scripts/asterisk.log 2>&1 # fix cdr records & recordings