title: How to get Receiver details from Call Queue (Asterisk Dialplan) using AGI?
body: <p>I have configured one Dialplan for Incoming context.</p>
  
  <p>I have following in <strong>/etc/asterisk/extensions.conf</strong></p>
  
  <pre><code>[incoming]
  switch =&gt; Realtime
  
  exten =&gt; _X.,1,NoOp(Incoming Call Received)
  exten =&gt; _X.,n,Festival(Welcome to Asterisk)
  exten =&gt; _X.,n,Answer()
  
  ;call-answer.php will be called when Member Connected to Queue
  exten =&gt; _X.,n,Queue(my_queue,t,,,1000,call-answer.php)
  exten =&gt; _X.,n,Hangup()
  </code></pre>
  
  <p>I would like to get Caller Information who has ANSWERED Queue and get Called Queue Member information like extension id etc....</p>
  
  <p><strong>call-answer.php</strong></p>
  
  <pre><code>#!/usr/bin/env php
  &lt;?php
  set_time_limit(60);
  error_reporting(0);
  ini_set('display_errors', 0);
  
  require_once ('phpagi.php');
  $agi = new AGI();
  $agi-&gt;verbose("AGI Started after ANSWERED QUEUE",3);
  $src_extension = $agi-&gt;request['agi_callerid'];
  $dst_extension = $agi-&gt;request['agi_extension'];
  
  // I want to get CALL ANSWERED QUEUE MEMBER EXTENSION NUMBER HERE.
  
  ?&gt;
  </code></pre>