Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
2759589
Merge pull request #18 from goautodial/master
mmixx Jun 8, 2020
8ef455f
Fix for ECCS callback issue
mmixx Jun 9, 2020
851613e
Merge branch 'master' of https://github.com/iKnowITWorks/v4.0
mmixx Jun 9, 2020
a4f1beb
Fix for ECCS callback issue
mmixx Jun 9, 2020
a315edc
Fixing ECCS callback issue
mmixx Jun 9, 2020
10c40fc
Fixing ECCS callback issue
mmixx Jun 9, 2020
ca6d1bc
Fixing ECCS callback issue
mmixx Jun 9, 2020
907ac06
Fixing ECCS callback issue
mmixx Jun 9, 2020
4eb4a13
Fixing ECCS callback issue
mmixx Jun 9, 2020
def4c30
Fixing ECCS callback issue
mmixx Jun 9, 2020
e1d0465
Fixing ECCS callback issue
mmixx Jun 9, 2020
e8e2c10
Fixing ECCS callback issue
mmixx Jun 9, 2020
5342b8e
Fixing ECCS callback issue
mmixx Jun 9, 2020
456ddb2
Fixing ECCS callback issue
mmixx Jun 9, 2020
89de2cd
Fixing ECCS callback issue
mmixx Jun 9, 2020
cf4f5bf
Fixing the issue for ECCS dialer.
mmixx Jun 19, 2020
88af4f2
Merge pull request #19 from goautodial/master
mmixx Jun 29, 2020
4540cd8
Increased the ECCS_DIAL_TIMEOUT value from 2 to 5.
mmixx Jun 29, 2020
0b75caf
Merge branch 'master' of https://github.com/iKnowITWorks/v4.0
mmixx Jun 29, 2020
6d0d7b5
Merge pull request #80 from goautodial/bug-fix
mmixx May 5, 2022
6624a4d
Merge pull request #81 from goautodial/bug-fix
mmixx May 5, 2022
d716012
Merge pull request #82 from goautodial/bug-fix
mmixx May 6, 2022
dc40819
Merge pull request #85 from goautodial/bug-fix
mmixx May 12, 2022
1c9bd6f
Merge pull request #88 from goautodial/bug-fix
mmixx May 31, 2022
dc77d7d
Merge branch 'master' into master
mmixx Feb 5, 2023
8c3e55a
Translate to Spanish Language
kn06497 Mar 3, 2023
ae272ef
Merge pull request #91 from kn06497/patch-1
demianb Mar 8, 2023
3f274c6
https://goautodial.org/issues/9198
demianb Mar 10, 2023
5826bb8
Minor curl updates for Almalinux 9..
demianb Nov 1, 2025
33fd3f5
Fix login issues on Almalinux 9..
demianb Nov 1, 2025
d587187
Fix missing CURLOPT_SSL_VERIFYHOST option in function API_Upload in A…
demianb Nov 3, 2025
39214e9
Merge branch 'bug-fix'
demianb Nov 10, 2025
96f3b5d
Merge branch 'bug-fix'
demianb Nov 10, 2025
4f4768f
Update audioFile.replace("http", "https") in callrecordings.php
demianb Nov 11, 2025
9be1939
Bug fix for custom fields issues..
demianb Nov 25, 2025
cc3cd9a
Merge branch 'master' of github.com:goautodial/v4.0
demianb Nov 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 41 additions & 29 deletions addcustomfield.php
Original file line number Diff line number Diff line change
@@ -1,42 +1,54 @@
<?php
/**
* @file addcustomfield.php
* @brief Handles Add Custom Field Request
* @copyright Copyright (c) 2025 GOautodial Inc.
* @author Demian Lizandro A. Biscocho <demian@goautodial.com>*
* @author Alexander Jim Abenoja <alex@goautodial.com>
*
* @par <b>License</b>:
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

###################################################
### Name: edittelephonylist.php ###
### Functions: Edit List Details ###
### Copyright: GOAutoDial Ltd. (c) 2011-2016 ###
### Version: 4.0 ###
### Written by: Alexander Jim H. Abenoja ###
### License: AGPLv2 ###
###################################################

require_once('./php/CRMDefaults.php');
require_once('./php/UIHandler.php');
//require_once('./php/DbHandler.php');
require_once('./php/LanguageHandler.php');
require('./php/Session.php');
require_once('./php/goCRMAPISettings.php');
require_once('./php/APIHandler.php');
require_once('./php/CRMDefaults.php');
require_once('./php/LanguageHandler.php');
include('./php/Session.php');

// initialize structures
$api = \creamy\APIHandler::getInstance();
$ui = \creamy\UIHandler::getInstance();
$lh = \creamy\LanguageHandler::getInstance();
$user = \creamy\CreamyUser::currentUser();

$modifyid = NULL;
if (isset($_POST["modifyid"])) {
$modifyid = $_POST["modifyid"];
}
$modifyid = NULL;
if (isset($_POST["modifyid"])) {
$modifyid = $_POST["modifyid"];
}

$customFields = $ui->API_goGetAllCustomFields($modifyid);
$customs = $customFields->data;
$customFields = $api->API_getAllCustomFields($modifyid);
$customs = $customFields->data;

// echo "<pre>";
// print_r($customs);
// die;
//echo "<pre>";
//print_r($customs);
// die;

$perm = $ui->goGetPermissions('customfields', $_SESSION['usergroup']);
if ($perm->customfields_read === 'N' && $perm->customfields_update === 'N' && $perm->customfields_delete === 'N') {
header("location: telephonylist.php");
}
$perm = $ui->goGetPermissions('customfields', $_SESSION['usergroup']);
if ($perm->customfields_read === 'N' && $perm->customfields_update === 'N' && $perm->customfields_delete === 'N') {
header("location: telephonylist.php");
}
?>
<html>
<head>
Expand Down Expand Up @@ -988,8 +1000,8 @@ function(){
contentType: false,
processData: false,
success: function(data) {
// console.log(data);
if(data == "success"){
console.log(data);
if(data == 1){
$('#wizard-form input[name="field_label"]').removeAttr('readonly');
swal({
title: "Success",
Expand Down
2 changes: 1 addition & 1 deletion callrecordings.php
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@
*****/
$(document).on('click','.play_audio',function() {
var audioFile = $(this).attr('data-location');
//audioFile = audioFile.replace("http", "https");
audioFile = audioFile.replace("http", "https");
//console.log(audioFile);
var voicedetails = "";
var sourceFile = '<audio class="audio_file" controls style="width:100%">';
Expand Down
1,586 changes: 1,586 additions & 0 deletions lang/es_ES

Large diffs are not rendered by default.

13 changes: 12 additions & 1 deletion modules/GOagent/GOagentJS.php
Original file line number Diff line number Diff line change
Expand Up @@ -2024,6 +2024,10 @@ class: resized ? 'fa fa-chevron-down' : 'fa fa-chevron-up'
var cbComment = $("#callback-comments").val();
ReschedCallback(reschedule_cb_id, cbDate, cbComment, cbOnly);
}

if (ECCS_BLIND_MODE == 'y' && ECCS_DIAL_TIMEOUT > 0) {
btnDialHangup();
}
});

$("#openWebForm").click(function() {
Expand Down Expand Up @@ -2533,6 +2537,9 @@ function btnDialHangup (is_true) {
check_inbound_call = true;
toggleButton('DialHangup', 'hangup', false);
DialedCallHangup();

//$("#DispoSelection").val('A');
//DispoSelectSubmit();
}
} else {
if (!is_call_cb) {
Expand Down Expand Up @@ -2735,16 +2742,19 @@ function hotKeysAvailable(e) {
var HKstatus = hotkeys_content[HKdispo];
if (HKdispo) {
CustomerData_update();
console.log('0', 'NO', 'YES', HKdispo);

if ( (HKdispo == 'ALTPH2') || (HKdispo == 'ADDR3') ) {
if ($("#DiaLALTPhone").prop('checked')) {
DialedCallHangup('NO', 'YES', HKdispo);
}
} else {
//console.log('1', 'NO', 'YES', HKdispo);
// transfer call to answering maching message with hotkey
if ( (HKdispo == 'LTMG') || (HKdispo == 'XFTAMM') ) {
mainxfer_send_redirect('XfeRVMAIL', lastcustchannel, lastcustserverip);
} else {
//console.log('2', 'NO', 'YES', HKdispo);
HKdispo_display = 4;
HKfinish = 1;
$("#HotKeyDispo").html(HKdispo + " - " + HKstatus);
Expand All @@ -2754,6 +2764,7 @@ function hotKeysAvailable(e) {
alt_phone_dialing = starting_alt_phone_dialing;
alt_dial_active = 0;
alt_dial_status_display = 0;
dialingINprogress = 0;
DialedCallHangup('NO', 'YES', HKdispo);

console.log("dial_method", dial_method);
Expand Down Expand Up @@ -10744,7 +10755,7 @@ function numberWithCommas(x) {
break;
case "CustoMFielD":
$list_id = $_REQUEST['list_id'];
$result = $ui->API_goGetAllCustomFields($list_id);
$result = $api->API_getAllCustomFields($list_id);
$result = json_encode($result);
break;
case "UpdateMessages":
Expand Down
7 changes: 4 additions & 3 deletions php/APIHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public function API_Request($folder, $postfields, $request_data = false){
curl_setopt($ch, CURLOPT_TIMEOUT, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postdata));
$data = curl_exec($ch);
curl_close($ch);
Expand Down Expand Up @@ -189,10 +189,11 @@ public function API_Upload($folder, $postfields, $return_data = NULL){
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//curl_setopt($ch, CURLOPT_CONNECTTIMEOUT , 0); //gg
curl_setopt($ch, CURLOPT_TIMEOUT , 0); //gg
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
$data = curl_exec($ch);
curl_close($ch);
$output = json_decode($data);
Expand Down
33 changes: 4 additions & 29 deletions php/AddCustomField.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* @file AddCarrier.php
* @file AddCustomField.php
* @brief Handles Add Custom Field Request
* @copyright Copyright (C) GOautodial Inc.
* @author Alexander Jim Abenoja <alex@goautodial.com>
Expand All @@ -18,35 +18,10 @@
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
require_once('APIHandler.php');
$api = \creamy\APIHandler::getInstance();
*/
require_once('APIHandler.php');
$api = \creamy\APIHandler::getInstance();

/*
$url = gourl."/goCustomFields/goAPI.php"; #URL to GoAutoDial API. (required)
$postfields["goUser"] = goUser; #Username goes here. (required)
$postfields["goPass"] = goPass; #Password goes here. (required)
$postfields["goAction"] = "goAddCustomFields"; #action performed by the [[API:Functions]]. (required)
$postfields["responsetype"] = responsetype; #json. (required)
$postfields["hostname"] = $_SERVER['REMOTE_ADDR'];
$postfields["list_id"] = $_POST['list_id'];
$postfields["field_name"] = $_POST['field_name'];
$postfields["field_rank"] = $_POST['field_rank'];
$postfields["field_order"] = $_POST['field_order'];
$postfields["field_label"] = $_POST['field_label'];
$postfields["field_position"] = $_POST['field_position'];
$postfields["field_description"] = $_POST['field_description'];
$postfields["field_type"] = $_POST['field_type'];
$postfields["field_options"] = $_POST['field_options'];
$postfields["field_option_position"] = $_POST['field_option_position'];
$postfields["field_size"] = $_POST['field_size'];
$postfields["field_max"] = $_POST['field_max'];
$postfields["field_default"] = $_POST['field_default'];
$postfields["field_required"] = $_POST['field_required'];

$postfields["log_user"] = $_POST['log_user'];
$postfields["log_group"] = $_POST['log_group'];
*/
$postfields = array(
'goAction' => 'goAddCustomFields',
'list_id' => $_POST['list_id'],
Expand Down
79 changes: 38 additions & 41 deletions php/CopyCustomFields.php
Original file line number Diff line number Diff line change
@@ -1,48 +1,45 @@
<?php
/**
* @file CopyCustomFields.php
* @brief Modify custom field entries
* @copyright Copyright (c) 2025 GOautodial Inc.
* @author Demian Lizandro A, Biscocho <demian@goautodial.com>
* @author Alexander Jim H. Abenoja <dev@goautodial.com>
* @author Noel Umandap <dev@goautodial.com>*
*
* @par <b>License</b>:
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

/** Campaigns API - Add a new Campaign */
/**
* Generates action circle buttons for different pages/module
* @param goUser
* @param goPass
* @param goAction
* @param responsetype
* @param hostname
* @param campaign_id
*/
require_once('goCRMAPISettings.php');
require_once('APIHandler.php');
$api = \creamy\APIHandler::getInstance();

$url = gourl."/goCustomFields/goAPI.php"; #URL to GoAutoDial API. (required)
$postfields["goUser"] = goUser; #Username goes here. (required)
$postfields["goPass"] = goPass; #Password goes here. (required)
$postfields["goAction"] = "goCopyCustomFields"; #action performed by the [[API:Functions]]. (required)
$postfields["responsetype"] = responsetype; #json. (required)
$postfields["list_to"] = $_POST['list_to'];
$postfields["list_from"] = $_POST['list_from'];
$postfields["copy_option"] = $_POST['copy_option'];

$postfields["log_user"] = $_POST['log_user'];
$postfields["log_group"] = $_POST['log_group'];
$postfields["hostname"] = $_SERVER['REMOTE_ADDR'];
$list_to = $_POST['list_to'];
$list_from = $_POST['list_from'];
$copy_option = $_POST['copy_option'];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$data = curl_exec($ch);
curl_close($ch);
$output = json_decode($data);
$postfields = array(
"goAction" => "goCopyCustomFields", #action performed by the [[API:Functions]]
"list_to" => $list_to,
"list_from" => $list_from,
"copy_option" => $copy_option
);

if ($output->result=="success") {
# Result was OK!
$status = "success";
} else {
# An error occured
$status = "error";
}
$output = $api->API_Request("goCustomFields", $postfields);

echo $status;
if ($output->result=="success") { $status = 1; }
else { $status = $output->result; }

echo json_encode($status);
?>
42 changes: 10 additions & 32 deletions php/DbHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,20 +235,7 @@ public function deleteUser($userid) {
* @return object an associative array containing the user's data if credentials are valid and login succeed, NULL otherwise.
*/
public function checkLoginByName($name, $password, $ip_address) {
// fetching user by name and password
//$this->dbConnector->where("name", $name);
//$userobj = $this->dbConnector->getOne(CRM_USERS_TABLE_NAME);
// $this->dbConnectorAsterisk->where("user", $name);
// $userobj = $this->dbConnectorAsterisk->getOne(CRM_USERS_TABLE_NAME_ASTERISK);
$url = gourl."/goUsers/goAPI.php"; #URL to GoAutoDial API. (required)
//$postfields["goUser"] = goUser; #Username goes here. (required)
//$postfields["goPass"] = goPass; #Password goes here. (required)
//$postfields["goAction"] = "goUserLogin"; #action performed by the [[API:Functions]]. (required)
//$postfields["responsetype"] = responsetype; #json. (required)
//$postfields["user_name"] = $name;
//$postfields["user_pass"] = $password;

$postfields_string = '';
$url = gourl."/goUsers/goAPI.php"; #URL to GoAutoDial API. (required)
$postfields = array(
'goUser' => goUser,
'goPass' => goPass,
Expand All @@ -259,27 +246,18 @@ public function checkLoginByName($name, $password, $ip_address) {
'ip_address' => $ip_address
);



foreach($postfields as $key=>$value) { $postfields_string .= $key.'='.$value.'&'; }
$postfields_string = rtrim($postfields_string, '&');

// Call the API
$ch = curl_init();
//curl_setopt($ch, CURLOPT_URL, $url);
//curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
//curl_setopt($ch, CURLOPT_POST, count($postfields));
//curl_setopt($ch, CURLOPT_TIMEOUT, 100);
//curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields_string);

curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch,CURLOPT_POST, count($postfields));
curl_setopt($ch,CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch,CURLOPT_POSTFIELDS, $postfields_string);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
$data = curl_exec($ch);
$userobj = json_decode($data);
curl_close($ch);
$userobj = json_decode($data);

if ($userobj->result === "success") { // first match valid?
//$password_hash = $userobj["password_hash"];
Expand Down
Loading
Loading