Skip to content

GOautodial APIs Version 2: Improved queries (Prepared Statements, Code Cleaning)

License

Notifications You must be signed in to change notification settings

goautodial/goAPIv2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

4dff4ef · Dec 6, 2021
May 6, 2020
Jul 9, 2021
Dec 6, 2021
May 6, 2020
May 6, 2020
May 6, 2020
Jun 16, 2021
May 6, 2020
May 6, 2020
Jun 17, 2018
May 19, 2020
Jun 9, 2021
Sep 10, 2019
May 6, 2020
Nov 25, 2020
Nov 25, 2020
May 6, 2020
Mar 29, 2021
May 6, 2020
May 6, 2020
Apr 27, 2021
May 6, 2020
May 6, 2020
May 6, 2020
May 6, 2020
Jun 17, 2018
Jul 18, 2020
May 6, 2020
May 6, 2020
Jun 29, 2021
Jun 17, 2018
Feb 18, 2019
May 6, 2020
Sep 10, 2019
Feb 24, 2021
Sep 10, 2019
May 6, 2020
Jul 9, 2021
Nov 23, 2020
Apr 27, 2021
Jul 9, 2021
May 6, 2020
May 6, 2020
Aug 29, 2018
Nov 6, 2019
Aug 30, 2020
Oct 20, 2021
May 6, 2020
May 6, 2020
May 6, 2020
May 30, 2018
Jan 13, 2021
Oct 21, 2018

Repository files navigation

goAPI

The GOautodial APIs allow you to perform operations and actions within GOautodial from external applications. This allows GOautodial to integrate seamlessly with third party software and custom code.

Access to the APIs are via HTTPS and authentication is done via username and password.

To install (need to have a working GOautodial v4):

cd /var/www/html
git clone https://github.com/goautodial/goAPIv2

Documentation (incomplete): https://drive.google.com/drive/folders/1ERrp_QdSVBsIpPKzoeU2hNQikCYSKJH0?usp=sharing.


Sample PHP code to create campaign:

$postfields = array(
  'goUser' => $goUser,
  'goPass' => $goPass,
  'goAction' => ‘goAddCampaign’,
  'session_user' => $session_user,
  'responsetype' => 'json',
  ‘campaign_id’ => ‘12231977’,
  ‘campaign_name’ => ‘Testcampaign’,
  ‘campaign_type’ => ‘outbound’, 
  ‘dial_prefix’ => ‘CUSTOM’, 
  ‘custom_prefix’ => ‘9’,
  ‘dial_method’ => ‘MANUAL’, 
  ‘auto_dial_level’ => ‘OFF’, 
  ‘campaign_recording’ => ‘NEVER’, 
  ‘answering_machine_detection’ => ‘8369’, 
  ‘session_user’ => ‘$session_user’, 
  ‘user_group’ => ‘ADMIN’
  ‘active’ => ‘Y’
  );

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
$data = curl_exec($ch);
curl_close($ch);

Sample return:

Success
HTTP 200:
{result: "success"}

Failure
HTTP 400:
{
"code" : "40001"
"result" : "Error: Missing required parameters"
}

Curl utility:

curl 'https://DOMAINNAME/goAPIv2/goCampaigns/goAPI.php?goAction=goAddCampaign&goUser=goAPIuser&goPass=ENCRYPTED_PASSWORD&responsetype=json&campaign_id=12231977&campaign_name=CAMPAIGN_NAME&campaign_type=outbound&dial_prefix=CUSTOM&custom_prefix=9&dial_method=MANUAL&auto_dial_level=OFF&campaign_recording=NEVER&answering_machine_detection=8369&session_user=admin&user_group=ADMIN'

The encrypted password can be derived from the pass_hash column in the vicidial_users table under the asterisk database. Or use /var/www/html/bin/pass_hasher.php to generate the encrypted password.

OpenAPI Spec

There is also a work-in-progress openapi spec composed by @God-Zalo which can be used for code-generating client sdks in different languages:

About

GOautodial APIs Version 2: Improved queries (Prepared Statements, Code Cleaning)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published