title: Asterisk and recording incoming and outgoing calls
body: <p>So I have been trying to learn asterisk with some limited success. Essentially what I would like to do is record both incoming and outgoing calls. However there seems to be a gap in my understanding.</p>
  
  <p>From what I understand, can one of the asterisk gurus confirm that my understanding is either correct or incorrect.</p>
  
  <ol>
  <li><p>sip.conf and iax.conf is used to register "channels". These channels could be softphones, analog phones or even other devices that connect to my asterisk server. </p></li>
  <li><p>extensions.conf defines the route for incoming calls into asterisk. Thus I can say if someone calls extension 100 on my asterisk box connect this call to sip device 100 or play the hello-world sample. </p></li>
  </ol>
  
  <p>I suspect my understanding of extensions might be flawed a little. Here is what I am trying to do. I want to record both incoming and outgoing calls to asterisk no matter what extension. From what I can see you can use the monitor and mixmonitor commands in the dialplan. So my understanding is that you can only specify what happens to incoming calls in the dialplan.</p>
  
  <p>So for example I could possibly record incoming calls to extension 600 by adding the following to my extension.conf</p>
  
  <pre><code>exten =&gt; 600,1,Answer()
  same =&gt; 600,2,Monitor(wav,,m)
  </code></pre>
  
  <p>I suspect I am making a terribly wrong assumption on how the dialplan works.</p>
  
  <p>Thanks</p>