title: Originate call using adhearsion
body: <p>i have searched google, tried to read adhearsion docs and make sense of the examples.  i understand parts of it but am not able to put it together.  i can edit extensions.conf and do agi(agi://localhost) and handle incoming calls in the dialplan.rb.  i have written an ivr that way which is in use in the real world.</p>
  
  <p>i have edited manager.conf and config/setup.rb and when i do ahn - i see </p>
  
  <pre><code> INFO ami: Successful AMI actions-only connection into ...@127.0.0.1
   INFO ami: Successful AMI events-only connection into ...@127.0.0.1
  </code></pre>
  
  <p>now what i want to know is very specifically the following:</p>
  
  <ol>
  <li>where and how do i write code that executes when the adhearsion app starts. i.e. without any event or agi call.</li>
  <li>what exactly do i write to dial out.</li>
  </ol>
  
  <p>please dont give me partial responses like </p>
  
  <pre><code>methods_for :dialplan
    sub foo
      # stuff here
    end
  </code></pre>
  
  <p>please dont give me vague responses like "create component and fork it to the left", or something... i have been reading stuff like that, and i am not able get it.  please tell me specific steps.</p>