Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/plinker-rpc/asterisk
An Asterisk component which hooks into the Asterisk Management Interface on remote systems.
https://github.com/plinker-rpc/asterisk
Last synced: 27 days ago
JSON representation
An Asterisk component which hooks into the Asterisk Management Interface on remote systems.
- Host: GitHub
- URL: https://github.com/plinker-rpc/asterisk
- Owner: plinker-rpc
- License: mit
- Created: 2017-09-18T22:22:23.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-05-10T03:55:16.000Z (over 6 years ago)
- Last Synced: 2024-11-18T09:55:14.702Z (2 months ago)
- Language: PHP
- Homepage: https://plinker-rpc.github.io/asterisk/
- Size: 163 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING
- License: LICENSE
Awesome Lists containing this project
README
# PlinkerRPC - Asterisk
!!! This component is no longer being actively developed, though bugs will be fixed if reported.
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.## Install
Require this package with composer using the following command:
``` bash
$ composer require plinker/asterisk
```## Client
Creating a client instance is done as follows:
'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' => ''
]
]);
## MethodsOnce setup, you call the class though its namespace to its method.
### Command
Execute ASM command.
**Call**
```
$result = $client->asterisk->command('sip show peers');
```**Response**
``````
### Get Queue
Connect into AMI and issue asterisk command [queue show *].
**Call**
```
$result = $client->asterisk->getQueue('foo');
```**Response**
``````
### Show Channels
Connect into AMI and issue asterisk command [core show channels].
**Call**
```
$result = $client->asterisk->coreShowChannels();
```**Response**
```
Array
(
'active_channels' => 0,
'active_calls' => 0,
'calls_processed' => 0
}
```And other methods see: `vendor/asterisk/src/Asterisk.php`
## Testing
There are no tests setup for this component.
## Contributing
Please see [CONTRIBUTING](https://github.com/plinker-rpc/asterisk/blob/master/CONTRIBUTING) for details.
## Security
If you discover any security related issues, please contact me via [https://cherone.co.uk](https://cherone.co.uk) instead of using the issue tracker.
## Credits
- [Lawrence Cherone](https://github.com/lcherone)
- [All Contributors](https://github.com/plinker-rpc/asterisk/graphs/contributors)## 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](https://www.paypal.me/lcherone), thanks.## Sponsors
Get your company or name listed throughout the documentation and on each github repository, contact me at [https://cherone.co.uk](https://cherone.co.uk) for further details.
## License
The MIT License (MIT). Please see [License File](https://github.com/plinker-rpc/asterisk/blob/master/LICENSE) for more information.
See the [organisations page](https://github.com/plinker-rpc) for additional components.