English | Türkçe
Enhanced API extension for Issabel PBX systems, adding advanced features like call origination, monitoring, CDR access, and channel management.
POSTMAN
https://documenter.getpostman.com/view/14352549/2sAYQcEVeB
- Extended API Capabilities
- Call origination between extensions
- Real-time call monitoring (spy call)
- Active channel monitoring
- Detailed CDR (Call Detail Records) access
- Call recording playback
- Extension details and management
- Issabel PBX System
- PHP 7.4 or higher
- Laravel 8.x or higher (for Laravel integration)
- Asterisk with proper configurations
- Add
v2apiservice.php
to your Issabel PBX system:/var/www/html/pbxapi/controllers/v2apiservice.php
- Add
IssabelPbxApi.php
to your Laravel project:app/Models/IssabelPbxApi.php
use App\Models\IssabelPbxApi;
// Initialize the API
$pbx = new IssabelPbxApi($server, $username, $password);
// Or use the static connection method
$pbx = IssabelPbxApi::connect($server, $username, $password);
$extensions = $pbx->extensions();
$extension = $pbx->extension('1001');
$pbx->originate(
$channel = "SIP/1001",
$extension = "SIP/1002",
$callerID = "Internal Call",
$context = "from-internal",
$timeout = "30000"
);
$channels = $pbx->channels();
$pbx->spyCall(
$channel = "SIP/1001",
$extension = "SIP/1002",
$listenMode = "q",
$callerID = "Monitor"
);
$cdr = $pbx->cdr(
$startDate = "2024-01-01",
$endDate = "2024-01-31",
$filter = "all"
);
$recording = $pbx->cdrPlayer($cdrFile);
Endpoint: POST {{server}}/pbxapi/authenticate
- Description: Authenticates user and returns access token
- Required Parameters:
username
: PBX Admin Usernamepassword
: PBX Admin Password
- Response: Includes
access_token
used for subsequent requests
- Endpoint:
GET {{server}}/pbxapi/extensions
- Authentication: Bearer Token
- Response: List of all extensions
- Endpoint:
GET {{server}}/pbxapi/extensions/{extension_number}
- Authentication: Bearer Token
- Response: Detailed information about the specific extension
- Endpoint:
GET {{server}}/pbxapi/v2apiservice
- Query Parameters:
action
: "channels"
- Response: List of active calls/channels
- Endpoint:
GET {{server}}/pbxapi/manager/originate
- Parameters:
channel
: Caller extension (e.g., "SIP/90002")extension
: Target numbercontext
: Call context (default: "from-internal")timeout
: Answer timeout in mscallerid
: Caller ID display namepriority
: Priority level (default: 1)
- Endpoint:
GET {{server}}/pbxapi/manager/originate
- Parameters:
channel
: Listener extensionapplication
: "ChanSpy"data
: Target extension + mode (e.g., "SIP/8003,q")callerid
: Display name for listener
- Endpoint:
GET {{server}}/pbxapi/v2apiservice
- Query Parameters:
action
: "cdr"start_date
: Start date (YYYY-MM-DD)end_date
: End date (YYYY-MM-DD)extension
: Extension number or "all"
- Endpoint:
GET {{server}}/pbxapi/v2apiservice
- Query Parameters:
action
: "player"file
: Recording file path
- Backup your system before installation
- Secure API access with a firewall
- Keep the system updated regularly