New vicidial api wrapper

Discussions about development of VICIDIAL and astGUIclient

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

New vicidial api wrapper

Postby fperdomo » Wed Mar 03, 2021 10:24 am

Hello all,

I was looking into an API wrapper for Vicidial API and I saw that is out of update (the last update was on Oct 24, 2017) so create my own version so will make it easy to integrate any PHP application. On this version, I added support to all Vicidial API functions.

Features:
- Added HTTPS support
- All Vicidial Agent API support
- Created documentation based on Vicidial on a Markdown page instead of a text file so gonna be easy to read it.
- Composer installation support
- Easy to integrate any CRM, Ticket system, or PHP based application
- Focus on simplicity and easy to use

Repository
https://github.com/masterfermin02/vicidial-api-wrapper

Code: Select all
<?php

require_once 'vendor/autoload.php';

use Vicidial\Api\Wrapper\Agent\Client;

try {
     $vicidialAPI = new Client("127.0.0.1", "6666", "123");
     $agent_user = '1000';
     $vicidialAPI->ra_call_control($agent_user, [
        'stage' => 'INGROUPTRANSFER',
        'ingroup_choices' => 'DEFAULTINGROUP',
        'value' => 'Y0316001655000402028'
     ]);
} catch (Exception $e) {
     echo 'Exception: ',  $e->getMessage(), "\n";
}
best regards
fperdomo
 
Posts: 9
Joined: Fri May 20, 2016 8:43 pm
Location: Dominican Republic

Re: New vicidial api wrapper

Postby mflorell » Wed Mar 03, 2021 10:30 am

Thanks for posting!
mflorell
Site Admin
 
Posts: 18386
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: New vicidial api wrapper

Postby carpenox » Wed Mar 03, 2021 12:30 pm

Good shit, great post
Alma Linux 9.4 | SVN Version: 3889 | DB Schema Version: 1721 | Asterisk 18.21.1 | PHP8
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WA: +19549477572
GC: https://join.skype.com/ujkQ7i5lV78O | DC: https://discord.gg/DVktk6smbh
carpenox
 
Posts: 2423
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: New vicidial api wrapper

Postby fperdomo » Sun Mar 07, 2021 4:45 pm

Thanks @mflorell and @carpenox. I also added support to the no agent API or admin API.

https://github.com/masterfermin02/vicid ... -agent-api

Example:
Code: Select all
<?php
   
    require_once 'vendor/autoload.php';
   
    use Vicidial\Api\Wrapper\Admin\Client;
   
    try {
        $admin = new Client("viciexperts.com/admin_demo/", "12345", "12345");
        echo $admin->moh_list([
            'format' => 'selectframe',
            'comments' => 'fieldname',
            'stage' => 'date'
        ]);
    } catch (Exception $e) {
        echo 'Exception: ',  $e->getMessage(), "\n";
    }
best regards
fperdomo
 
Posts: 9
Joined: Fri May 20, 2016 8:43 pm
Location: Dominican Republic

Re: New vicidial api wrapper

Postby martinch » Mon Mar 20, 2023 11:14 pm

Really nice! Thank you!
Project Lead @ mDial -> https://github.com/TheBlode/mDial
martinch
 
Posts: 273
Joined: Thu Nov 15, 2018 9:14 am
Location: England, UK


Return to Development

Who is online

Users browsing this forum: No registered users and 27 guests