PHPackages                             hsyir/simotel-laravel-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. hsyir/simotel-laravel-connect

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

hsyir/simotel-laravel-connect
=============================

All thing you need to keep connected simotel with laravel

1.2.2(5y ago)4471[1 issues](https://github.com/hsyir/simotel-laravel-connect/issues)PHPPHP ^7.2.5

Since Sep 19Pushed 5y ago1 watchersCompare

[ Source](https://github.com/hsyir/simotel-laravel-connect)[ Packagist](https://packagist.org/packages/hsyir/simotel-laravel-connect)[ RSS](/packages/hsyir-simotel-laravel-connect/feed)WikiDiscussions master Synced yesterday

READMEChangelog (4)DependenciesVersions (7)Used By (0)

پکیح لاراول ارتباط با سیموتل
============================

[](#پکیح-لاراول-ارتباط-با-سیموتل)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/f50636d1b77da5cb1ce4fca4078202099e2d1a737334fd2d186ef0024b2ed062/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f68737969722f73696d6f74656c2d6c61726176656c2d636f6e6e6563742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/hsyir/simotel-laravel-connect/?branch=master)[![Build Status](https://camo.githubusercontent.com/149c00023f17b56a1b84fad4714a6a964b560d2e0ab94e8da605b9ecc3530e6b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f68737969722f73696d6f74656c2d6c61726176656c2d636f6e6e6563742f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/hsyir/simotel-laravel-connect/build-status/master)[![Code Intelligence Status](https://camo.githubusercontent.com/c9ddd8a8a718904be911c81fd4736e941fc6d0e2e78496f02d5ff463f4694604/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f68737969722f73696d6f74656c2d6c61726176656c2d636f6e6e6563742f6261646765732f636f64652d696e74656c6c6967656e63652e7376673f623d6d6173746572)](https://scrutinizer-ci.com/code-intelligence)

ارتباط با Simotel بوسیله لاراول

- [نصب](#%D9%86%D8%B5%D8%A8)
- [سازگاری با سیموتل](#%D8%B3%D8%A7%D8%B2%DA%AF%D8%A7%D8%B1%DB%8C-%D8%A8%D8%A7-%D8%B3%DB%8C%D9%85%D9%88%D8%AA%D9%84)
- [Simotel Api](#simotel-api)
- [Simotel Event Api](#simotel-event-api)
- [Smart Api](#smart-api)

نصب
---

[](#نصب)

با استفاده از کامپوزر و لاراول 6 به بعد این پکیج را با فرمان زیر نصب کنید:

```
composer require hsyir/simotel-laravel-connect

```

سپس به وسیله اجرای فرمان زیر فایل کانفیگ ساخته خواهد شد:

```
php artisan vendor:publish --provider=Hsyir\\SimotelConnect\\SimotelApiServiceProvider

```

سازگاری با سیموتل
-----------------

[](#سازگاری-با-سیموتل)

 ورژن پکیج لاراولورژن نرم افزار سیموتل1.\*5.2.5Simotel Api
-----------

[](#simotel-api)

Simotel Api یکی از قابلیت های قدرتمند نرم افزار سیموتل است، بوسیله این Api میتوان برخی اعمال تعریف شده روی سیموتل را از راه دور و بوسیله فریمورک قدرتمند لاراول انجام داد.

#### اتصال به سیموتل

[](#اتصال-به-سیموتل)

برای تعریف آدرس سرور سیموتل و اطلاعات ورود در فایل کانفیگ simotel.php مقادیر زیر را تغییر دهید:

```
"simotelApi" => [
        "apiUrl" => env("SIMOTEL_API_SERVER", "http://127.0.0.1/api/v1/"),
        "user" => env("SIMOTEL_API_USER", "user"),
        "pass" => env("SIMOTEL_API_PASS", "pass"),
    ],
```

#### نحوه استفاده

[](#نحوه-استفاده)

```
$simotelApi = new \Hsy\SimotelConnect\SimotelApi();
$result = $simotelApi->pauseInQueue($queue, $agent);

if(!$result)
    $errorMessage = $simotelApi->getMessage();
```

#### متد ها

[](#متد-ها)

```
boolean addToQueue($queue, $source, $agent, $penalty = 0)
boolean removeFromQueue($queue, $agent)
boolean pauseInQueue($queue, $agent)
boolean resumeInQueue($queue, $agent)
```

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

[](#simotel-event-api)

Simotel Event Api (SEA) سرویس انتشار رویداد های سیموتل است. این پکیج امکان استفاده از این سرویس را بوسیله قابلیت های Events و Listeners در لاراول امکان پذیر می کند. برای استفاده از Event های موجود در SEA می توانید از کلاس های زیر در EventServiceProvider لاراول استفاده کنید.

```
"Cdr" => \Hsy\SimotelConnect\Events\SimotelEventCdr::class,
"NewState" => \Hsy\SimotelConnect\Events\SimotelEventNewState::class,
"ExtenAdded" => \Hsy\SimotelConnect\Events\SimotelEventExtenAdded::class,
"ExtenRemoved" => \Hsy\SimotelConnect\Events\SimotelEventExtenRemoved::class,
"IncomingCall" => \Hsy\SimotelConnect\Events\SimotelEventIncomingCall::class,
"OutGoingCall" => \Hsy\SimotelConnect\Events\SimotelEventOutgoingCall::class,
"Transfer" => \Hsy\SimotelConnect\Events\SimotelEventTransfer::class,
```

#### نمونه Listener :

[](#نمونه-listener-)

```
namespace App\Listeners;

class UpdateCallCdrData
{
   /**
    * Handle the event.
    *
    * @param object $event
    * @return void
    */
    public function handle($event)
    {
      $cdrData = $event->apiData;

      //

    }

 }
```

پراپرتی apiData حاوی اطلاعات ارسالی از سیموتل است که به Listener ارسال می شود.

#### نمونه Controller :

[](#نمونه-controller-)

```
namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use Hsy\SimotelConnect\SimotelEventApi;
use Illuminate\Http\Request;

class SeaController extends Controller
{
    public function dispatchEvent(Request $request)
    {
        $simotelEventApi = new  SimotelEventApi;
        $simotelEventApi->dispatchSimotelEvent($request->all());
    }
}
```

Smart Api
---------

[](#smart-api)

برای استفاده از این قابلیت ویژه نرم افزار سیموتل در فریمورک لاراول ابتدا باید یک کلاس به صورت زیر ایجاد کنید. برای استفاده از دستورات آماده پکیج از Trait با نام SmartApiCommands باید استفاده نمایید.

```
namespace App\Classes;

use Hsy\SimotelConnect\SmartApiCommands;

class SmartApiMethodsRepo
{
    use SmartApiCommands;

    // نام متد باید مساوی با نام کامپوننت SmartApi در نقشه تماس سیموتل باشد.
    public function select_queue($apiData)
    {

        $this->cmdGetData("SelectQueue", 4, 2);
        $this->cmdExit("1");

        if(true)
            return $this->okResponse();
        //else
            return $this->errorResponse();
    }

 }
```

#### متدهای قابل استفاده :

[](#متدهای-قابل-استفاده-)

```
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)
```

جهت معرفی کلاس ایجاد شده در فایل کانفیگ simotel.php مقدار زیر را تنظیم کنید.

```
 "smartApi" => [
      "methodsRepositoryClass" => \App\Classes\SmartApiMethodsRepo::class,
    ],
```

#### نمونه Controller :

[](#نمونه-controller--1)

```
namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use Hsy\SimotelConnect\SmartApi;
use Illuminate\Http\Request;

class SmartApiController extends Controller
{
    public function call(Request $request)
    {
        $smartApi = new SmartApi;
        $response = $smartApi->callApi($request->all());
        return response()->json($response);
    }
}
```

License
-------

[](#license)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity54

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 ~0 days

Total

6

Last Release

2059d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3897547?v=4)[Hossein Yaghmaee](/maintainers/hsyir)[@hsyir](https://github.com/hsyir)

---

Top Contributors

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

### Embed Badge

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

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

PHPackages © 2026

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