Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use PastumComponentPAMIClientClient;
- /* These are (in order) the options we can pass to PAMI client:
- *
- * The hostname or ip address where Asterisk AMI is listening
- * The scheme can be tcp:// or tls://
- * The port where Asterisk AMI is listening
- * Username configured in manager.conf
- * Password configured for the above user
- * Connection timeout in milliseconds
- * Read timeout in milliseconds
- */
- $options = array(
- 'host' => '127.0.0.1',
- 'scheme' => 'tcp://',
- 'port' => 9999,
- 'username' => 'admin',
- 'secret' => 'mysecret',
- 'connect_timeout' => 10000,
- 'read_timeout' => 10000
- );
- $client = new Client($options);
- // Open the connection
- $client->open();
- // Close the connection
- $client->close();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement