Keep SIP Agent After Transfer

Get help with installing, upgrading and running Asterisk.

Moderators: muppetmaster, Moderator, Support

Keep SIP Agent After Transfer

Postby roni777 » Tue Jul 15, 2014 3:36 pm

Hello my friends , i have a dialplan that transfer to an AGI that captures callerid and channel , but i need to get the sip agente that makes the transfer , is there a way to do that ?

;Dial Plan
exten => s,1,Answer
exten => s,2,Background(encuesta)

exten => 2,1,Wait(1)
exten => 2,n,AGI(/root/test.php)


;AGI
#!/usr/bin/php -q
<?PHP
require('/var/lib/asterisk/agi-bin/phpagi.php');
$agi = new AGI();

$clid = $agi->request['agi_callerid'];
$clid2 = $agi->request['agi_channel'];
(Here gets the sip agent that make the transfer);
$agi->verbose("Caller ID is $clid");
$agi->verbose("Channel is $clid2");
(Here shows the sip agent);

?>

Thank you very much
roni777
Newsterisk
 
Posts: 6
Joined: Mon Mar 31, 2014 4:01 pm

Return to Asterisk Support

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 1 guest