title: Asterisk testsuite: phone not ringing
body: <p>I have <code>extensions.conf</code> as:</p>
  
  <pre><code>[users]
  exten=&gt;111,1,Dial(SIP/demo-alice,5)
  exten=&gt;111,n,UserEvent(TestResult,result:pass)
  exten=&gt;222,1,Dial(SIP/demo-bob,5)
  </code></pre>
  
  <p>It works, phones can dial each other.
  In python test:</p>
  
  <pre><code>df = ami.originate(
   channel = "Local/222@users",
   exten = "111",
   priority = "1",
   context = "users")
  </code></pre>
  
  <p>While launching the test, it failes and gives me a warning:</p>
  
  <pre><code>Unhandled error in Deferred:
  Unhandled Error
  Traceback (most recent call last):
    File "/usr/lib/python2.7/dist-packages/starpy/manager.py", line 153, in lineReceived
      self.dispatchIncoming()  # does dispatch and clears cache
    File "/usr/lib/python2.7/dist-packages/starpy/manager.py", line 241, in dispatchIncoming
      callback(message)
    File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 362, in callback
      self._startRunCallbacks(result)
    File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 458, in _startRunCallbacks
      self._runCallbacks()
  --- &lt;exception caught here&gt; ---
    File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 545, in _runCallbacks
      current.result = callback(current.result, *args, **kw)
    File "/usr/lib/python2.7/dist-packages/starpy/manager.py", line 347, in errorUnlessResponse
      raise error.AMICommandFailure(message)
  starpy.error.AMICommandFailure: {'message': 'Originate failed', 'response': 'Error', 'actionid': 'VirtATS3-36015280-2'}
  </code></pre>
  
  <p>Originating through CLI works as it should:</p>
  
  <pre><code>channel originate Local/222@users extension 111@users
  </code></pre>
  
  <p>222 rings, after answering the call 111 begins to ring.</p>
  
  <h1>UPDATE</h1>
  
  <p>Figured out how that I can send SIP headers in <code>ami.originate()</code>. Found <a href="http://forums.asterisk.org/viewtopic.php?f=1&amp;t=18531" rel="nofollow">here</a>. The bad thing that it is not working - originate fails like in a error logged above. Sending headers in dialplan is not a solution either. Any help?</p>
  
  <pre><code>    df = ami.originate(
          channel = "Local/222@users",
          exten = "111",
          priority = "1",
          context = "users",
          variable = {
              "SIPAddHeader":"Call-Info: answer-after=0"
              })
  </code></pre>