PHPackages                             hsyir/simotel-php-connect - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. hsyir/simotel-php-connect

ActiveLibrary[HTTP &amp; Networking](/categories/http)

hsyir/simotel-php-connect
=========================

Keep connected with simotel in php

17

Since Jul 25Pushed 4y agoCompare

[ Source](https://github.com/hsyir/simotel-php-connect)[ Packagist](https://packagist.org/packages/hsyir/simotel-php-connect)[ RSS](/packages/hsyir-simotel-php-connect/feed)WikiDiscussions main Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

simotel-php-connect
===================

[](#simotel-php-connect)

[![Build Status](https://camo.githubusercontent.com/1de9934b43a2d87c3c028390230d33b0be42428f9964ef083eebb1320174ef38/68747470733a2f2f7472617669732d63692e636f6d2f68737969722f73696d6f74656c2d7068702d636f6e6e6563742e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/hsyir/simotel-php-connect)[![StyleCI](https://camo.githubusercontent.com/5aef6cae2754b9fde56b55dc54fad16237e9763fe9dbdc6e3604ddfa938f803d/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3332353138393233352f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/325189235?branch=master)

> ### Simotel and Laravel
>
> [](#simotel-and-laravel)
>
> if you want to connect to simotel with laravel please visit our laravel package: [nasimtelecom/simotel-laravel-connect](https://github.com/nasimtelecom/simotel-laravel-connect)

Keep connected with Simotel by PHP. Simotel is a wonderful call center software with huge abilities. visit Simotel documents here: [doc.mysup.ir](https://doc.mysup.ir/)

with this package you can easly connect to simotel server by php and do somethings amazing.

- [Install](#install)
- [Simotel Api](#simotel-api)
- [Simotel Event Api](#simotel-event-api)
- [Smart Api](#smart-api)

Install
-------

[](#install)

Use composer to install and autoload the package

```
composer require nasimtelecom/simotel-php-connect

```

Simotel Api
-----------

[](#simotel-api)

Simotel Api help you to connect to simotel server remotely and manage simotel users, queues, trunks, announcements, get reports, send fax and all you need to do with Simotel call center.

#### simotel api connect

[](#simotel-api-connect)

```
use \Hsy\Simotel\Simotel;
use \Hsy\Simotel\SimotelApi\Parameters;

$config = Simotel::getDefaultConfig();
$config["simotelApi"]["connect"]=[
    'user'=> 'apiUser',
    'pass'=> 'apiPass',
    'token'=> 'apiToken',
    'server_address' => 'http://simotelServer',

];

$simotel = new Simotel($config);

$parameters = new Parameters();
$parameters->name = "user name";
$parameters->number = "101";
$parameters->secret = "password";

/**
 * result is instance of \Psr\Http\Message\ResponseInterface
 */
$result = $simotel->connect()->pbx()->users()->add($parameters);
```

Simotel Event Api
-----------------

[](#simotel-event-api)

1. Create listeners for events

```
$simotel = new Simotel();
$simotel->eventApi()->addListener('Cdr', function ($simotelApiData) {
    var_dump($simotelApiData);
});
```

2. Dispatch events after receive request from simotel event api on your api endpoint

> you must put your api endpoint address on Simotel setting

```
use \Hsy\Simotel\Simotel;
$simotelEventApiData =  $_POST["api_data"];
$eventName = $_POST["api_data"]["event_name"];
$simotel = new Simotel();
$simotel->eventApi()->dispatch($eventName,$simotelEventApiData);
```

Simotel Smart Api
-----------------

[](#simotel-smart-api)

1. create smartApp classes and methods that called by smart api apps

**Don't forget to import SmartApiCommands trait**

```
use Hsy\Simotel\SimotelSmartApi\SmartApiCommands;

class PlayWelcomeMessage
{
    use SmartApiCommands;

    public function playAnnounceApp($appData)
    {
        $this->cmdPlayAnnouncement("announcement file name");
        return $this->okResponse();
    }
}

class RestOfApps
{
    use SmartApiCommands;

    public function sayClock($appData)
    {
        $this->cmdSayClock("22:00");

        return $this->okResponse();

    }

    public function interactiveApp($appData)
    {
        if($appData["data"]=="1")
            return $this->okResponse();

        if($appData["data"]=="2")
            return $this->errorResponse();

    }
}
```

there is all commands you can use in smartApp class:

```
cmdPlayAnnouncement($file);
cmdPlayback($file);
cmdExit($exit);
cmdGetData($file,$timeout,$digitsCount);
cmdSayDigit($number);
cmdSayNumber($number);
cmdSayClock($clock);
cmdSayDate($date,$calender);
cmdSayDuration($duration);
cmdSetExten($exten);
cmdSetLimitOnCall($seconds);
cmdMusicOnHold();
```

2. handle received request from simotel smart api

```
$config = Simotel::getDefaultConfig();
$config["smartApi"]["appClasses"] = [
  'playWelcomeMessage' => PlayWelcomeMessage::class,
  '*' => RestOfApps::class,
];

// place this codes where you want grab income requests
// from simotel smartApi calls
$simotel = new Simotel($config);
$appData = $_POST["app_data"];
$jsonResponse = $simotel->smartApiCall($appData)->toJson();
$arrayResponse = $simotel->smartApiCall($appData)->toArray();

echo $jsonResponse;
/*
 if app_name='playAnnounceApp'
	 response = {'ok':1,'commands':'PlayAnnouncement('announcement file name')'}

 if app_name='sayClock'
	 response = {'ok':1,'commands':'SayClock("14:00")'}

 if app_name='interactiveApp'
	 if data=1
		 response = {'ok':1}
	 if data=2
		 response = {'ok':0}
*/
```

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

 Bus Factor1

Top contributor holds 92.6% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/949e8837ce5988d052f7f11fc803df72bc1389800b568f024bb096b24847eb7a?d=identicon)[hsyir](/maintainers/hsyir)

---

Top Contributors

[![hsyir](https://avatars.githubusercontent.com/u/3897547?v=4)](https://github.com/hsyir "hsyir (25 commits)")[![irmorteza](https://avatars.githubusercontent.com/u/12543098?v=4)](https://github.com/irmorteza "irmorteza (2 commits)")

### Embed Badge

![Health badge](/badges/hsyir-simotel-php-connect/health.svg)

```
[![Health](https://phpackages.com/badges/hsyir-simotel-php-connect/health.svg)](https://phpackages.com/packages/hsyir-simotel-php-connect)
```

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M317](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M292](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)

PHPackages © 2026

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