Displaying 1 result from an estimated 1 matches for "getchannelstatus".
Did you mean:
getchannelstate
2010 Jun 05
5
Controlling calls
...-the script dial the peer
4-if the call is answered, let the call up for 1min
5-then the script hangs up the channel.
I tried either in php or in java but no success.
In java i did this:
//////////////
exec("Dial", "IAX2/400");
boolean t=true;
while(t){
if(getChannel().getChannelStatus()==6)t=false;
}
wait(60000);
hangup();
//////////
in my extension.conf:
exten =>777,1,AGI(agi://localhost/sc.agi)
the script is running but it does not hangup.
Second solution,i tried this :
exten => 777,1,Dial(IAX2/400,G(myscript))
exten =>777,n(myscript),AGI(agi://localhost/sc.agi)...