Recording Filename

Any and all non-support discussions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Recording Filename

Postby ruben23 » Thu Nov 06, 2014 6:57 pm

Hi Guys,

If i may ask how do we find the script or dial plan that handles the file naming of all recording on vicidial somehow..? like on the Web management we see this Campaign Rec Filename:

Any idea what script handle this or maybe a dialplan. Thanks
SkypeID: rlacumba
IBM x3200 Dual Core 2.4 Ghz.
4GB Ram
VERSION: 2.4-311a
BUILD: 110514-1351
© 2011 ViciDial Group
Asterisk 1.4.27-vici
Another VICI_day, same trunK, same Channel-->Transcode...
ruben23
 
Posts: 1161
Joined: Thu Jul 31, 2008 10:35 am
Location: Davao City, Philippines

Re: Recording Filename

Postby dspaan » Thu Nov 06, 2014 7:23 pm

Hey Ruben, good to hear from you again.

Isn't this done by any of these scripts you can find with crontab -e:

### recording mixing/compressing/ftping scripts
#0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57 * * * * /usr/share/astguiclient/AST_CRON_audio_1_move_mix.pl
0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57 * * * * /usr/share/astguiclient/AST_CRON_audio_1_move_mix.pl --MIX
0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54,57 * * * * /usr/share/astguiclient/AST_CRON_audio_1_move_VDonly.pl
1,4,7,10,13,16,19,22,25,28,31,34,37,40,43,46,49,52,55,58 * * * * /usr/share/astguiclient/AST_CRON_audio_2_compress.pl --MP3
2,5,8,11,14,17,20,23,26,29,32,35,38,41,44,47,50,53,56,59 * * * * /usr/share/astguiclient/AST_CRON_audio_3_ftp.pl --MP3

Also check out /usr/share/astguiclient/AST_VDsales_export.pl which allows you to move sale recordings to a different directory or server.
Regards, Dennis

Vicibox 9.0.1
Version: 2.14b0.5
SVN Version: 3199
DB Schema Version: 1588
Build: 200310-1801
dspaan
 
Posts: 1374
Joined: Fri Aug 21, 2009 1:40 pm
Location: The Netherlands

Re: Recording Filename

Postby ruben23 » Thu Nov 06, 2014 7:56 pm

@dspaan

Thanks for the reply, is it possible to name recording by adding custom field on it somehow also..?

Coz i need to follow this recording format somehow on my recording output, im just not sure how to define it on the Campaign Rec Filename: what variable i will put in equivalent, some are good already like:

out_call,datetime,ext,phone_number,live_submit_id,unique_id

- CUSTPHONE
- FULLDATE
- AGENT
- CAMPAIGN

but the rest how do i define the live_submit and unique_id also the TEXT infront of recroding as Out_call (outboundcalls)

Any help
SkypeID: rlacumba
IBM x3200 Dual Core 2.4 Ghz.
4GB Ram
VERSION: 2.4-311a
BUILD: 110514-1351
© 2011 ViciDial Group
Asterisk 1.4.27-vici
Another VICI_day, same trunK, same Channel-->Transcode...
ruben23
 
Posts: 1161
Joined: Thu Jul 31, 2008 10:35 am
Location: Davao City, Philippines

Re: Recording Filename

Postby dspaan » Thu Nov 06, 2014 8:17 pm

I don't know. I think you would have to analyze those perl scripts, find someone who can do that for you. Maybe Matt or Mcargile can point you to which line(s) in which script you have to edit.

I assume you are referring to this setting from the campaign details screen:

Campaign Rec Filename - This field allows you to customize the name of the recording when Campaign recording is ONDEMAND or ALLCALLS. The allowed variables are CAMPAIGN INGROUP CUSTPHONE FULLDATE TINYDATE EPOCH AGENT VENDORLEADCODE LEADID. The default is FULLDATE_AGENT and would look like this 20051020-103108_6666. Another example is CAMPAIGN_TINYDATE_CUSTPHONE which would look like this TESTCAMP_51020103108_3125551212. Te resulting filename must be less than 90 characters in length.
Regards, Dennis

Vicibox 9.0.1
Version: 2.14b0.5
SVN Version: 3199
DB Schema Version: 1588
Build: 200310-1801
dspaan
 
Posts: 1374
Joined: Fri Aug 21, 2009 1:40 pm
Location: The Netherlands

Re: Recording Filename

Postby DomeDan » Wed Nov 12, 2014 4:22 am

its the variable $campaign_rec_filename in these agi scripts:
agi-VDAD_ALL_inbound.agi
agi-VDAD_ALL_outbound.agi
agi-VDAD_RINGALL.agi
VD_amd.agi

you can use the variables the script already uses or you can change/write some query to get more data from the database.

here is an example:

uniqueid (big font and bold is added code):

$stmtA = "SELECT campaign_id,phone_number,phone_code,lead_id,call_time,alt_dial,queue_priority,uniqueid FROM vicidial_auto_calls where callerid='$callerid' order by call_time desc limit 1;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$dbhP=$dbhA; $mysql_count='01006'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$VDADcampaign = $aryA[0];
$VDADphone = $aryA[1];
$VDADphone_code = $aryA[2];
$VDADlead_id = $aryA[3];
$VDADcall_time = $aryA[4];
$VDADalt_dial = $aryA[5];
$VDADqueue_priority = $aryA[6];
$VDADuniqueid = $aryA[7];
}
$sthA->finish();

...

$campaign_rec_filename =~ s/CAMPAIGN/$VDADcampaign/gi;
$campaign_rec_filename =~ s/INGROUP/$VDADcampaign/gi;
$campaign_rec_filename =~ s/CUSTPHONE/$VDADphone/gi;
$campaign_rec_filename =~ s/FULLDATE/$recdate/gi;
$campaign_rec_filename =~ s/TINYDATE/$tinydate/gi;
$campaign_rec_filename =~ s/EPOCH/$now_date_epoch/gi;
$campaign_rec_filename =~ s/AGENT/VDAD/gi;
$campaign_rec_filename =~ s/VENDORLEADCODE/$vendor_lead_code/gi;
$campaign_rec_filename =~ s/LEADID/$CIDlead_id/gi;
$campaign_rec_filename =~ s/CALLID/$callerid/gi;
$campaign_rec_filename =~ s/UNIQUEID/$VDADuniqueid/gi;
$campaign_rec_filename =~ s/\"|\'//gi;
$campaign_rec_filename =~ s/ //gi;



BUT I think you can use the alrady defined variable $uniqueid instead of getting it from the sql query
then you can use UNIQUEID in the filename campaign setting

Have not tried this and any modification are done at your own risk.
remember to backup!
Vicidial Partner. Region: Sweden/Norway.
Does Vicidial installation, configuration, customization, add-ons, CRM implementation, support, upgrading, network-related, pentesting etc. Remote and onsite assistance.
Email: domedan (at) gmail.com
DomeDan
 
Posts: 1226
Joined: Tue Jan 04, 2011 9:17 am
Location: Sweden

Re: Recording Filename

Postby ruben23 » Sun Nov 16, 2014 8:03 pm

@DomeDan,

Thanks a lot..the uniqueid code is working already which i just used the default, but any chances i can replace the AGENT variable with PHONE EXTENSION number only..?
we are required to with the recording file name based on Phone extension not by AGENT name.
SkypeID: rlacumba
IBM x3200 Dual Core 2.4 Ghz.
4GB Ram
VERSION: 2.4-311a
BUILD: 110514-1351
© 2011 ViciDial Group
Asterisk 1.4.27-vici
Another VICI_day, same trunK, same Channel-->Transcode...
ruben23
 
Posts: 1161
Joined: Thu Jul 31, 2008 10:35 am
Location: Davao City, Philippines

Re: Recording Filename

Postby DomeDan » Mon Nov 17, 2014 2:54 am

try to use the variable $eac_extension dont know it its populated at that part though
or find an other query where data is gathered from vicidial_live_agents or write a new query
Vicidial Partner. Region: Sweden/Norway.
Does Vicidial installation, configuration, customization, add-ons, CRM implementation, support, upgrading, network-related, pentesting etc. Remote and onsite assistance.
Email: domedan (at) gmail.com
DomeDan
 
Posts: 1226
Joined: Tue Jan 04, 2011 9:17 am
Location: Sweden

Re: Recording Filename

Postby ruben23 » Mon Nov 17, 2014 10:27 pm

Quick resolution made is just rename the UserID of all the Agent to match there respective extension, so on the recording file name it will display the AgentID as there equivalent extensions

@DomeDan..Thanks a lot
SkypeID: rlacumba
IBM x3200 Dual Core 2.4 Ghz.
4GB Ram
VERSION: 2.4-311a
BUILD: 110514-1351
© 2011 ViciDial Group
Asterisk 1.4.27-vici
Another VICI_day, same trunK, same Channel-->Transcode...
ruben23
 
Posts: 1161
Joined: Thu Jul 31, 2008 10:35 am
Location: Davao City, Philippines

Re: Recording Filename

Postby DomeDan » Tue Nov 18, 2014 7:12 am

sounds like a weird was to solve the feature, just add code:

$campaign_rec_filename =~ s/EXTENSION/$eac_extension/gi;

and try to use EXTENSION in the filename campaign setting, it might work and it might not work because I dont know it that variable is populated
Vicidial Partner. Region: Sweden/Norway.
Does Vicidial installation, configuration, customization, add-ons, CRM implementation, support, upgrading, network-related, pentesting etc. Remote and onsite assistance.
Email: domedan (at) gmail.com
DomeDan
 
Posts: 1226
Joined: Tue Jan 04, 2011 9:17 am
Location: Sweden


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 23 guests