Download the PHP package orkhanahmadov/sipgate without Composer
On this page you can find all versions of the php package orkhanahmadov/sipgate. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download orkhanahmadov/sipgate
More information about orkhanahmadov/sipgate
Files in orkhanahmadov/sipgate
Package sipgate
Short Description PHP library for integrating with sipgate
License MIT
Homepage https://github.com/orkhanahmadov/sipgate
Informations about the package sipgate
:telephone_receiver: PHP library for integrating with sipgate
Requirements
PHP 7.1 or higher and json
extension.
Installation
Usage
Initialize Sipgate
class:
Basic authentication
You can pass basic authentication username and password when initializing class:
Or you can set basic authentication with setBasicAuthCredentials()
method:
Account information:
Returns array of account details.
Get users:
Returns array of users registered under account. Each item in array is instance of Orkhanahmadov\Sipgate\Resources\User
and has following properties:
Get user devices:
To get user's devices use devices()
method and pass a user instance or user ID.
Returns array of devices registered for given user. Each item in array is instance of Orkhanahmadov\Sipgate\Resources\Device
and has following properties:
Active calls:
Use calls()
method to get list of currently established calls.
Returns array of currently established calls. Each item in array is instance of Orkhanahmadov\Sipgate\Resources\Call
and has following properties:
Initiate new call:
Use call()
method to initiate a new call. Method accepts 3 parameters:
$device
- Accepts instance of device or device ID. This defines which device you want to use to make a call.$callee
- Phone number you want to call.$callerId
(optional) - Set this parameter if you want to show different number to callee other. When skipped$device
number will be used.
Returns call's session ID.
Hangup ongoing call:
Use hangup()
method to hangup ongoing call. Method accepts call ID as parameter:
Record ongoing call:
Use record()
method to record ongoing call. Method accepts 3 parameters:
$callId
- Unique call ID.$value
-true
orfalse
, defines start or stop of recording.$announcement
-true
orfalse
, defines if you want to play announcement about call being recorded.
Call history:
Use history()
method to get call history. Method accepts array of options:
connectionIds
-array
, defines list of extensionstypes
-array
, defines list of types you want to receive in history, might contain one of many of following values: "CALL", "VOICEMAIL", "SMS", "FAX"directions
-array
, defines list of call directions you want to receive in history, might contain one of many of following values: "INCOMING", "OUTGOING", "MISSED_INCOMING", "MISSED_OUTGOING"archived
-bool
, settrue
if you want to receive only archived history itemsstarred
- Defines if you want to receive on starred of unstarred history items, one of these: "STARRED", "UNSTARRED"from
- Defines start date of history. Must be in ISO8601 formatto
- Defines end date of history. Must be in ISO8601 formatphonenumber
- Defines phone number to search in historylimit
- Defines "per page" value for history itemsoffset
- Defines "offset" value for history items
Returns array of history items. Each item in array is instance of Orkhanahmadov\Sipgate\Resources\History
and has following properties:
Testing
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Orkhan Ahmadov
- All Contributors
License
The MIT License (MIT). Please see License File for more information.