diff --git a/UPGRADE b/UPGRADE
index 1156ad76..9910e6f9 100644
--- a/UPGRADE
+++ b/UPGRADE
@@ -159,7 +159,7 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom
service message for invalid phone numbers that cannot be dialing in North
America
-37. Rewrote Leave-3way function for external calling to work more reliably on
+37. Rewrote Leave-3way function for conference calling to work more reliably on
high load systems.
38. Added several new features to inbound call handling including:
@@ -179,6 +179,9 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom
exten => _99909*.,2,AGI(agi-VDAD_ALL_inbound.agi)
exten => _99909*.,3,Hangup
+40. Added ability to set callerID number on outgoing conference calls to
+ CAMPAIGN, CUSTOMER or AGENT_PHONE callerID settings.
+
diff --git a/agi/agi-VDADfixCXFER.agi b/agi/agi-VDADfixCXFER.agi
index dc1046bb..f08161f9 100644
--- a/agi/agi-VDADfixCXFER.agi
+++ b/agi/agi-VDADfixCXFER.agi
@@ -169,8 +169,8 @@ $extension =~ s/^\d\d\d\*\d\d\d\*\d\d\d\*\d\d\d\*//gi;
@EXTEN = split(/\*/, $extension);
$conf_exten = $EXTEN[0];
- $lead_id = $EXTEN[1];
- $user = $EXTEN[2];
+ $lead_id = $EXTEN[1];
+ $user = $EXTEN[2];
$phone_code = $EXTEN[3];
$phone_number = $EXTEN[4];
$campaign_id = $EXTEN[5];
diff --git a/bin/VICIDIAL_IN_new_leads_file.pl b/bin/VICIDIAL_IN_new_leads_file.pl
index bcff839b..8d76bac6 100644
--- a/bin/VICIDIAL_IN_new_leads_file.pl
+++ b/bin/VICIDIAL_IN_new_leads_file.pl
@@ -103,9 +103,6 @@ $server_ip = $VARserver_ip; # Asterisk server IP
if (!$VDHLOGfile) {$VDHLOGfile = "$PATHlogs/newleads.$year-$mon-$mday";}
-print "\n\n\n\n\n\n\n\n\n\n\n\n-- VICIDIAL_IN_new_leads_file.pl --\n\n";
-print "This program is designed to take a tab delimited file and import it into the VICIDIAL system. \n\n";
-
### begin parsing run-time options ###
if (length($ARGV[0])>1)
{
@@ -274,6 +271,12 @@ else
}
### end parsing run-time options ###
+if ($q < 1)
+ {
+ print "\n\n\n\n\n\n\n\n\n\n\n\n-- VICIDIAL_IN_new_leads_file.pl --\n\n";
+ print "This program is designed to take a tab delimited file and import it into the VICIDIAL system. \n\n";
+ }
+
$i=0;
$US = '_';
$phone_list = '|';
@@ -974,8 +977,10 @@ $secY = time();
$secZ = ($secY - $secX);
$secZm = ($secZ /60);
-print "script execution time in seconds: $secZ minutes: $secZm\n";
-
+if ($q < 1)
+ {
+ print "script execution time in seconds: $secZ minutes: $secZm\n";
+ }
###### EMAIL SECTION
diff --git a/docs/conf_examples/extensions.conf.sample b/docs/conf_examples/extensions.conf.sample
index 265a3137..cc22ac1f 100644
--- a/docs/conf_examples/extensions.conf.sample
+++ b/docs/conf_examples/extensions.conf.sample
@@ -224,7 +224,7 @@ exten => 1234,3,Hangup
; inbound VICIDIAL transfer calls [can arrive through PRI T1 crossover, IAX or SIP channel]
exten => _90009.,1,Answer ; Answer the line
-exten => _90009.,2,AGI(agi-VDAD_ALL_inbound.agi,CLOSER-----LB-----CL_TESTCAMP-----7275551212-----Closer-----park----------999-----1)
+exten => _90009.,2,Dial(${TRUNKloop}/9${EXTEN},,to)
exten => _90009.,3,Hangup
exten => _990009.,1,Answer ; Answer the line
exten => _990009.,2,AGI(agi-VDAD_ALL_inbound.agi,CLOSER-----LB-----CL_TESTCAMP-----7275551212-----Closer-----park----------999-----1)
diff --git a/docs/conf_examples/extensions.conf.sample-1.4 b/docs/conf_examples/extensions.conf.sample-1.4
index f171cd4d..6ea41905 100644
--- a/docs/conf_examples/extensions.conf.sample-1.4
+++ b/docs/conf_examples/extensions.conf.sample-1.4
@@ -224,7 +224,7 @@ exten => 1234,3,Hangup
; inbound VICIDIAL transfer calls [can arrive through PRI T1 crossover, IAX or SIP channel]
exten => _90009.,1,Answer ; Answer the line
-exten => _90009.,2,AGI(agi-VDAD_ALL_inbound.agi,CLOSER-----LB-----CL_TESTCAMP-----7275551212-----Closer-----park----------999-----1)
+exten => _90009.,2,Dial(${TRUNKloop}/9${EXTEN},,to)
exten => _90009.,3,Hangup
exten => _990009.,1,Answer ; Answer the line
exten => _990009.,2,AGI(agi-VDAD_ALL_inbound.agi,CLOSER-----LB-----CL_TESTCAMP-----7275551212-----Closer-----park----------999-----1)
diff --git a/extras/MySQL_AST_CREATE_tables.sql b/extras/MySQL_AST_CREATE_tables.sql
index d035fa87..3007ab85 100644
--- a/extras/MySQL_AST_CREATE_tables.sql
+++ b/extras/MySQL_AST_CREATE_tables.sql
@@ -590,7 +590,8 @@ display_queue_count ENUM('Y','N') default 'Y',
manual_dial_filter VARCHAR(50) default 'NONE',
agent_clipboard_copy VARCHAR(50) default 'NONE',
agent_extended_alt_dial ENUM('Y','N') default 'N',
-use_campaign_dnc ENUM('Y','N') default 'N'
+use_campaign_dnc ENUM('Y','N') default 'N',
+three_way_call_cid ENUM('CAMPAIGN','CUSTOMER','AGENT_PHONE') default 'CAMPAIGN'
);
CREATE TABLE vicidial_lists (
@@ -1307,9 +1308,23 @@ INSERT INTO vicidial_state_call_times SET state_call_time_id='wyoming',state_cal
INSERT INTO vicidial_shifts SET shift_id='24HRMIDNIGHT',shift_name='24 hours 7 days a week',shift_start_time='0000',shift_length='24:00',shift_weekdays='0123456';
+INSERT INTO vicidial_phone_codes (country_code, country, areacode, state, GMT_offset, DST, DST_range, geographic_description) VALUES ('1','USA','227','MD','-5','Y','SSM-FSN','');
+INSERT INTO vicidial_phone_codes (country_code, country, areacode, state, GMT_offset, DST, DST_range, geographic_description) VALUES ('1','CAN','343','ON','-5','Y','SSM-FSN','');
+INSERT INTO vicidial_phone_codes (country_code, country, areacode, state, GMT_offset, DST, DST_range, geographic_description) VALUES ('1','USA','364','KY','-6','Y','SSM-FSN','');
+INSERT INTO vicidial_phone_codes (country_code, country, areacode, state, GMT_offset, DST, DST_range, geographic_description) VALUES ('1','USA','447','IL','-6','Y','SSM-FSN','');
+INSERT INTO vicidial_phone_codes (country_code, country, areacode, state, GMT_offset, DST, DST_range, geographic_description) VALUES ('1','USA','575','NM','-7','Y','SSM-FSN','');
+INSERT INTO vicidial_phone_codes (country_code, country, areacode, state, GMT_offset, DST, DST_range, geographic_description) VALUES ('1','CAN','581','QC','-5','Y','SSM-FSN','');
+INSERT INTO vicidial_phone_codes (country_code, country, areacode, state, GMT_offset, DST, DST_range, geographic_description) VALUES ('1','CAN','587','AB','-7','Y','SSM-FSN','');
+INSERT INTO vicidial_phone_codes (country_code, country, areacode, state, GMT_offset, DST, DST_range, geographic_description) VALUES ('1','USA','659','AL','-6','Y','SSM-FSN','');
+INSERT INTO vicidial_phone_codes (country_code, country, areacode, state, GMT_offset, DST, DST_range, geographic_description) VALUES ('1','USA','667','MD','-5','Y','SSM-FSN','');
+INSERT INTO vicidial_phone_codes (country_code, country, areacode, state, GMT_offset, DST, DST_range, geographic_description) VALUES ('1','USA','681','WV','-5','Y','SSM-FSN','');
+INSERT INTO vicidial_phone_codes (country_code, country, areacode, state, GMT_offset, DST, DST_range, geographic_description) VALUES ('1','USA','730','IL','-6','Y','SSM-FSN','');
+INSERT INTO vicidial_phone_codes (country_code, country, areacode, state, GMT_offset, DST, DST_range, geographic_description) VALUES ('1','DOM','829','','-4','N','','Dominican Republic');
+
+
UPDATE system_settings SET qc_last_pull_time=NOW();
-UPDATE system_settings SET db_schema_version='1107';
+UPDATE system_settings SET db_schema_version='1108';
GRANT RELOAD ON *.* TO cron@'%';
GRANT RELOAD ON *.* TO cron@localhost;
diff --git a/extras/testMULTI_VICIDIAL_lead_file.csv b/extras/testMULTI_VICIDIAL_lead_file.csv
index dd6ac25e..cccbfd2e 100644
--- a/extras/testMULTI_VICIDIAL_lead_file.csv
+++ b/extras/testMULTI_VICIDIAL_lead_file.csv
@@ -1,13 +1,14 @@
-100001,10001,129,1,7275551213,MR,I,P,FREELY01,249 MUNDON ROAD,,,MALDON,FL,,33709,USA,M,1970-01-01,7275551212,test@test.com,nothing,COMMENTS
-100002,10002,129,1,3125551213,MR,I,P,FREELY02,249 MUNDON ROAD,,,MALDON,FL,,33709,USA,M,1970-01-01,3125551212,test@test.com,nothing,COMMENTS
-100003,10003,129,1,3035551213,MR,I,P,FREELY03,249 MUNDON ROAD,,,MALDON,FL,,33709,USA,M,1970-01-01,3035551212,test@test.com,nothing,COMMENTS
-100004,10004,129,1,8585551213,MR,I,P,FREELY04,249 MUNDON ROAD,,,MALDON,FL,,33709,USA,M,1970-01-01,7275551212,test@test.com,nothing,COMMENTS
-100005,10005,129,44,7275551213,MR,I,P,FREELY05,249 MUNDON ROAD,,,MALDON,FL,,33709,USA,M,1970-01-01,7275551212,test@test.com,nothing,COMMENTS
-100006,10006,129,61,727555121,MR,I,P,FREELY06,249 MUNDON ROAD,,,MALDON,NT,,33709,USA,M,1970-01-01,7275551212,test@test.com,nothing,COMMENTS
-100007,10007,129,61,727555121,MR,I,P,FREELY07,249 MUNDON ROAD,,,MALDON,NS,,33709,USA,M,1970-01-01,7275551212,test@test.com,nothing,COMMENTS
-100008,10008,129,52,2485551213,MR,I,P,FREELY08,249 MUNDON ROAD,,,MALDON,FL,,33709,USA,M,1970-01-01,7275551212,test@test.com,nothing,COMMENTS
-100009,10009,129,1,7275551213,MR,I,P,FREELY09,249 MUNDON ROAD,,,MALDON,FL,,33709,USA,M,1970-01-01,7275551212,test@test.com,nothing,COMMENTS
-100010,10010,129,1,8585551213,MR,I,P,FREELY10,249 MUNDON ROAD,,,MALDON,FL,,33709,USA,M,1970-01-01,7275551212,test@test.com,nothing,COMMENTS
-100011,10011,129,1,3035551213,MR,I,P,FREELY11,249 MUNDON ROAD,,,MALDON,FL,,33709,USA,M,1970-01-01,3035551212,test@test.com,nothing,COMMENTS
-100012,10012,129,1,3125551213,MR,I,P,FREELY12,249 MUNDON ROAD,,,MALDON,FL,,33709,USA,M,1970-01-01,3125551212,test@test.com,nothing,COMMENTS
-100013,10013,129,1,7275551213,MR,I,P,FREELY13,249 MUNDON ROAD,,,MALDON,FL,,33709,USA,M,1970-01-01,7275551212,test@test.com,nothing,COMMENTS
+100001,10001,129,1,7275551213,MR,John,Q,Public01,249 MUNDON ROAD,,,MALDON,FL,,33709,USA,M,1970-01-01,7275551212,test@test.com,nothing,COMMENTS
+100002,10002,129,1,3125551213,MR,John,Q,Public02,249 MUNDON ROAD,,,MALDON,FL,,33709,USA,M,1970-01-01,3125551212,test@test.com,nothing,COMMENTS
+100003,10003,129,1,3035551213,MR,John,Q,Public03,249 MUNDON ROAD,,,MALDON,FL,,33709,USA,M,1970-01-01,3035551212,test@test.com,nothing,COMMENTS
+100004,10004,129,1,8585551213,MR,John,Q,Public04,249 MUNDON ROAD,,,MALDON,FL,,33709,USA,M,1970-01-01,7275551212,test@test.com,nothing,COMMENTS
+100005,10005,129,44,7275551213,MR,John,Q,Public05,249 MUNDON ROAD,,,MALDON,FL,,33709,USA,M,1970-01-01,7275551212,test@test.com,nothing,COMMENTS
+100006,10006,129,61,727555121,MR,John,Q,Public06,249 MUNDON ROAD,,,MALDON,NT,,33709,USA,M,1970-01-01,7275551212,test@test.com,nothing,COMMENTS
+100007,10007,129,61,727555121,MR,John,Q,Public07,249 MUNDON ROAD,,,MALDON,NS,,33709,USA,M,1970-01-01,7275551212,test@test.com,nothing,COMMENTS
+100008,10008,129,52,2485551213,MR,John,Q,Public08,249 MUNDON ROAD,,,MALDON,FL,,33709,USA,M,1970-01-01,7275551212,test@test.com,nothing,COMMENTS
+100009,10009,129,1,7275551213,MR,John,Q,Public09,249 MUNDON ROAD,,,MALDON,FL,,33709,USA,M,1970-01-01,7275551212,test@test.com,nothing,COMMENTS
+100010,10010,129,1,8585551213,MR,John,Q,Public10,249 MUNDON ROAD,,,MALDON,FL,,33709,USA,M,1970-01-01,7275551212,test@test.com,nothing,COMMENTS
+100011,10011,129,1,3035551213,MR,John,Q,Public11,249 MUNDON ROAD,,,MALDON,FL,,33709,USA,M,1970-01-01,3035551212,test@test.com,nothing,COMMENTS
+100012,10012,129,1,3125551213,MR,John,Q,Public12,249 MUNDON ROAD,,,MALDON,FL,,33709,USA,M,1970-01-01,3125551212,test@test.com,nothing,COMMENTS
+100013,10013,129,1,7275551213,MR,John,Q,Public13,249 MUNDON ROAD,,,MALDON,FL,,33709,USA,M,1970-01-01,7275551212,test@test.com,nothing,COMMENTS
+100014,10014,129,1,7275551213,MR,John,Q,Public14,249 MUNDON ROAD,,,MALDON,FL,,33709,USA,M,1970-01-01,7275551212,test@test.com,nothing,COMMENTS
diff --git a/extras/testMULTI_VICIDIAL_lead_file.txt b/extras/testMULTI_VICIDIAL_lead_file.txt
index a399c91c..8c1cb742 100644
--- a/extras/testMULTI_VICIDIAL_lead_file.txt
+++ b/extras/testMULTI_VICIDIAL_lead_file.txt
@@ -1,13 +1,14 @@
-100001|10001|129|1|7275551213|MR|I|P|FREELY01|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|COMMENTS
-100002|10002|129|1|3125551213|MR|I|P|FREELY02|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|3125551212|test@test.com|nothing|COMMENTS
-100003|10003|129|1|3035551213|MR|I|P|FREELY03|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|3035551212|test@test.com|nothing|COMMENTS
-100004|10004|129|1|8585551213|MR|I|P|FREELY04|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|COMMENTS
-100005|10005|129|44|7275551213|MR|I|P|FREELY05|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|COMMENTS
-100006|10006|129|61|727555121|MR|I|P|FREELY06|249 MUNDON ROAD|||MALDON|NT||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|COMMENTS
-100007|10007|129|61|727555121|MR|I|P|FREELY07|249 MUNDON ROAD|||MALDON|NS||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|COMMENTS
-100008|10008|129|52|2485551213|MR|I|P|FREELY08|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|COMMENTS
-100009|10009|129|1|7275551213|MR|I|P|FREELY09|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|COMMENTS
-100010|10010|129|1|8585551213|MR|I|P|FREELY10|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|COMMENTS
-100011|10011|129|1|3035551213|MR|I|P|FREELY11|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|3035551212|test@test.com|nothing|COMMENTS
-100012|10012|129|1|3125551213|MR|I|P|FREELY12|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|3125551212|test@test.com|nothing|COMMENTS
-100013|10013|129|1|7275551213|MR|I|P|FREELY13|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|COMMENTS
+100001|10001|129|1|7275551213|MR|John|Q|Public01|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|COMMENTS
+100002|10002|129|1|3125551213|MR|John|Q|Public02|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|3125551212|test@test.com|nothing|COMMENTS
+100003|10003|129|1|3035551213|MR|John|Q|Public03|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|3035551212|test@test.com|nothing|COMMENTS
+100004|10004|129|1|8585551213|MR|John|Q|Public04|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|COMMENTS
+100005|10005|129|44|7275551213|MR|John|Q|Public05|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|COMMENTS
+100006|10006|129|61|727555121|MR|John|Q|Public06|249 MUNDON ROAD|||MALDON|NT||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|COMMENTS
+100007|10007|129|61|727555121|MR|John|Q|Public07|249 MUNDON ROAD|||MALDON|NS||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|COMMENTS
+100008|10008|129|52|2485551213|MR|John|Q|Public08|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|COMMENTS
+100009|10009|129|1|7275551213|MR|John|Q|Public09|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|COMMENTS
+100010|10010|129|1|8585551213|MR|John|Q|Public10|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|COMMENTS
+100011|10011|129|1|3035551213|MR|John|Q|Public11|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|3035551212|test@test.com|nothing|COMMENTS
+100012|10012|129|1|3125551213|MR|John|Q|Public12|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|3125551212|test@test.com|nothing|COMMENTS
+100013|10013|129|1|7275551213|MR|John|Q|Public13|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|COMMENTS
+100014|10014|129|1|7275551213|MR|John|Q|Public14|249 MUNDON ROAD|||MALDON|FL||33709|USA|M|1970-01-01|7275551212|test@test.com|nothing|COMMENTS
diff --git a/extras/upgrade_2.0.5.sql b/extras/upgrade_2.0.5.sql
index ad9fd0b2..bd26640d 100644
--- a/extras/upgrade_2.0.5.sql
+++ b/extras/upgrade_2.0.5.sql
@@ -458,3 +458,21 @@ ALTER TABLE vicidial_users ADD modify_inbound_dids ENUM('1','0') default '0';
ALTER TABLE vicidial_users ADD delete_inbound_dids ENUM('1','0') default '0';
UPDATE system_settings SET db_schema_version='1107';
+
+ALTER TABLE vicidial_campaigns ADD three_way_call_cid ENUM('CAMPAIGN','CUSTOMER','AGENT_PHONE') default 'CAMPAIGN';
+
+INSERT INTO vicidial_phone_codes (country_code, country, areacode, state, GMT_offset, DST, DST_range, geographic_description) VALUES ('1','USA','227','MD','-5','Y','SSM-FSN','');
+INSERT INTO vicidial_phone_codes (country_code, country, areacode, state, GMT_offset, DST, DST_range, geographic_description) VALUES ('1','CAN','343','ON','-5','Y','SSM-FSN','');
+INSERT INTO vicidial_phone_codes (country_code, country, areacode, state, GMT_offset, DST, DST_range, geographic_description) VALUES ('1','USA','364','KY','-6','Y','SSM-FSN','');
+INSERT INTO vicidial_phone_codes (country_code, country, areacode, state, GMT_offset, DST, DST_range, geographic_description) VALUES ('1','USA','447','IL','-6','Y','SSM-FSN','');
+INSERT INTO vicidial_phone_codes (country_code, country, areacode, state, GMT_offset, DST, DST_range, geographic_description) VALUES ('1','USA','575','NM','-7','Y','SSM-FSN','');
+INSERT INTO vicidial_phone_codes (country_code, country, areacode, state, GMT_offset, DST, DST_range, geographic_description) VALUES ('1','CAN','581','QC','-5','Y','SSM-FSN','');
+INSERT INTO vicidial_phone_codes (country_code, country, areacode, state, GMT_offset, DST, DST_range, geographic_description) VALUES ('1','CAN','587','AB','-7','Y','SSM-FSN','');
+INSERT INTO vicidial_phone_codes (country_code, country, areacode, state, GMT_offset, DST, DST_range, geographic_description) VALUES ('1','USA','659','AL','-6','Y','SSM-FSN','');
+INSERT INTO vicidial_phone_codes (country_code, country, areacode, state, GMT_offset, DST, DST_range, geographic_description) VALUES ('1','USA','667','MD','-5','Y','SSM-FSN','');
+INSERT INTO vicidial_phone_codes (country_code, country, areacode, state, GMT_offset, DST, DST_range, geographic_description) VALUES ('1','USA','681','WV','-5','Y','SSM-FSN','');
+INSERT INTO vicidial_phone_codes (country_code, country, areacode, state, GMT_offset, DST, DST_range, geographic_description) VALUES ('1','USA','730','IL','-6','Y','SSM-FSN','');
+INSERT INTO vicidial_phone_codes (country_code, country, areacode, state, GMT_offset, DST, DST_range, geographic_description) VALUES ('1','DOM','829','','-4','N','','Dominican Republic');
+
+UPDATE system_settings SET db_schema_version='1108';
+
diff --git a/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.5.txt b/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.5.txt
index 1aca96a8..a48a34c6 100644
--- a/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.5.txt
+++ b/translations/raw_translation_files/TO_BE_TRANSLATED_2.0.5.txt
@@ -330,6 +330,8 @@ DID DELETION COMPLETED||
Delete DIDs: ||
Modify DIDs: ||
To disable the On Hold Prompt, set the interval to 0||
+3-Way Call Outbound CallerID -<\/B> This defines what is sent out as the outbound callerID number from 3-way calls placed by the agent, CAMPAIGN uses the custom campaign callerID, CUSTOMER uses the number of the customer that is active on the agents screen and AGENT_PHONE uses the callerID for the phone that the agent is logged into||
+3-Way Call Outbound CallerID:||
############################################################ CLIENT
diff --git a/www/agc/manager_send.php b/www/agc/manager_send.php
index 5c002ef4..d1fb4402 100644
--- a/www/agc/manager_send.php
+++ b/www/agc/manager_send.php
@@ -632,13 +632,18 @@ if ($ACTION=="RedirectNameVmail")
}
}
-if ($ACTION=="RedirectXtraCX")
+
+
+
+
+
+if ($ACTION=="RedirectXtraCXNeW")
{
$DBout='';
$row=''; $rowx='';
$channel_liveX=1;
$channel_liveY=1;
- if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($extrachannel)<3) )
+ if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($session_id)<3) or ( ( (strlen($extrachannel)<3) or (strlen($exten)<1) ) and (!ereg("NEXTAVAILABLE",$exten)) ) )
{
$channel_liveX=0;
$channel_liveY=0;
@@ -662,6 +667,54 @@ if ($ACTION=="RedirectXtraCX")
}
else
{
+ if (ereg("NEXTAVAILABLE",$exten))
+ {
+ $stmt="SELECT count(*) FROM vicidial_conferences where server_ip='$server_ip' and ((extension='') or (extension is null)) and conf_exten != '$session_id';";
+ if ($format=='debug') {echo "\n";}
+ $rslt=mysql_query($stmt, $link);
+ $row=mysql_fetch_row($rslt);
+ if ($row[0] > 1)
+ {
+ $stmt="UPDATE vicidial_conferences set extension='$protocol/$extension$NOWnum', leave_3way='0' where server_ip='$server_ip' and ((extension='') or (extension is null)) and conf_exten != '$session_id' limit 1;";
+ if ($format=='debug') {echo "\n";}
+ $rslt=mysql_query($stmt, $link);
+
+ $stmt="SELECT conf_exten from vicidial_conferences where server_ip='$server_ip' and extension='$protocol/$extension$NOWnum' and conf_exten != '$session_id';";
+ if ($format=='debug') {echo "\n";}
+ $rslt=mysql_query($stmt, $link);
+ $row=mysql_fetch_row($rslt);
+ $exten = $row[0];
+
+ $stmt="UPDATE vicidial_conferences set extension='$protocol/$extension' where server_ip='$server_ip' and conf_exten='$exten' limit 1;";
+ if ($format=='debug') {echo "\n";}
+ $rslt=mysql_query($stmt, $link);
+
+ $stmt="UPDATE vicidial_conferences set leave_3way='1', leave_3way_datetime='$NOW_TIME', extension='3WAY_$user' where server_ip='$server_ip' and conf_exten='$session_id';";
+ if ($format=='debug') {echo "\n";}
+ $rslt=mysql_query($stmt, $link);
+
+ $queryCID = "CXAR24$NOWnum";
+ $stmtB="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $agentchannel','Context: $ext_context','Exten: $exten','Priority: 1','CallerID: $queryCID','','','','','');";
+ if ($format=='debug') {echo "\n";}
+ $rslt=mysql_query($stmtB, $link);
+
+ $stmt="UPDATE vicidial_live_agents set conf_exten='$exten' where server_ip='$server_ip' and user='$user';";
+ if ($format=='debug') {echo "\n";}
+ $rslt=mysql_query($stmt, $link);
+
+ echo "NeWSessioN|$exten|\n";
+ echo "|$stmtB|\n";
+
+ exit;
+ }
+ else
+ {
+ $channel_liveX=0;
+ echo "Cannot find empty vicidial_conference on $server_ip, Redirect command not inserted\n|$stmt|";
+ if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "Cannot find empty conference on $server_ip";}
+ }
+ }
+
if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;}
$stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';";
@@ -960,9 +1013,143 @@ if ($ACTION=="RedirectXtraNeW")
+if ($ACTION=="RedirectXtraCX")
+{
+ $DBout='';
+ $row=''; $rowx='';
+ $channel_liveX=1;
+ $channel_liveY=1;
+ if ( (strlen($channel)<3) or (strlen($queryCID)<15) or (strlen($exten)<1) or (strlen($ext_context)<1) or (strlen($ext_priority)<1) or (strlen($extrachannel)<3) )
+ {
+ $channel_liveX=0;
+ $channel_liveY=0;
+ echo "One of these variables is not valid:\n";
+ echo "Channel $channel must be greater than 2 characters\n";
+ echo "ExtraChannel $extrachannel must be greater than 2 characters\n";
+ echo "queryCID $queryCID must be greater than 14 characters\n";
+ echo "exten $exten must be set\n";
+ echo "ext_context $ext_context must be set\n";
+ echo "ext_priority $ext_priority must be set\n";
+ echo "\nRedirect Action not sent\n";
+ if (ereg("SECOND|FIRST|DEBUG",$filename))
+ {
+ if ($WeBRooTWritablE > 0)
+ {
+ $fp = fopen ("./vicidial_debug.txt", "a");
+ fwrite ($fp, "$NOW_TIME|RDCXC|$filename|$user|$campaign|$channel|$extrachannel|$queryCID|$exten|$ext_context|ext_priority|\n");
+ fclose($fp);
+ }
+ }
+ }
+ else
+ {
+ if (strlen($call_server_ip)<7) {$call_server_ip = $server_ip;}
+
+ $stmt="SELECT count(*) FROM live_channels where server_ip = '$call_server_ip' and channel='$channel';";
+ if ($format=='debug') {echo "\n";}
+ $rslt=mysql_query($stmt, $link);
+ $row=mysql_fetch_row($rslt);
+ if ($row[0]==0)
+ {
+ $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$call_server_ip' and channel='$channel';";
+ if ($format=='debug') {echo "\n";}
+ $rslt=mysql_query($stmt, $link);
+ $rowx=mysql_fetch_row($rslt);
+ if ($rowx[0]==0)
+ {
+ $channel_liveX=0;
+ echo "Channel $channel is not live on $call_server_ip, Redirect command not inserted\n";
+ if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel is not live on $call_server_ip";}
+ }
+ }
+ $stmt="SELECT count(*) FROM live_channels where server_ip = '$server_ip' and channel='$extrachannel';";
+ if ($format=='debug') {echo "\n";}
+ $rslt=mysql_query($stmt, $link);
+ $row=mysql_fetch_row($rslt);
+ if ($row[0]==0)
+ {
+ $stmt="SELECT count(*) FROM live_sip_channels where server_ip = '$server_ip' and channel='$extrachannel';";
+ if ($format=='debug') {echo "\n";}
+ $rslt=mysql_query($stmt, $link);
+ $rowx=mysql_fetch_row($rslt);
+ if ($rowx[0]==0)
+ {
+ $channel_liveY=0;
+ echo "Channel $channel is not live on $server_ip, Redirect command not inserted\n";
+ if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel is not live on $server_ip";}
+ }
+ }
+ if ( ($channel_liveX==1) && ($channel_liveY==1) )
+ {
+ $stmt="SELECT count(*) FROM vicidial_live_agents where lead_id='$lead_id' and user!='$user';";
+ if ($format=='debug') {echo "\n";}
+ $rslt=mysql_query($stmt, $link);
+ $rowx=mysql_fetch_row($rslt);
+ if ($rowx[0] < 1)
+ {
+ $channel_liveY=0;
+ echo "No Local agent to send call to, Redirect command not inserted\n";
+ if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "No Local agent to send call to";}
+ }
+ else
+ {
+ $stmt="SELECT server_ip,conf_exten,user FROM vicidial_live_agents where lead_id='$lead_id' and user!='$user';";
+ if ($format=='debug') {echo "\n";}
+ $rslt=mysql_query($stmt, $link);
+ $rowx=mysql_fetch_row($rslt);
+ $dest_server_ip = $rowx[0];
+ $dest_session_id = $rowx[1];
+ $dest_user = $rowx[2];
+ $S='*';
+
+ $D_s_ip = explode('.', $dest_server_ip);
+ if (strlen($D_s_ip[0])<2) {$D_s_ip[0] = "0$D_s_ip[0]";}
+ if (strlen($D_s_ip[0])<3) {$D_s_ip[0] = "0$D_s_ip[0]";}
+ if (strlen($D_s_ip[1])<2) {$D_s_ip[1] = "0$D_s_ip[1]";}
+ if (strlen($D_s_ip[1])<3) {$D_s_ip[1] = "0$D_s_ip[1]";}
+ if (strlen($D_s_ip[2])<2) {$D_s_ip[2] = "0$D_s_ip[2]";}
+ if (strlen($D_s_ip[2])<3) {$D_s_ip[2] = "0$D_s_ip[2]";}
+ if (strlen($D_s_ip[3])<2) {$D_s_ip[3] = "0$D_s_ip[3]";}
+ if (strlen($D_s_ip[3])<3) {$D_s_ip[3] = "0$D_s_ip[3]";}
+ $dest_dialstring = "$D_s_ip[0]$S$D_s_ip[1]$S$D_s_ip[2]$S$D_s_ip[3]$S$dest_session_id$S$lead_id$S$dest_user$S$phone_code$S$phone_number$S$campaign$S";
+
+ $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$call_server_ip','','Redirect','$queryCID','Channel: $channel','Context: $ext_context','Exten: $dest_dialstring','Priority: $ext_priority','CallerID: $queryCID','','','','','');";
+ if ($format=='debug') {echo "\n";}
+ $rslt=mysql_query($stmt, $link);
+
+ $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','$queryCID','Channel: $extrachannel','','','','','','','','','');";
+ if ($format=='debug') {echo "\n";}
+ $rslt=mysql_query($stmt, $link);
+
+ echo "RedirectXtraCX command sent for Channel $channel on $call_server_ip and \nHungup $extrachannel on $server_ip\n";
+ if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "$channel on $call_server_ip, Hungup $extrachannel on $server_ip";}
+ }
+ }
+ else
+ {
+ if ($channel_liveX==1)
+ {$ACTION="Redirect"; $server_ip = $call_server_ip;}
+ if ($channel_liveY==1)
+ {$ACTION="Redirect"; $channel=$extrachannel;}
+ if (ereg("SECOND|FIRST|DEBUG",$filename)) {$DBout .= "Changed to Redirect: $channel on $server_ip";}
+ }
+
+ if (ereg("SECOND|FIRST|DEBUG",$filename))
+ {
+ if ($WeBRooTWritablE > 0)
+ {
+ $fp = fopen ("./vicidial_debug.txt", "a");
+ fwrite ($fp, "$NOW_TIME|RDCXC|$filename|$user|$campaign|$DBout|\n");
+ fclose($fp);
+ }
+ }
+
+ }
+}
+###### BEGIN OLD LEAVE-3-WAY FOR EXTERNAL CALLS - DEPRICATED AND WILL BE DELETED SOON #####
if ($ACTION=="RedirectXtra")
{
if ($channel=="$extrachannel")
@@ -1112,6 +1299,7 @@ if ($ACTION=="RedirectXtra")
}
}
}
+###### END OLD LEAVE-3-WAY FOR EXTERNAL CALLS - DEPRICATED AND WILL BE DELETED SOON #####
if ($ACTION=="Redirect")
@@ -1341,13 +1529,15 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") )
}
}
}
+
+ ##### StopMonitorConf steps #####
else
{
if ($uniqueid=='IN')
{
$four_hours_ago = date("Y-m-d H:i:s", mktime(date("H")-4,date("i"),date("s"),date("m"),date("d"),date("Y")));
- ### check to see if lead should be alt_dialed
+ ### find the value to put in the vicidial_id field if this was an inbound call
$stmt="SELECT closecallid from vicidial_closer_log where lead_id='$lead_id' and call_date > \"$four_hours_ago\" order by call_date desc limit 1;";
$rslt=mysql_query($stmt, $link);
$VAC_qm_ct = mysql_num_rows($rslt);
diff --git a/www/agc/vdc_db_query.php b/www/agc/vdc_db_query.php
index d018b261..12465f2f 100644
--- a/www/agc/vdc_db_query.php
+++ b/www/agc/vdc_db_query.php
@@ -73,7 +73,10 @@
# - $LogouTKicKAlL - ('0','1');
# - $closer_blended = ('0','1');
# - $inOUT = ('IN','OUT');
-# - $manual_dial_filter = ('NONE','CAMPLISTS','DNC','CAMPLISTS_DNC');
+# - $manual_dial_filter = ('NONE','CAMPLISTS','DNC','CAMPLISTS_DNC')
+# - $agentchannel = ('Zap/1-1','SIP/testing-6ry4i3',...)
+# - $conf_dialed = ('0','1')
+# - $leaving_threeway = ('0','1')
# CHANGELOG:
# 50629-1044 - First build of script
@@ -161,10 +164,11 @@
# 80815-1019 - Added manual dial list restriction option
# 80831-0545 - Added extended alt dial number info display support
# 80909-1710 - Added support for campaign-specific DNC lists
+# 81010-1048 - Added support for hangup of all channels except for agent channel after attempting a 3way call
#
-$version = '2.0.5-82';
-$build = '80909-1710';
+$version = '2.0.5-83';
+$build = '81010-1048';
require("dbconnect.php");
@@ -309,6 +313,12 @@ if (isset($_GET["manual_dial_filter"])) {$manual_dial_filter=$_GET["manual_di
elseif (isset($_POST["manual_dial_filter"])) {$manual_dial_filter=$_POST["manual_dial_filter"];}
if (isset($_GET["alt_dial"])) {$alt_dial=$_GET["alt_dial"];}
elseif (isset($_POST["alt_dial"])) {$alt_dial=$_POST["alt_dial"];}
+if (isset($_GET["agentchannel"])) {$agentchannel=$_GET["agentchannel"];}
+ elseif (isset($_POST["agentchannel"])) {$agentchannel=$_POST["agentchannel"];}
+if (isset($_GET["conf_dialed"])) {$conf_dialed=$_GET["conf_dialed"];}
+ elseif (isset($_POST["conf_dialed"])) {$conf_dialed=$_POST["conf_dialed"];}
+if (isset($_GET["leaving_threeway"])) {$leaving_threeway=$_GET["leaving_threeway"];}
+ elseif (isset($_POST["leaving_threeway"])) {$leaving_threeway=$_POST["leaving_threeway"];}
header ("Content-type: text/html; charset=utf-8");
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
@@ -1328,7 +1338,7 @@ if ($stage == "end")
else
{
##### look for the start epoch in the vicidial_log table
- $stmt="SELECT start_epoch,term_reason,uniqueid FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';";
+ $stmt="SELECT start_epoch,term_reason,uniqueid FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id' order by call_date desc limit 1;";
$VDIDselect = "VDL_UIDLID $uniqueid $lead_id";
}
$rslt=mysql_query($stmt, $link);
@@ -1354,7 +1364,7 @@ if ($stage == "end")
fclose($fp);
##### start epoch in the vicidial_log table, couldn't find one in vicidial_closer_log
- $stmt="SELECT start_epoch,term_reason FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';";
+ $stmt="SELECT start_epoch,term_reason FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id' order by call_date desc limit 1;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$VM_mancall_ct = mysql_num_rows($rslt);
@@ -1650,7 +1660,7 @@ if ($stage == "end")
if ($enable_queuemetrics_logging > 0)
{
### grab call lead information needed for QM logging
- $stmt="SELECT auto_call_id,lead_id,phone_number,status,campaign_id,phone_code,alt_dial,stage,callerid,uniqueid from vicidial_auto_calls where lead_id='$lead_id';";
+ $stmt="SELECT auto_call_id,lead_id,phone_number,status,campaign_id,phone_code,alt_dial,stage,callerid,uniqueid from vicidial_auto_calls where lead_id='$lead_id' order by call_time desc limit 1;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$VAC_qm_ct = mysql_num_rows($rslt);
@@ -1703,6 +1713,9 @@ if ($stage == "end")
$stmt = "DELETE from vicidial_auto_calls where lead_id='$lead_id' and campaign_id='$campaign' and uniqueid='$uniqueid';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
+ $fp = fopen ("./vicidial_debug_drop.txt", "a");
+ fwrite ($fp, "$NOW_TIME|LOG_3|$uniqueid|$lead_id|$user|$inOUT|$VLA_inOUT|$length_in_sec|$VDterm_reason|$VDvicidial_id|$vicidial_id|$start_epoch|$recording_id|$stmt|\n");
+ fclose($fp);
$stmt = "UPDATE vicidial_live_agents set status='PAUSED',uniqueid=0,callerid='',channel='',call_server_ip='',last_call_finish='$NOW_TIME',comments='' where user='$user' and server_ip='$server_ip';";
if ($DB) {echo "$stmt\n";}
@@ -1724,7 +1737,7 @@ if ($stage == "end")
if ($enable_queuemetrics_logging > 0)
{
### check to see if lead should be alt_dialed
- $stmt="SELECT auto_call_id,lead_id,phone_number,status,campaign_id,phone_code,alt_dial,stage,callerid,uniqueid from vicidial_auto_calls where lead_id='$lead_id';";
+ $stmt="SELECT auto_call_id,lead_id,phone_number,status,campaign_id,phone_code,alt_dial,stage,callerid,uniqueid from vicidial_auto_calls where lead_id='$lead_id' order by call_time desc limit 1;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$VAC_qm_ct = mysql_num_rows($rslt);
@@ -1859,6 +1872,7 @@ if ($stage == "end")
$local_DEF = 'Local/';
$local_AMP = '@';
$total_rec=0;
+ $total_hangup=0;
$loop_count=0;
$stmt="SELECT channel FROM live_sip_channels where server_ip = '$server_ip' and extension = '$conf_exten' order by channel desc;";
if ($format=='debug') {echo "\n";}
@@ -1872,10 +1886,39 @@ if ($stage == "end")
$rec_channels[$total_rec] = "$row[0]";
$total_rec++;
}
+ else
+ {
+ # if (preg_match("/$agentchannel/i",$row[0]))
+ if ($agentchannel == "$row[0]")
+ {
+ $donothing=1;
+ }
+ else
+ {
+ $hangup_channels[$total_hangup] = "$row[0]";
+ $total_hangup++;
+ }
+ }
if ($format=='debug') {echo "\n";}
$loop_count++;
}
+ ### if a conference call or 3way call was attempted, then hangup all channels except for the agentchannel
+ if ( ($conf_dialed > 0) and ($leaving_threeway < 1) )
+ {
+ $loop_count=0;
+ while($loop_count < $total_hangup)
+ {
+ if (strlen($hangup_channels[$loop_count])>5)
+ {
+ $stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','CH12346$StarTtime$loop_count','Channel: $hangup_channels[$loop_count]','','','','','','','','','');";
+ if ($format=='debug') {echo "\n";}
+ $rslt=mysql_query($stmt, $link);
+ }
+ $loop_count++;
+ }
+ }
+
$total_recFN=0;
$loop_count=0;
$filename=$MT; # not necessary : and cmd_line_f LIKE \"%_$user_abb\"
diff --git a/www/agc/vicidial.php b/www/agc/vicidial.php
index 82aa8d12..ed246814 100644
--- a/www/agc/vicidial.php
+++ b/www/agc/vicidial.php
@@ -191,10 +191,12 @@
# 80909-1717 - Added support for campaign-specific DNC lists
# 80915-1754 - Rewrote leave-3way functions for external calling
# 81002-1908 - Fixed double-login bug in some conditions
+# 81007-0945 - Added three_way_call_cid option for outbound 3way calls
+# 81010-1047 - Fixed conf calling prefix to use settings, other 3way improvements
#
-$version = '2.0.5-169';
-$build = '81002-1908';
+$version = '2.0.5-171';
+$build = '81010-1047';
require("dbconnect.php");
@@ -794,7 +796,7 @@ $VDloginDISPLAY=0;
$HKstatusnames = substr("$HKstatusnames", 0, -1);
##### grab the campaign settings
- $stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,use_campaign_dnc FROM vicidial_campaigns where campaign_id = '$VD_campaign';";
+ $stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,use_campaign_dnc,three_way_call_cid FROM vicidial_campaigns where campaign_id = '$VD_campaign';";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$row=mysql_fetch_row($rslt);
@@ -836,7 +838,7 @@ $VDloginDISPLAY=0;
$manual_dial_filter = $row[35];
$CopY_tO_ClipboarD = $row[36];
$use_campaign_dnc = $row[37];
-
+ $three_way_call_cid = $row[38];
if ( (!ereg('DISABLED',$VU_vicidial_recording_override)) and ($VU_vicidial_recording > 0) )
{
@@ -1194,6 +1196,7 @@ else
$DBX_user=$row[57];
$DBX_pass=$row[58];
$DBX_port=$row[59];
+ $outbound_cid=$row[65];
$enable_sipsak_messages=$row[66];
if ($PhoneSComPIP == '1')
@@ -1962,6 +1965,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var wrapup_waiting = 0;
var use_internal_dnc = ' echo $use_internal_dnc ?>';
var use_campaign_dnc = ' echo $use_campaign_dnc ?>';
+ var three_way_call_cid = ' echo $three_way_call_cid ?>';
+ var outbound_cid = ' echo $outbound_cid ?>';
+ var threeway_cid = '';
var allcalls_delay = ' echo $allcalls_delay ?>';
var omit_phone_code = ' echo $omit_phone_code ?>';
var no_delete_sessions = ' echo $no_delete_sessions ?>';
@@ -2003,6 +2009,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var random = ' echo $random ?>';
var threeway_end = 0;
var agentphonelive = 0;
+ var conf_dialed = 0;
+ var leaving_threeway = 0;
var DiaLControl_auto_HTML = "
";
var DiaLControl_auto_HTML_ready = "
";
var DiaLControl_auto_HTML_OFF = "
";
@@ -2169,6 +2177,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
// park customer and place 3way call
function xfer_park_dial()
{
+ conf_dialed=1;
+
mainxfer_send_redirect('ParK',lastcustchannel,lastcustserverip);
SendManualDial('YES');
@@ -2179,6 +2189,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
function leave_3way_call(tempvarattempt)
{
threeway_end=0;
+ leaving_threeway=1;
mainxfer_send_redirect('3WAY','','',tempvarattempt);
@@ -2199,11 +2210,19 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
// filter manual dialstring and pass on to originate call
function SendManualDial(taskFromConf)
{
+ conf_dialed=1;
if (taskFromConf == 'YES')
{
var manual_number = document.vicidial_form.xfernumber.value;
var manual_string = manual_number.toString();
var dial_conf_exten = session_id;
+ threeway_cid = '';
+ if (three_way_call_cid == 'CAMPAIGN')
+ {threeway_cid = campaign_cid;}
+ if (three_way_call_cid == 'AGENT_PHONE')
+ {threeway_cid = outbound_cid;}
+ if (three_way_call_cid == 'CUSTOMER')
+ {threeway_cid = document.vicidial_form.phone_number.value;}
}
else
{
@@ -2219,22 +2238,17 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
if (document.vicidial_form.xferoverride.checked==false)
{
- if (manual_string.length=='11')
- {manual_string = "9" + manual_string;}
- else
- {
- if (manual_string.length=='10')
- {manual_string = "91" + manual_string;}
- else
- {
- if (manual_string.length=='7')
- {manual_string = "9" + manual_string;}
- }
- }
+ if (dial_prefix == 'X') {var temp_dial_prefix = '';}
+ else {var temp_dial_prefix = dial_prefix;}
+ if (omit_phone_code == 'Y') {var temp_phone_code = '';}
+ else {var temp_phone_code = document.vicidial_form.phone_code.value;}
+
+ if (manual_string.length > 9)
+ {manual_string = temp_dial_prefix + "" + temp_phone_code + "" + manual_string;}
}
}
if (taskFromConf == 'YES')
- {basic_originate_call(manual_string,'NO','YES',dial_conf_exten,'NO',taskFromConf);}
+ {basic_originate_call(manual_string,'NO','YES',dial_conf_exten,'NO',taskFromConf,threeway_cid);}
else
{basic_originate_call(manual_string,'NO','NO');}
@@ -2243,7 +2257,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
// ################################################################################
// Send Originate command to manager to place a phone call
- function basic_originate_call(tasknum,taskprefix,taskreverse,taskdialvalue,tasknowait,taskconfxfer)
+ function basic_originate_call(tasknum,taskprefix,taskreverse,taskdialvalue,tasknowait,taskconfxfer,taskcid)
{
var regCXFvars = new RegExp("CXFER","g");
var tasknum_string = tasknum.toString();
@@ -2325,8 +2339,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{var queryCID = "DCagcW" + epoch_sec + user_abb;}
else
{var queryCID = "DVagcW" + epoch_sec + user_abb;}
+ if (taskcid.length > 3)
+ {var call_cid = taskcid;}
+ else
+ {var call_cid = campaign_cid;}
- VMCoriginate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Originate&format=text&channel=" + originatevalue + "&queryCID=" + queryCID + "&exten=" + orig_prefix + "" + dialnum + "&ext_context=" + ext_context + "&ext_priority=1&outbound_cid=" + campaign_cid;
+ VMCoriginate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Originate&format=text&channel=" + originatevalue + "&queryCID=" + queryCID + "&exten=" + orig_prefix + "" + dialnum + "&ext_context=" + ext_context + "&ext_priority=1&outbound_cid=" + call_cid;
xmlhttp.open('POST', 'manager_send.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(VMCoriginate_query);
@@ -2792,6 +2810,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
// Covers the following types: XFER, VMAIL, ENTRY, CONF, PARK, FROMPARK, XfeRLOCAL, XfeRINTERNAL, XfeRBLIND, VfeRVMAIL
function mainxfer_send_redirect(taskvar,taskxferconf,taskserverip,taskdebugnote)
{
+ conf_dialed=1;
if (auto_dial_level == 0) {RedirecTxFEr = 1;}
var xmlhttpXF=false;
/*@cc_on @*/
@@ -2841,18 +2860,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
{
if (document.vicidial_form.xferoverride.checked==false)
{
- if (blindxferdialstring.length=='11')
- {blindxferdialstring = dial_prefix + "" + blindxferdialstring;}
- else
- {
- if (blindxferdialstring.length=='10')
- {blindxferdialstring = dial_prefix + "1" + blindxferdialstring;}
- else
- {
- if (blindxferdialstring.length=='7')
- {blindxferdialstring = dial_prefix + "" + blindxferdialstring;}
- }
- }
+ if (dial_prefix == 'X') {var temp_dial_prefix = '';}
+ else {var temp_dial_prefix = dial_prefix;}
+ if (omit_phone_code == 'Y') {var temp_phone_code = '';}
+ else {var temp_phone_code = document.vicidial_form.phone_code.value;}
+
+ if (blindxferdialstring.length > 9)
+ {blindxferdialstring = temp_dial_prefix + "" + temp_phone_code + "" + blindxferdialstring;}
}
}
if (taskvar == 'XfeRVMAIL')
@@ -2915,7 +2929,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var XfeRSelecT = document.getElementById("XfeRGrouP");
var regRXFvars = new RegExp("CXFER","g");
if ( (redirecttype_test.match(regRXFvars)) && (local_consult_xfers > 0) )
- {var redirecttype = 'RedirectXtraCX';}
+ // {var redirecttype = 'RedirectXtraCX';}
+ {var redirecttype = 'RedirectXtraCXNeW';}
else
// {var redirecttype = 'RedirectXtra';}
{var redirecttype = 'RedirectXtraNeW';}
@@ -3117,7 +3132,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
"&list_id=" + document.vicidial_form.list_id.value +
"&length_in_sec=0&phone_code=" + document.vicidial_form.phone_code.value +
"&phone_number=" + lead_dial_number +
- "&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id + "&MDnextCID=" + LasTCID + "&inOUT=" + inOUT + "&alt_dial=" + dialed_label + "&DB=0";
+ "&exten=" + extension + "&channel=" + lastcustchannel + "&start_epoch=" + MDlogEPOCH + "&auto_dial_level=" + auto_dial_level + "&VDstop_rec_after_each_call=" + VDstop_rec_after_each_call + "&conf_silent_prefix=" + conf_silent_prefix + "&protocol=" + protocol + "&extension=" + extension + "&ext_context=" + ext_context + "&conf_exten=" + session_id + "&user_abb=" + user_abb + "&agent_log_id=" + agent_log_id + "&MDnextCID=" + LasTCID + "&inOUT=" + inOUT + "&alt_dial=" + dialed_label + "&DB=0" + "&agentchannel=" + agentchannel + "&conf_dialed=" + conf_dialed + "&leaving_threeway=" + leaving_threeway;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
// document.getElementById("busycallsdebug").innerHTML = "vdc_db_query.php?" + manDiaLlog_query;
@@ -3169,6 +3184,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
delete xmlhttp;
}
RedirecTxFEr=0;
+ conf_dialed=0;
+ leaving_threeway=0;
}
@@ -4849,6 +4866,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
// UPDATE VICIDIAL_LOG ENTRY FOR THIS CALL PROCESS
DialLog("end");
+ conf_dialed=0;
if (dispowindow == 'NO')
{
open_dispo_screen=0;
diff --git a/www/vicidial/AST_timeonVDADall.php b/www/vicidial/AST_timeonVDADall.php
index 34dd23a8..30c73681 100644
--- a/www/vicidial/AST_timeonVDADall.php
+++ b/www/vicidial/AST_timeonVDADall.php
@@ -891,8 +891,17 @@ $calls_to_list = mysql_num_rows($rslt);
$stmt="select login from phones where server_ip='$Aserver_ip[$i]' and $exten and protocol='$protocol';";
$rslt=mysql_query($stmt, $link);
- $row=mysql_fetch_row($rslt);
- $Alogin[$i] = "$row[0]-----$i";
+ if ($DB) {echo "$stmt\n";}
+ $phones_to_print = mysql_num_rows($rslt);
+ if ($phones_to_print > 0)
+ {
+ $row=mysql_fetch_row($rslt);
+ $Alogin[$i] = "$row[0]-----$i";
+ }
+ else
+ {
+ $Alogin[$i] = "$Aextension[$i]-----$i";
+ }
$i++;
}
diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php
index dd8ef706..61c49752 100644
--- a/www/vicidial/admin.php
+++ b/www/vicidial/admin.php
@@ -843,6 +843,8 @@ if (isset($_GET["modify_inbound_dids"])) {$modify_inbound_dids=$_GET["modify_i
elseif (isset($_POST["modify_inbound_dids"])) {$modify_inbound_dids=$_POST["modify_inbound_dids"];}
if (isset($_GET["delete_inbound_dids"])) {$delete_inbound_dids=$_GET["delete_inbound_dids"];}
elseif (isset($_POST["delete_inbound_dids"])) {$delete_inbound_dids=$_POST["delete_inbound_dids"];}
+if (isset($_GET["three_way_call_cid"])) {$three_way_call_cid=$_GET["three_way_call_cid"];}
+ elseif (isset($_POST["three_way_call_cid"])) {$three_way_call_cid=$_POST["three_way_call_cid"];}
if (isset($script_id)) {$script_id= strtoupper($script_id);}
@@ -1202,6 +1204,7 @@ $agent_search_method = ereg_replace("[^-\_0-9a-zA-Z]","",$agent_search_method);
$hold_time_option_voicemail = ereg_replace("[^-\_0-9a-zA-Z]","",$hold_time_option_voicemail);
$hold_time_option_callback_filename = ereg_replace("[^-\_0-9a-zA-Z]","",$hold_time_option_callback_filename);
$exten_context = ereg_replace("[^-\_0-9a-zA-Z]","",$exten_context);
+$three_way_call_cid = ereg_replace("[^-\_0-9a-zA-Z]","",$three_way_call_cid);
### ALPHA-NUMERIC and underscore and dash and comma
$logins_list = ereg_replace("[^-\,\_0-9a-zA-Z]","",$logins_list);
@@ -1454,11 +1457,12 @@ $survey_camp_record_dir = ereg_replace(";","",$survey_camp_record_dir);
# 80831-0406 - Added agent screen extended alt-dial option to campaigns
# 80909-0553 - Added campaign-specific DNC list option and add
# 81002-1101 - Added more in-group options and new DID section and user options
+# 81007-0936 - Added three_way_call_cid option to campaigns
#
# make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time
-$admin_version = '2.0.5-143';
-$build = '81002-1101';
+$admin_version = '2.0.5-144';
+$build = '81007-0936';
$STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s");
@@ -2929,6 +2933,11 @@ echo "