Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N
echo "SELECT location FROM recording_log r \
LEFT JOIN vicidial_log l ON l.uniqueid=r.vicidial_id \
WHERE r.user = '6666' \
AND r.start_time > '2013-02-28 09:00' \
AND r.end_time < '2013-02-28 21:00' \
AND l.status = 'SALE'" | mysql -ucustom -p -D asterisk | xargs wget
echo " SELECT location FROM recording_log r LEFT JOIN vicidial_log l ON l.uniqueid=r.vicidial_id WHERE l.campaign_id = '1002' AND l.status = 'SALE' AND r.start_time > '2013-02-01 01:00'
AND r.end_time < '2014-05-31 23:59' " | mysql -ucustom -p -D asterisk | xargs wget
mflorell wrote:The recording_log.vicidial_id should match up to either the vicidial_log.uniqueid or the vicidial_closer_log.closecallid, depending on whether it is an outbound call or an inbound call.
The closecallid is an auto-increment integer with no period "." in it, so it is easy to differentiate from the two.
SELECT filename FROM recording_log as rl
JOIN vicidial_log as vl
ON rl.vicidial_id = vcl.uniqueid;
SELECT filename FROM recording_log as rl
JOIN vicidial_closer_log as vcl
ON rl.vicidial_id = vcl.closecallid;
Users browsing this forum: No registered users and 13 guests