i have written a code for doing conference between three phones, now i am trying to call a method name confList, which will display the list of all the phones in the conference, but the buffer value which should be the output of last command is con coming up, it is not getting executed.
my confList method is
if {[execCmd -cmd "xCommand Experimental Conference ParticipantList Search CallId: $x" -expectingValue OK -waitTime 15 -buffersize 10000]} {
OutputInfo error 1 1 0 "[subst $_procInfo] Error in finding the conference Participant List ."
puts "Now my updated budffer is <<<<<< $buffer >>>>>>>>>"
}
in the same way when i tried to execute one another command just above the last statment like this
if {[execCmd -cmd "xstatus call status" -expectingValue OK -waitTime 5]} {
puts "the Buffer value after executing the command is something like this>>>>>>>>>>>>>>>>>>$buffer<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n"
}
then it is giving the expected behaviour, but when i tried to do it from CLI it is giving the correct output and the behaviour is correct only.
The value X
is getting there correctly.
please help me out.
If the puts statement doesn't run at all then the condition isn't evaluating to true. In that case do a puts on the the "[exec Cmd..." to see what's being returned. If puts runs and the buffer string is empty then you might be running an async command and will need to figure out how to run a callback proc when it's done or make a loop that checks for a buffer response periodically.
Here's an example of how an async proc can be checked.
Output: