PHPackages                             pikart/goip - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. pikart/goip

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

pikart/goip
===========

Goip server and client

v2.0.0(3w ago)308.5k↓43.3%8[2 issues](https://github.com/styryl/goip/issues)[1 PRs](https://github.com/styryl/goip/pulls)MITPHPPHP ^8.5CI failing

Since Apr 14Pushed 6mo ago2 watchersCompare

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

READMEChangelogDependencies (14)Versions (10)Used By (0)

GoIP
====

[](#goip)

PHP client and UDP server for Hybertone / Dbltek GoIP GSM gateways.

The package can receive gateway messages over UDP and send SMS messages through the GoIP HTTP or UDP SMS APIs. It supports GoIP1, GoIP4, GoIP8 and GoIP16 devices.

Features
--------

[](#features)

- Receive GoIP UDP packets with PHP sockets or ReactPHP
- Send SMS messages through the GoIP HTTP API
- Send SMS messages through the GoIP UDP socket API
- Handle incoming SMS, delivery reports, call events and line state changes
- Run a local debug receiver from the command line

Contents
--------

[](#contents)

- [Installation](#installation)
- [Quick Start](#quick-start)
- [Receiving Messages](#receiving-messages)
- [Sending SMS](#sending-sms)
- [Debug CLI](#debug-cli)
- [Development](#development)

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

[](#requirements)

- PHP `^8.5`
- `ext-sockets`

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

[](#installation)

```
composer require pikart/goip
```

Quick Start
-----------

[](#quick-start)

Start a UDP receiver:

```
use Pikart\Goip\Message;
use Pikart\Goip\ReactServer;
use Pikart\Goip\ServerFactory;

$server = ServerFactory::default(ReactServer::class, '0.0.0.0', 44444);

$server->listenAll(static function (Message $message): void {
    var_dump($message->attributes());
});

$server->run();
```

Send an SMS over HTTP:

```
use Pikart\Goip\Sms\HttpSms;

$sms = new HttpSms('http://192.168.10.23', 1, 'goip-admin', 'secret');

$response = $sms->send('+15551234567', 'Your verification code is 482913.');
```

Receiving Messages
------------------

[](#receiving-messages)

Two server implementations are available:

ServerRuntimeUse when`Pikart\Goip\UdpServer`PHP socketsYou want the smallest blocking server`Pikart\Goip\ReactServer`ReactPHPYou already use a ReactPHP event loop```
use Pikart\Goip\Messages\ReceiveMessage;
use Pikart\Goip\ReactServer;
use Pikart\Goip\ServerFactory;

$server = ServerFactory::default(ReactServer::class, '0.0.0.0', 44444);

$server->listen(ReceiveMessage::class, static function (ReceiveMessage $message): void {
    $sender = $message->srcnum();
    $text = $message->msg();
});

$server->run();
```

To listen for every supported message:

```
use Pikart\Goip\Message;

$server->listenAll(static function (Message $message): void {
    $type = $message::class;
    $attributes = $message->attributes();
    $remoteHost = $message->request()->host();
    $remotePort = $message->request()->port();
});
```

Listeners can be removed by their returned identifier:

```
$listenerId = $server->listenAll($listener);

$server->off($listenerId);
```

### Factory

[](#factory)

```
ServerFactory::default(string $serverClass, string $host, int $port, array $args = []): Server
```

Supported message classes:

- `Pikart\Goip\Messages\RequestMessage` - keep-alive packets with gateway line information
- `Pikart\Goip\Messages\ReceiveMessage` - incoming SMS
- `Pikart\Goip\Messages\DeliverMessage` - SMS delivery report
- `Pikart\Goip\Messages\HangupMessage` - call end
- `Pikart\Goip\Messages\RecordMessage` - call start
- `Pikart\Goip\Messages\StateMessage` - gateway line state change
- `Pikart\Goip\Messages\ExpiryMessage` - expiry notification
- `Pikart\Goip\Messages\NotSupportedMessage` - unsupported packet type

For production receivers, keep listener work short and hand off heavier processing to a queue.

Sending SMS
-----------

[](#sending-sms)

Both SMS clients implement `Pikart\Goip\Contracts\Sms`:

```
public function send(string $number, string $message): array;
```

### HTTP

[](#http)

```
use Pikart\Goip\Sms\HttpSms;

$sms = new HttpSms('http://192.168.10.23', 1, 'goip-admin', 'secret');
$sms->setGuzzleTimeout(5);

$response = $sms->send('+15551234567', 'Your verification code is 482913.');
```

Successful response:

```
[
    'id' => '0000021f',
    'raw' => 'Sending,L1 Send SMS to:+15551234567; ID:0000021f',
    'status' => 'send',
]
```

### UDP Socket

[](#udp-socket)

```
use Pikart\Goip\Sms\SocketSms;

$sms = new SocketSms(
    '192.168.10.23',
    9991,
    '123',
    'secret',
    ['timeout' => 5]
);

$response = $sms->send('+15551234567', 'Your verification code is 482913.');
```

Successful response:

```
[
    'sendid' => '123',
    'telid' => '1',
    'sms_no' => '0',
    'raw' => 'OK 123 1 0',
]
```

Debug CLI
---------

[](#debug-cli)

The repository includes a small development CLI:

```
php bin/goip-debug debug:server --host=0.0.0.0 --port=44444 --driver=udp
php bin/goip-debug debug:server --host=0.0.0.0 --port=44444 --driver=react
```

It prints received packets as JSON. CLI options override environment variables.

Server options:

OptionEnvDefault`--host``GOIP_DEBUG_HOST``0.0.0.0``--port``GOIP_DEBUG_PORT``44444``--driver``GOIP_DEBUG_DRIVER``udp``--sleep``GOIP_DEBUG_SLEEP``5000`Docker defaults for the debug server can be configured in `.env`:

```
cp .env.example .env
make debug_server
```

Manual SMS checks can be run with:

```
php bin/goip-debug debug:send-sms --transport=http --host=http://192.168.10.23 --line=1 --login=goip-admin --password=secret --to=+15551234567 --message="Your verification code is 482913."
php bin/goip-debug debug:send-sms --transport=socket --host=192.168.10.23 --port=9991 --session=sms-20260727-001 --password=secret --to=+15551234567 --message="Your verification code is 482913."
```

Development
-----------

[](#development)

```
make build
make install
make test
```

Run checks separately:

```
make ecs
make phpmd
make phpstan
make phpunit
```

###  Health Score

56

—

FairBetter than 97% of packages

Maintenance78

Regular maintenance activity

Popularity35

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 88.2% 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 ~382 days

Recently: every ~573 days

Total

7

Last Release

21d ago

Major Versions

v1.0.5 → v2.0.02026-07-27

PHP version history (2 changes)v1.0.0PHP &gt;=7.4

v2.0.0PHP ^8.5

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1575669?v=4)[styryl](/maintainers/styryl)[@styryl](https://github.com/styryl)

---

Top Contributors

[![styryl](https://avatars.githubusercontent.com/u/1575669?v=4)](https://github.com/styryl "styryl (30 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")

---

Tags

clientserversmsgatewaygoip

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/pikart-goip/health.svg)

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

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k555.0M2.8k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k832.6k54](/packages/neuron-core-neuron-ai)[nativephp/mobile

NativePHP for Mobile

1.1k102.1k146](/packages/nativephp-mobile)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.3M49](/packages/tencentcloud-tencentcloud-sdk-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

353.6k](/packages/eslazarev-wildberries-sdk)[tempest/framework

The PHP framework that gets out of your way.

2.3k37.6k21](/packages/tempest-framework)

PHPackages © 2026

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