title: Creating an outgoing call using Asterisk Manager and "pyst"
body: <p>I am trying to write some automation tests which make a phone call to my local Asterisk instance and then check that a receiving SIP client has received the call.</p>
  
  <p>It is my understanding that I can create an outgoing call event using the Asterisk Manager. To do this I have been trying to use the Python 'pyst' library.</p>
  
  <p>I have not been able to find any working examples of how to implement this scenario. From the information I have managed to gather, I have come up with this script:</p>
  
  <pre><code>from asterisk import manager
  
  HOST = 'localhost'
  PORT = 5068
  
  m = manager.Manager()
  
  m.connect( HOST )
  
  m.login( 'admin', 'temp123' )
  targetURL = '441610000001'
  
  response = m.originate(
      targetURL ,
      's',
      context='outgoing',
      priority='1'
      )
  
  print m.status()
  
  m.logoff()
  
  m.close()
  </code></pre>
  
  <p>This script reports a 'success' response from Asterisk Manager but does not actually create an outgoing call.</p>
  
  <p>Has anyone written a script to do this in python?</p>
  
  <p>I am only familiar with the Python language so solutions in other languages wouldn't be very helpful for me!</p>