diff --git a/agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi b/agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi index 57e9a1eb..e2d13ad9 100644 --- a/agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi +++ b/agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi @@ -258,6 +258,7 @@ # 230810-2006 - Added third_alert_trigger features # 231026-0917 - Fix for rare fronter/closer logging issue # 240219-1527 - Added daily_limit in-group user parameter +# 240223-0847 - Added INBOUND_DID populate option # $script = 'agi-VDAD_ALL_inbound.agi'; @@ -277,6 +278,7 @@ $entry_list_id=0; $areacode_filter_run=0; $no_agent_no_queue_checked=0; $fronter_agent=''; +$inbound_did=''; $now_date_epoch = time(); @@ -1109,18 +1111,37 @@ if ($sthArows > 0) $sthA->finish(); # If answer signal config is enabled and the in-group is set to send one, send an Answer signal -if ( ($inbound_answer_config > 0) and ($answer_signal !~ /NONE|ROUTE/i) ) +if ( ($inbound_answer_config > 0) && ($answer_signal !~ /NONE|ROUTE/i) ) { $AGI->answer(); if ($AGILOG) {$agi_string = " Answering call: - $channel|$answer_signal"; &agi_output;} } +# If the INBOUND_DID option is used in one of the populate settings, look it up by the uniqueid here +if ( ($populate_lead_source =~ /INBOUND_DID/) || ($populate_lead_vendor =~ /INBOUND_DID/) ) + { + $stmtA = "SELECT extension FROM vicidial_did_log where uniqueid='$uniqueid' and call_date > \"$timeTWENTYFOURhoursAGO\" order by call_date desc limit 1;"; + if ($DBX) {print " |$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $inbound_did = $aryA[0]; + } + $sthA->finish(); + if ($AGILOG) {$agi_string = " Populate INBOUND_DID set: - $inbound_did|$stmtA"; &agi_output;} + } + # When VID or VIDPROMPT, methods are not used, no Vendor Lead Code can be supplied. Fill it with inbound_number $igvendorid = $AGI->get_variable('igvendorid'); if ( ($call_handle_method !~ /^VID/) && (length($igvendorid) < 1) ) { if ($populate_lead_vendor =~ /INBOUND_NUMBER/) {$vendor_id = $inbound_number;} + if ($populate_lead_vendor =~ /INBOUND_DID/) + {$vendor_id = $inbound_did;} if (length($populate_lead_vendor) < 1) {$vendor_id = '';} if ( (length($populate_lead_vendor) > 0) && (length($vendor_id) < 1) ) @@ -1312,6 +1333,8 @@ else { if ($populate_lead_source =~ /INBOUND_NUMBER/) {$source_id = $inbound_number;} + if ($populate_lead_source =~ /INBOUND_DID/) + {$source_id = $inbound_did;} if ( (length($populate_lead_source) < 1) || ($populate_lead_source =~ /BLANK/) ) {$source_id = '';} if ($populate_lead_source =~ /DISABLED/) diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php index 37ede19d..3dd60b61 100644 --- a/agc_2-X/trunk/www/vicidial/admin.php +++ b/agc_2-X/trunk/www/vicidial/admin.php @@ -6130,12 +6130,13 @@ if ($SSscript_remove_js > 0) # 231227-2217 - Added 3-Way Press Log Report # 240214-2120 - Added STATE_DESCRIPTIONS container type and state_descriptions campaign and in-group settings, change year to 2024 # 240221-0331 - Changes for in-group daily limits, small changes for stats_descriptions +# 240223-0854 - Added INBOUND_DID In-Group populate option # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 9 to access this page the first time -$admin_version = '2.14-907a'; -$build = '240221-0331'; +$admin_version = '2.14-908a'; +$build = '240223-0854'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -34769,7 +34770,7 @@ if ($ADD==3111) echo ""._QXZ("Populate Lead State Areacode").": $NWB#inbound_groups-populate_state_areacode$NWE\n"; - echo ""._QXZ("Populate Lead Source").": $NWB#inbound_groups-populate_lead_source$NWE\n"; + echo ""._QXZ("Populate Lead Source").": $NWB#inbound_groups-populate_lead_source$NWE\n"; echo ""._QXZ("Populate Lead Vendor").": $NWB#inbound_groups-populate_lead_vendor$NWE\n"; diff --git a/agc_2-X/trunk/www/vicidial/help_documentation.txt b/agc_2-X/trunk/www/vicidial/help_documentation.txt index 26996d30..35306bb6 100644 --- a/agc_2-X/trunk/www/vicidial/help_documentation.txt +++ b/agc_2-X/trunk/www/vicidial/help_documentation.txt @@ -1,4 +1,4 @@ -# version: 20240220093401 +# version: 20240223085101 users-user User ID This field is where you put the users ID number, can be up to 20 digits in length, Must be at least 2 characters in length. We strongly recommend not reusing user accounts for different users, for reporting accuracy. To disable a user account, set the Active option to -N-. users-pass Password This field is where you put the users password. Must be at least 2 characters in length, unless the User Password Minimum Length system setting is enabled, which will require a longer password. Only letters and numbers are allowed in user passwords. A medium strength user password will be at least 10 characters in length, and a strong user password will be at least 20 characters in length and have letters as well as at least one number. It is recommended that you use a longer password if possible, stringing together several unrelated words with no spaces, and a number somewhere in the string. The maximum size of a password is 100 characters. users-force_change_password Force Change Password If this option is set to Y then the user will be prompted to change their password the next time they log in to the administration webpage or the agent screen. Default is N. @@ -799,7 +799,7 @@ cid_groups-cid_auto_rotate_calls CID Auto Rotate Calls, CID and Time Shows vm_message_groups VM Message Groups Voicemail Message Groups are designed to allow agents to select from several messages to leave on a customer voicemail box when transferring to a voicemail message in the agent screen. The ID must be from 2 to 40 characters in length with no punctuation other than an underscore allowed. The Name must be from 5 to 255 characters in length. Active will determine if the VM Message Group is shown as an option in the campaign modify screen setting for VM Message Groups. For the Audio Files, you can define the order in which they appear on the agent screen by using the Rank setting. The Time Range will define what time of the customers day the message are displayed on the agent screen, in 2400 hours time format. The Display is what text will show up for this audio file on the agent screen. queue_groups Queue Groups Queue Groups are used by some reports to show stats from a group of campaigns and-or inbound groups. The ID must be from 2 to 20 characters in length with no punctuation other than an underscore allowed. The Name must be from 5 to 40 characters in length. Active will determine if the Queue Group is shown as an option in reports. For the Included Campaigns and Inbound Groups, you can select the ones that you want to be included in the Queue Group. inbound_groups-park_ext Park Music-on-Hold This optional setting will override the agent campaign setting for Park Music-on-Hold, if populated. Default is empty for disabled. -inbound_groups-populate_lead_source Populate Lead Source If this option is not DISABLED and there is no source_id channel variable set on the call, then the system will fill the source_id lead field with one of the other options when leads are added with an inbound call. INBOUND_NUMBER will use the inbound phone number dialed. BLANK will leave the source_id field blank. DISABLED will use the default behavior which will set the source_id field to VDCL. Default is DISABLED. +inbound_groups-populate_lead_source Populate Lead Source If this option is not DISABLED and there is no source_id channel variable set on the call, then the system will fill the source_id lead field with one of the other options when leads are added with an inbound call. INBOUND_NUMBER will use either the inbound phone number dialed or the Cell Menu ID of the previous step in the call path. INBOUND_DID will attempt to look up the last DID that the call was routed through before getting to this In-Group. BLANK will leave the source_id field blank. DISABLED will use the default behavior which will set the source_id field to VDCL. Default is DISABLED. user_groups-user_group User Group This is the short name of a User group, try not to use any spaces or punctuation for this field. max 20 characters, minimum of 2 characters. user_groups-group_name Group Name This is the description of the user group max of 40 characters. user_groups-forced_timeclock_login Force Timeclock Login This option allows you to not let an agent log in to the agent interface if they have not logged into the timeclock. Default is N. There is an option to exempt admin users, levels 8 and 9. @@ -1285,7 +1285,7 @@ admin_phones_bulk_insert-create_alias Create Alias Entries Setting this opt admin_phones_bulk_insert-alias_suffix Alias Suffix This is the suffix that will be added to the extension to form the phone alias id. For example, if the extension is cc100 and the alias suffix is x, then the phone alias id used for that would be cc100x. admin_phones_bulk_insert-protocol Client Protocol This is the phone protocol that will be used for all phones created when submitted. SIP, PJSIP and IAX2 are VOIP protocols that will create conf file entries to allow those phoens to register on the servers. status_groups Status Groups Through the use of status groups, you can have statuses that exist for lists or in-groups specifically. The Status must be 1-6 characters in length, the description must be 2-30 characters in length and Selectable defines whether it shows up in the system as an agent disposition. The human_answered field is used when calculating the drop percentage, or abandon rate. Setting human_answered to Y will use this status when counting the human-answered calls. The Category option allows you to group several statuses into a category that can be used for statistical analysis. There are also 7 additional settings that will define the kind of status: sale, dnc, customer contact, not interested, unworkable, scheduled callback, completed. The MIN SEC and MAX SEC fields for each status will determine whether an agent can select that status at the end of their call based upon the length of the call. If the call is 10 seconds and the MIN SEC for a status is set to 20 seconds, then the agent will not be able to select that status. Also, if a call is 40 seconds and the MAX SEC for a status is set to 30 seconds, then the agent will not be able to select that status. The Status Group ID field must be between 2 and 20 characters in length, must not match a current campaign ID, and cannot contain spaces or other special characters. -inbound_groups-populate_lead_vendor Populate Lead Vendor If this option is not DISABLED, and the inbound call was not delivered with a VID option, then the system will put the value entered in this setting into the vendor_lead_code field when a new lead is inserted. Special options include INBOUND_NUMBER which will use the inbound phone number dialed. Default is INBOUND_NUMBER. +inbound_groups-populate_lead_vendor Populate Lead Vendor If this option is not DISABLED, and the inbound call was not delivered with a VID option, then the system will put the value entered in this setting into the vendor_lead_code field when a new lead is inserted. Special options include INBOUND_NUMBER which will use either the inbound phone number dialed or the Cell Menu ID of the previous step in the call path. INBOUND_DID will attempt to look up the last DID that the call was routed through before getting to this In-Group. Default is INBOUND_NUMBER. inbound_groups-populate_lead_comments Populate Lead Comments If this option is not DISABLED, then the system will put the value entered in this setting into the comments field when a new lead is inserted. Special options include CALLERID_NAME which will use the CallerID Name as supplied in the incoming phone call. Default is CALLERID_NAME. screen_labels Screen labels give you the option of setting different labels for the default agent screen fields on a per campaign basis. Screen labels give you the option of setting different labels for the default agent screen fields on a per campaign basis. screen_labels-label_id Screen Label ID This field needs to be at least 2 characters in length and no more than 20 characters in length, no spaces or special characters. This is the ID that will be used to identify the screen label throughout the system.