Advertisement
Guest User

Untitled

a guest
Dec 18th, 2014
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. #!/usr/bin/env php
  2. <?php
  3.  
  4. /******************************************************************/
  5.  
  6. require_once('phpagi/phpagi.php');
  7. require_once('phpagi/phpagi-asmanager.php');
  8. require_once('dbconnect.php');
  9.  
  10. /******************************************************************/
  11.  
  12. $hostM="localhost";
  13. $userM="PWCManager";
  14. $passM="PWC@Manager703";
  15.  
  16.  
  17. $asm = new AGI_AsteriskManager();
  18.  
  19.  
  20. if($asm->connect($hostM,$userM,$passM))
  21. {
  22.  
  23. $number = 3477616074;
  24.  
  25. $callOut_Channel = "Local/$number@callbackPWCTAXI";
  26. $callOut_Context = "callbackPWCTAXI";
  27.  
  28. $call = $asm->send_request('Originate',
  29. array('Channel'=> $callOut_Channel,
  30. 'Timeout'=>'90000',
  31. 'MaxRetries'=>"5",
  32. 'RetryTime'=>"5",
  33. 'ActionID'=>'11111',
  34. 'Context'=> $callOut_Context,
  35. 'Exten'=>'s',
  36. 'Priority'=>1,
  37. 'Async'=>'true',
  38. 'Variable'=> $number,
  39. 'Callerid'=> $number));
  40.  
  41. $asm->disconnect();
  42.  
  43. }
  44.  
  45. ?>
  46.  
  47.  
  48. == Manager 'PWCManager' logged on from 127.0.0.1
  49. == Manager 'PWCManager' logged off from 127.0.0.1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement