title: How to Dial to Originate a Call from Within the Dialplan?
body: <p>Salvete!  How can I dial a number and have Asterisk originate a call from extension sipX to sipY?</p>
  
  <p>Both sipX and sipY appear in extensions.conf of my dialplan.</p>
  
  <p>The trick is that I want to dial 337 on my phone, and then my phone goes out of the picture, then sipX calls sipY.</p>
  
  <p>Say I want to be able to push 337 on the phone, and have a sound played over the speakerphone of another phone, say, as an alarm.</p>
  
  <hr>
  
  <p>Another way to consider it is, how can I do this:</p>
  
  <ol>
  <li>Push 337 on my phone</li>
  <li>complete my call, that is, hang up the original caller</li>
  <li>run a macro even though there is no call in queue</li>
  <li>call sipY</li>
  <li>play a sound on sipY</li>
  </ol>
  
  <p>When running the #2 action (completing the caller's session) and letting the rest of the process complete afterward, can we use something like the <a href="https://wiki.asterisk.org/wiki/display/AST/Pre-Dial+Handlers" rel="nofollow">pre-dial handlers in Asterisk 11</a>?</p>