From: Rounak S. <rou...@gm...> - 2013-07-16 08:47:31
|
Hii I am making a call from Manager AMI and in my dialPlan the caller will be connected to AGI.I want to send a variable var from AMI to AGI through channel variables originateAction.setChannel("SIP/1000abc"); originateAction.setContext("outgoing-call"); originateAction.setExten("100"); originateAction.setVariable("var", " foo baar"); I tried all possible combination of outbound call but none of them working [outgoing-call] exten=>100,1,AGI(agi://127.0.0.1/hello.agi?user=${var}) [outgoing-call] exten=>100,1,AGI(agi://127.0.0.1/hello.agi?var=${var}) [outgoing-call] exten=>100,1,AGI(agi://127.0.0.1/hello.agi,${var}) **AGI** public void service(AgiRequest request, AgiChannel channel) throws AgiException { answer(); System.out.println("Inside"); String a=request.getParameter("var"); // String b=request.getParameter("user"); String c=channel.getVariable("var"); // String d=channel.getVariable("user"); System.out.println(a+"\n"+b+"\n"+c+"\n"+d+"\n"); hangup(); } Output is null all the time. |