2017 © Pedro Peláez
 

library asterisk

An Asterisk component which hooks into the Asterisk Management Interface on remote systems.

image

plinker/asterisk

An Asterisk component which hooks into the Asterisk Management Interface on remote systems.

  • Thursday, May 10, 2018
  • by lcherone
  • Repository
  • 1 Watchers
  • 1 Stars
  • 291 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 19 Versions
  • 0 % Grown

The README.md

PlinkerRPC - Asterisk

!!! This component is no longer being actively developed, though bugs will be fixed if reported., (*1)

An Asterisk component which hooks into the Asterisk Management Interface (AMI) on remote systems. Using it adds additional layer of security as you can now lock down AMI to listen on only on localhost., (*2)

Install

Require this package with composer using the following command:, (*3)

``` bash $ composer require plinker/asterisk, (*4)


## Client Creating a client instance is done as follows: <?php require 'vendor/autoload.php'; /** * Initialize plinker client. * * @param string $server - URL to server listener. * @param string $config - server secret, and/or a additional component data */ $client = new \Plinker\Core\Client( 'http://example.com/server.php', [ 'secret' => 'a secret password', 'database' => [ 'dsn' => 'mysql:host=127.0.0.1;dbname=asterisk', 'username' => '', 'password' => '', 'database' => '', 'freeze' => false, 'debug' => false ], 'ami' => [ 'server' => '127.0.0.1', 'port' => '5038', 'username' => '', 'password' => '' ] ] ); // or using global function $client = plinker_client('http://example.com/server.php', 'a secret password', [ 'database' => [ 'dsn' => 'mysql:host=127.0.0.1;dbname=asterisk', 'username' => '', 'password' => '', 'database' => '', 'freeze' => false, 'debug' => false ], 'ami' => [ 'server' => '127.0.0.1', 'port' => '5038', 'username' => '', 'password' => '' ] ]); ## Methods Once setup, you call the class though its namespace to its method. ### Command Execute ASM command. **Call**

$result = $client->asterisk->command('sip show peers');, (*5)


**Response**

### Get Queue Connect into AMI and issue asterisk command [queue show *]. **Call**

$result = $client->asterisk->getQueue('foo');, (*6)


**Response**

### Show Channels Connect into AMI and issue asterisk command [core show channels]. **Call**

$result = $client->asterisk->coreShowChannels();, (*7)


**Response**

Array ( 'active_channels' => 0, 'active_calls' => 0, 'calls_processed' => 0 } ```, (*8)

And other methods see: vendor/asterisk/src/Asterisk.php, (*9)

Testing

There are no tests setup for this component., (*10)

Contributing

Please see CONTRIBUTING for details., (*11)

Security

If you discover any security related issues, please contact me via https://cherone.co.uk instead of using the issue tracker., (*12)

Credits

Development Encouragement

If you use this project and make money from it or want to show your appreciation, please feel free to make a donation https://www.paypal.me/lcherone, thanks., (*13)

Sponsors

Get your company or name listed throughout the documentation and on each github repository, contact me at https://cherone.co.uk for further details., (*14)

License

The MIT License (MIT). Please see License File for more information., (*15)

See the organisations page for additional components., (*16)

The Versions

10/05 2018

dev-master

9999999-dev https://github.com/plinker-rpc

An Asterisk component which hooks into the Asterisk Management Interface on remote systems.

  Sources   Download

MIT

The Requires

 

rpc asterisk ami

10/05 2018

v0.3.6

0.3.6.0 https://github.com/plinker-rpc

An Asterisk component which hooks into the Asterisk Management Interface on remote systems.

  Sources   Download

MIT

The Requires

 

rpc asterisk ami

04/05 2018

v0.3.5

0.3.5.0 https://github.com/plinker-rpc

An Asterisk component which hooks into the Asterisk Management Interface on remote systems.

  Sources   Download

MIT

The Requires

 

rpc asterisk ami

04/05 2018

v0.3.4

0.3.4.0 https://github.com/plinker-rpc

An Asterisk component which hooks into the Asterisk Management Interface on remote systems.

  Sources   Download

MIT

The Requires

 

rpc asterisk ami

03/05 2018

v0.3.3

0.3.3.0 https://github.com/plinker-rpc

An Asterisk component which hooks into the Asterisk Management Interface on remote systems.

  Sources   Download

MIT

The Requires

 

rpc asterisk ami

03/05 2018

v0.3.2

0.3.2.0 https://github.com/plinker-rpc

An Asterisk component which hooks into the Asterisk Management Interface on remote systems.

  Sources   Download

MIT

The Requires

 

rpc asterisk ami

25/01 2018

v0.3.1

0.3.1.0 https://github.com/plinker-rpc

An Asterisk component which hooks into the Asterisk Management Interface on remote systems.

  Sources   Download

MIT

The Requires

 

rpc asterisk ami

30/09 2017

v0.3.0

0.3.0.0 https://bitbucket.org/plinker/example/

An Asterisk component which hooks into the Asterisk Management Interface on remote systems.

  Sources   Download

MIT

The Requires

 

rpc asterisk

06/09 2015

v0.1

0.1.0.0

  Sources   Download

MIT