PHPackages                             orkhanahmadov/sipgate - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. orkhanahmadov/sipgate

ActiveLibrary[API Development](/categories/api)

orkhanahmadov/sipgate
=====================

PHP library for integrating with sipgate

1.1.0(6y ago)87.4k1MITPHPPHP &gt;=7.1.0CI failing

Since Jul 22Pushed 5y ago1 watchersCompare

[ Source](https://github.com/orkhanahmadov/sipgate)[ Packagist](https://packagist.org/packages/orkhanahmadov/sipgate)[ Docs](https://github.com/orkhanahmadov/sipgate)[ RSS](/packages/orkhanahmadov-sipgate/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

📞 PHP library for integrating with [sipgate](https://www.sipgate.com)
=====================================================================

[](#telephone_receiver-php-library-for-integrating-with-sipgate)

[![Latest Stable Version](https://camo.githubusercontent.com/4ec959f11dead88622a058a4324a41630d075ff50e3c33d3ce74f2d014053b4a/68747470733a2f2f706f7365722e707567782e6f72672f6f726b68616e61686d61646f762f736970676174652f762f737461626c65)](https://packagist.org/packages/orkhanahmadov/sipgate)[![Latest Unstable Version](https://camo.githubusercontent.com/51d1d2d50bf29b6e28fe4b83bfb0fa50d9d1a9ef4d1146a36f687f0f128581cd/68747470733a2f2f706f7365722e707567782e6f72672f6f726b68616e61686d61646f762f736970676174652f762f756e737461626c65)](https://packagist.org/packages/orkhanahmadov/sipgate)[![Total Downloads](https://camo.githubusercontent.com/ceb9315d73ca1097ceb64d32e55d58c1e9d402580cbfdfce4e4252f735cbf6b8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f726b68616e61686d61646f762f73697067617465)](https://packagist.org/packages/orkhanahmadov/sipgate)[![GitHub license](https://camo.githubusercontent.com/05261005a65982e03a25685e04aace56ce0ac027914941a9c78b19e05210c1fe/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6f726b68616e61686d61646f762f736970676174652e737667)](https://github.com/orkhanahmadov/sipgate/blob/master/LICENSE.md)

[![Build Status](https://camo.githubusercontent.com/018447f159689fdb72c7a03fec8333be7cbd0a20a00d6536e767c74835e4e194/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6f726b68616e61686d61646f762f736970676174652e737667)](https://travis-ci.org/orkhanahmadov/sipgate)[![Test Coverage](https://camo.githubusercontent.com/8d46cba09477f4f71da42205e74caef08b34135c9731d4cf344048a22d332afb/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f64336265313764333536366265373032373033372f746573745f636f766572616765)](https://codeclimate.com/github/orkhanahmadov/sipgate/test_coverage)[![Maintainability](https://camo.githubusercontent.com/4073ae2cfa16f5560a85f23c31136f28defc162548146efa244ea5672273900f/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f64336265313764333536366265373032373033372f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/orkhanahmadov/sipgate/maintainability)[![Quality Score](https://camo.githubusercontent.com/18924833aec87fad392681448aa364d6e5bb55f99926a92c5c84200ac30edd2b/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6f726b68616e61686d61646f762f736970676174652e737667)](https://scrutinizer-ci.com/g/orkhanahmadov/sipgate)[![StyleCI](https://camo.githubusercontent.com/4109b4e807701e0e8505bf36662f641c253f3a0db5bc735dc656000735d53c3f/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3138353830353130362f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/185805106)

Requirements
------------

[](#requirements)

**PHP 7.1** or higher and `json` extension.

Installation
------------

[](#installation)

```
composer require innoscripta/sipgate
```

Usage
-----

[](#usage)

Initialize `Sipgate` class:

```
$sipgate = \Orkhanahmadov\Sipgate\Sipgate();
```

**Basic authentication**

You can pass basic authentication username and password when initializing class:

```
$sipgate = \Orkhanahmadov\Sipgate\Sipgate('example@example.com', 'secret');
```

Or you can set basic authentication with `setBasicAuthCredentials()` method:

```
$sipgate = \Orkhanahmadov\Sipgate\Sipgate();
$sipgate->setBasicAuthCredentials('example@example.com', 'secret');
```

**Account information:**

```
$sipgate->account();
```

Returns array of account details.

**Get users:**

```
$sipgate->users();
```

Returns array of users registered under account. Each item in array is instance of `Orkhanahmadov\Sipgate\Resources\User` and has following properties:

```
$user->id; // string
$user->firstname; // string
$user->lastname; // string
$user->email; // string
$user->defaultDevice; // string
$user->busyOnBusy; // bool
$user->addressId; // string
$user->directDialIds; // array
$user->admin; // bool
```

**Get user devices:**

To get user's devices use `devices()` method and pass a user instance or user ID.

```
$sipgate->devices($user);
// or
$sipgate->devices('ABC-123');
```

Returns array of devices registered for given user. Each item in array is instance of `Orkhanahmadov\Sipgate\Resources\Device` and has following properties:

```
$device->id; // string
$device->alias; // string
$device->type; // string
$device->online; // bool
$device->dnd; // bool
$device->activePhonelines; // array
$device->activeGroups; // array
$device->credentials; // array
$device->registered; // array
$device->emergencyAddressId; // string
$device->addressUrl; // string
```

**Active calls:**

Use `calls()` method to get list of currently established calls.

```
$sipgate->calls();
```

Returns array of currently established calls. Each item in array is instance of `Orkhanahmadov\Sipgate\Resources\Call` and has following properties:

```
$call->id; // string
$call->firstname; // string
$call->lastname; // string
$call->email; // string
$call->defaultDevice; // string
$call->busyOnBusy; // bool
$call->addressId; // string
$call->directDialIds; // array
$call->admin; // bool
```

**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.

```
$sipgate->call($device, $callee, $callerId);
```

Returns call's session ID.

**Hangup ongoing call:**

Use `hangup()` method to hangup ongoing call. Method accepts call ID as parameter:

```
$sipgate->hangup('ABC-123');
```

**Record ongoing call:**

Use `record()` method to record ongoing call. Method accepts 3 parameters:

- `$callId` - Unique call ID.
- `$value` - `true` or `false`, defines start or stop of recording.
- `$announcement` - `true` or `false`, defines if you want to play announcement about call being recorded.

```
$sipgate->record($callId, $value, $announcement);
```

**Call history:**

Use `history()` method to get call history. Method accepts array of options:

- `connectionIds` - `array`, defines list of extensions
- `types` - `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`, set `true` if you want to receive only archived history items
- `starred` - 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](https://en.wikipedia.org/wiki/ISO_8601) format
- `to` - Defines end date of history. Must be in [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) format
- `phonenumber` - Defines phone number to search in history
- `limit` - Defines "per page" value for history items
- `offset` - Defines "offset" value for history items

```
$sipgate->history(['from' => '2019-07-10T19:32:18Z', 'to' => '2019-07-22T19:32:18Z']);
```

Returns array of history items. Each item in array is instance of `Orkhanahmadov\Sipgate\Resources\History` and has following properties:

```
$history->id; // string
$history->source; // string
$history->target; // string
$history->sourceAlias; // string
$history->targetAlias; // string
$history->type; // string
$history->created; // string
$history->lastModified; // string
$history->direction; // string
$history->incoming; // bool
$history->status; // string
$history->connectionIds; // array
$history->read; // bool
$history->archived; // bool
$history->note; // string
$history->endpoints; // array
$history->starred; // bool
$history->labels; // array
$history->callId; // string
$history->recordingUrl; // string
$history->recordings; // array
$history->duration; // int
$history->responder; // string
$history->responderAlias; // string
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Orkhan Ahmadov](https://github.com/orkhanahmadov)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~8 days

Total

2

Last Release

2526d ago

PHP version history (2 changes)1.0.0PHP &gt;=7.2.0

1.1.0PHP &gt;=7.1.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/c82e54991e0224fdc49d34ee60d0cfce5ea0cca1cd59771155e3b372d1fa1d11?d=identicon)[orkhanahmadov](/maintainers/orkhanahmadov)

---

Top Contributors

[![orkhanahmadov](https://avatars.githubusercontent.com/u/7041590?v=4)](https://github.com/orkhanahmadov "orkhanahmadov (80 commits)")

---

Tags

php-librarysipsipgatetelephonysipsipgate

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/orkhanahmadov-sipgate/health.svg)

```
[![Health](https://phpackages.com/badges/orkhanahmadov-sipgate/health.svg)](https://phpackages.com/packages/orkhanahmadov-sipgate)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k34](/packages/neuron-core-neuron-ai)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.3M7](/packages/avalara-avataxclient)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2478.1k](/packages/filescom-files-php-sdk)[aimeos/prisma

A powerful PHP package for integrating media related Large Language Models (LLMs) into your applications

1942.4k4](/packages/aimeos-prisma)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
