As far as I know, the Java class library for AMI is third party maintained, so it is unlikely that you will find expertise on it on this forum.
Are you really using this for date, as you can synthesize this from dialplan functions, or presumably do it natively in Java. I don’t think the Java will be run in a sandbox, here, so you could also access shell commands natively from Java, unless this is EAGI.
actually,i wan to get queue wait time and answer time from queue_log. and the shell command is:
String shell = channel.getFullVariable("${SHELL(grep 1598709776.991795 /var/log/asterisk/queue_log.0 |grep COMPLETECALLER)}");
if there can not way to do it in agi, i will do it natively in Java
you are right…
i change it in the java way:
try {
String cmd = new String { “/bin/sh”, “-c”, “grep " + call.getSessionId()+ " /var/log/asterisk/queue_log |grep COMPLETECALLER” };
Process ps = Runtime.getRuntime().exec(cmd);