Advertisement
Guest User

Untitled

a guest
May 3rd, 2015
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. use PastumComponentPAMIClientClient;
  2.  
  3. /* These are (in order) the options we can pass to PAMI client:
  4. *
  5. * The hostname or ip address where Asterisk AMI is listening
  6. * The scheme can be tcp:// or tls://
  7. * The port where Asterisk AMI is listening
  8. * Username configured in manager.conf
  9. * Password configured for the above user
  10. * Connection timeout in milliseconds
  11. * Read timeout in milliseconds
  12. */
  13. $options = array(
  14. 'host' => '127.0.0.1',
  15. 'scheme' => 'tcp://',
  16. 'port' => 9999,
  17. 'username' => 'admin',
  18. 'secret' => 'mysecret',
  19. 'connect_timeout' => 10000,
  20. 'read_timeout' => 10000
  21. );
  22.  
  23. $client = new Client($options);
  24.  
  25. // Open the connection
  26. $client->open();
  27.  
  28. // Close the connection
  29. $client->close();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement