We've just made some changes to the above specifically for a prettier HTML export which I thought we'd share. Our QA team was looking for an easy way to listen to only the sales calls, the above script does this very nicely and we add it to a cron to dump the sales every day to their email, however the html-rec option wasn't what I'd expected. It looks like there are pipes delimiting the data but at least the URL for the recording works well.
To cut a long story short, we changed the pipes to a table format, the URL is still preserved and it's more intuitive for a QA agent to access the recordings.
The following changes were made:
At about line 519 of the above file inserted the following:
- Code: Select all
#### Headings for HTML export and table setup ###
if ($output_format =~ /^html-rec$/)
{
$str = "<table border=1>";
print out "$str";
$str = "<tr><td>User</td><td>Agent_name</td><td>Closer</td><td>Closer_name</td><td>Call date</td><td>Status</td><td>First name</td><td>Last name</td><td>Phone number</td><td>Address 1</td><td>Address 2</td><td>City</td><td>State</td><td>Postal_code</td><td>Comments</td><td>Security Phrase</td><td>Email</td><td>Vendor id</td><td>Source id</td><td>Lead id</td><td>List id</td><td>Campaign</td><td>Campaign id</td><td><a href=\"$ivr_location\">Recording</a></td></tr>\n";
print out "$str";
}
Then at about line 1188 (now that we've inserted the above), the line just under " if ($output_format =~ /^html-rec$/) ", instead of the long string with pipes as a delimiter we modified to read:
- Code: Select all
$str = "<tr><td>$user</td><td>$agent_name</td><td>$closer</td><td>$closer_name</td><td>$call_date</td><td>$status</td><td>$first_name</td><td>$last_name</td><td>$phone_number</td><td>$address1</td><td>$address2</td><td>$city</td><td>$state</td><td>$postal_code</td><td>$comments</td><td>$security</td><td>$email</td><td>$vendor_id</td><td>$source_id</td><td>$lead_id</td><td>$list_id</td><td>$campaign</td><td>$campaign_id</td><td><a href=\"$ivr_location\">$ivr_id</a></td></tr>\n";
I know it doesn't have the closing "/table" html code and I expect W3 to assassinate us later today, but it works - Matt can probably make a better fix. We're on Vicibox redux version 3.1.14 ourselves, hopefully it helps others.