title: php programming for working with asterisk
body: <p>I wrote some php code in AMI to work with asterisk command. </p>
  
  <p>I don't know exactly what's the difference between <a href="http://www.the-asterisk-book.com/unstable/asterisk-manager-api.html" rel="nofollow">Asterisk Manager Interface (AMI)</a> and <a href="http://www.asterisk.org/docs/asterisk/trunk/applications/agi" rel="nofollow">Asterisk Gateway Interface (AGI)</a> and witch one is better for my planning.</p>
  
  <p>I'm planning to call party users that their number is is my panel on web.
  We have some operators and they can call party users via client softphone by clicking on their number, so they are limiteded to call just the listed numbers (and can't call another number). </p>
  
  <p>How can I set those permissions? And how can I store called record in asterisk (IVR recorded voice) via php. Should I use <a href="http://www.the-asterisk-book.com/unstable/asterisk-manager-api.html" rel="nofollow">Asterisk Manager Interface (AMI)</a> or<a href="http://www.asterisk.org/docs/asterisk/trunk/applications/agi" rel="nofollow">Asterisk Gateway Interface (AGI)</a>.</p>