{"id":18887803,"url":"https://github.com/masterfermin02/vicidial-api-wrapper","last_synced_at":"2025-08-29T21:32:07.639Z","repository":{"id":54147657,"uuid":"341782282","full_name":"masterfermin02/vicidial-api-wrapper","owner":"masterfermin02","description":"Elegant and simple Implementation to integrate Vicidial API","archived":false,"fork":false,"pushed_at":"2024-12-29T15:03:17.000Z","size":102,"stargazers_count":22,"open_issues_count":0,"forks_count":14,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-08-21T01:27:57.006Z","etag":null,"topics":["php","php-sdk","sdk","vicidial","wrapper-api"],"latest_commit_sha":null,"homepage":"https://github.com/masterfermin02/vicidial-api-wrapper","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/masterfermin02.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-24T04:49:17.000Z","updated_at":"2025-04-30T16:42:20.000Z","dependencies_parsed_at":"2024-06-28T00:19:20.955Z","dependency_job_id":"10f35337-6f3d-4b58-a8f3-2b7c61ba52e8","html_url":"https://github.com/masterfermin02/vicidial-api-wrapper","commit_stats":{"total_commits":21,"total_committers":3,"mean_commits":7.0,"dds":"0.23809523809523814","last_synced_commit":"a125199db921f0b6b4e6851f3b7c2c2978bb105b"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/masterfermin02/vicidial-api-wrapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masterfermin02%2Fvicidial-api-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masterfermin02%2Fvicidial-api-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masterfermin02%2Fvicidial-api-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masterfermin02%2Fvicidial-api-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/masterfermin02","download_url":"https://codeload.github.com/masterfermin02/vicidial-api-wrapper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masterfermin02%2Fvicidial-api-wrapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272766527,"owners_count":24989404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php","php-sdk","sdk","vicidial","wrapper-api"],"created_at":"2024-11-08T07:39:35.124Z","updated_at":"2025-08-29T21:32:07.618Z","avatar_url":"https://github.com/masterfermin02.png","language":"PHP","readme":"# Vicidial API PHP WRAPPER\n\nBeautiful and simple Implementation to integrate Vicidial API\n\nDISCLAIMER: VICIdial is a registered trademark of the Vicidial Group which i am not related in anyway.\n\nVICIDIAL is a software suite that is designed to interact with the Asterisk Open-Source PBX Phone system to act as a complete inbound/outbound contact center suite with inbound email support as well.\n\nhttp://www.vicidial.org/vicidial.php\n\nVicidial has an AGENT API and NON AGENT API, this classes are intended to make it easier to use in PHP\n\n- http://vicidial.org/docs/NON-AGENT_API.txt\n- http://vicidial.org/docs/AGENT_API.txt\n\n## Install\nRequires PHP 8.1\n\n`composer require masterfermin02/vicidial-api-wrapper`\n\n### For PHP 7.4+ must install this version\n\n`composer require masterfermin02/vicidial-api-wrapper:1.0.3`\n\n## How to use it\nExample 1: Update fields on agent screen\n```php\n\n\u003c?php\n\n$fields['first_name'] = \"John\";\n$fields['last_name'] = \"Doe\";\n$fields['address1'] = \"123 Fake St\";\n\ntry {\n     $agentApi = VicidialApi::create(\n        getenv('YOUR_VICIDIAL_IP'),\n        getenv('YOUR_VICIDIAL_USER'),\n        getenv('YOUR_VICIDIAL_PASSWORD')\n     )-\u003eagent();\n     echo $agentApi-\u003eupdateFields(\"gabriel\", $fields);\n} catch (Exception $e) {\n     echo 'Exception: ',  $e-\u003egetMessage(), \"\\n\";\n}\n\n```\n\nExample 2:  Hangup Call, Dispo it and Pause Agent\n```php\n\n\u003c?php\n\ntry {\n     $agentApi = VicidialApi::create(\n        getenv('YOUR_VICIDIAL_IP'),\n        getenv('YOUR_VICIDIAL_USER'),\n        getenv('YOUR_VICIDIAL_PASSWORD')\n     )-\u003eagent();\n     $agentApi-\u003epause(\"gabriel\", \"PAUSE\");\n     $agentApi-\u003ehangup(\"gabriel\");\n     $agentApi-\u003edispo(\"gabriel\", ['value' =\u003e 'SALE']);\n     $agentApi-\u003epauseCode(\"gabriel\", \"BREAK\");\n} catch (Exception $e) {\n     echo 'Exception: ',  $e-\u003egetMessage(), \"\\n\";\n}\n\n```\n\nExample 3: Update fields on agent screen\n```php\n    \u003c?php\n    \n    $fields['first_name'] = \"John\";\n    $fields['last_name'] = \"Doe\";\n    $fields['address1'] = \"123 Fake St\";\n    \n    try {\n         $agentApi = VicidialApi::create(\n             getenv('YOUR_VICIDIAL_IP'),\n             getenv('YOUR_VICIDIAL_USER'),\n             getenv('YOUR_VICIDIAL_PASSWORD')\n         )-\u003eagent();\n         echo $agentApi-\u003eupdateFields(\"gabriel\", $fields);\n    } catch (Exception $e) {\n         echo 'Exception: ',  $e-\u003egetMessage(), \"\\n\";\n    }\n\n```\n\n### Vicidial admin or No agent api\n```php\n    \u003c?php\n    \n    require_once 'vendor/autoload.php';\n    \n    try {\n        $agentApi = VicidialApi::create(\n            getenv('YOUR_VICIDIAL_IP'),\n            getenv('YOUR_VICIDIAL_USER'),\n            getenv('YOUR_VICIDIAL_PASSWORD')\n        )-\u003eadmin();\n        echo $agentApi-\u003emohList([\n            'format' =\u003e 'selectframe',\n            'comments' =\u003e 'fieldname',\n            'stage' =\u003e 'date'\n        ]);\n    } catch (Exception $e) {\n        echo 'Exception: ',  $e-\u003egetMessage(), \"\\n\";\n    }\n```\n\nUrl encode\n```php\n    \u003c?php\n    \n    require_once 'vendor/autoload.php';\n\n    $fields['first_name'] = \"John\";\n    $fields['last_name']  = \"Doe\";\n    $fields['address1']   = \"123 Fake St\";\n    $fields['phone_number']   = \"18002474747\";\n    \n    try {\n        $agentApi = VicidialApi::create(\n            getenv('YOUR_VICIDIAL_IP'),\n            getenv('YOUR_VICIDIAL_USER'),\n            getenv('YOUR_VICIDIAL_PASSWORD'),\n            \"test\",\n            false\n        )-\u003eadmin();\n        echo $agentApi\n        -\u003ewithUrlEncode(true)\n        -\u003eaddLead($fields);\n    } catch (Exception $e) {\n        echo 'Exception: ', $e-\u003egetMessage(), \"\\n\";\n    }\n```\n\nLogin remote agent\n\n```php\n    \u003c?php\n    \n    require_once 'vendor/autoload.php';\n    \n    try {\n        $remoteAgent = VicidialApi::createWithBasicAuth(\n            getenv('YOUR_VICIDIAL_IP'),\n            getenv('YOUR_VICIDIAL_API_USER'),\n            getenv('YOUR_VICIDIAL_API_PASSWORD'),\n            getenv('YOUR_VICIDIAL_REMOTE_AGENT'),\n            getenv('YOUR_VICIDIAL_REMOTE_PASSWORD'),\n        )-\u003eremoteAgent();\n        $remoteAgent-\u003eactive(\n            getenv('agentId'),\n            getenv('confExten'),\n        );\n        $remoteAgent-\u003ehangUp(\n            \"gabriel\",\n            [\n            'status' =\u003e 'SALE',\n            ]\n]\n        );\n        $remoteAgent-\u003einActive(\n            getenv('agentId'),\n            getenv('confExten'),\n        );\n    } catch (Exception $e) {\n        echo 'Exception: ',  $e-\u003egetMessage(), \"\\n\";\n    }\n```\n\n\n### Docs:\n- [Agent](https://github.com/masterfermin02/vicidial-api-wrapper/blob/main/docs/agent.md)\n- [Admin](https://github.com/masterfermin02/vicidial-api-wrapper/blob/main/docs/admin.md)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasterfermin02%2Fvicidial-api-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmasterfermin02%2Fvicidial-api-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasterfermin02%2Fvicidial-api-wrapper/lists"}