[Asterisk-java-users] asterisk manager can't get variable values
Brought to you by:
srt
From: Jason W. <ja...@cl...> - 2006-02-03 16:26:03
|
Hello, In the dialplan, I set the variable 'accepted=yes' when the user presses 1 and is transfered to extension 1. I'm using the following code to try and get variable values from asterisk in my java console app using the manager API: //**************************************** getVarAction = new GetVarAction(); getVarAction.setVariable("accepted"); Thread.sleep (14000); //wait ten seconds to allow the user to make a selection actionResponse = managerConnection.sendAction(getVarAction,10000); String accepted = new String(); accepted = actionResponse.getAttribute("EXTEN"); System.out.println("accepted=" + accepted); //**************************************** For Any variable I try to get, even the predefined channel variables, I get null. Help would be greatly appreciated. Jason |