Skip to content

Commit aabc226

Browse files
committed
Add README
1 parent 2aebd2a commit aabc226

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# clue/asterisk-ami-react [![Build Status](https://travis-ci.org/clue/reactphp-asterisk-ami.png?branch=master)](https://travis-ci.org/clue/reactphp-asterisk-ami)
2+
3+
Simple async, event-driven access to the Asterisk Manager Interface (AMI)
4+
5+
> Note: This project is in eary alpha stage! Feel free to report any issues you encounter.
6+
7+
## Quickstart example
8+
9+
Once [installed](#install), you can use the following code to access your local
10+
Asterisk Telephony instance and issue some simple commands via AMI:
11+
12+
```php
13+
$factory = new Factory($loop);
14+
15+
$factory->createClient('username:secret@localhost')->then(function (Client $client) {
16+
echo 'Client connected' . PHP_EOL;
17+
18+
$api = new Api($client);
19+
$api->listCommands()->then(function (Response $response) {
20+
echo 'Available commands:' . PHP_EOL;
21+
var_dump($response);
22+
});
23+
});
24+
25+
$loop->run();
26+
```
27+
28+
See also the [examples](example).
29+
30+
## Install
31+
32+
The recommended way to install this library is [through composer](http://getcomposer.org). [New to composer?](http://getcomposer.org/doc/00-intro.md)
33+
34+
```JSON
35+
{
36+
"require": {
37+
"clue/asterisk-ami-react": "dev-master"
38+
}
39+
}
40+
```
41+
42+
> Note: This project is currently not listed on packagist.
43+
44+
## License
45+
46+
MIT

0 commit comments

Comments
 (0)