I figured it out using CommandAction but I still have a problem:
public void getConferencees(String confNum)throws IOException,
AuthenticationFailedException,
TimeoutException
{
ManagerResponse mResponse;
CommandAction commandAction =3D new CommandAction();
commandAction.setCommand("meetme list 8200");
if(!managerConnection.isConnected())
{
managerConnection.login();
}
mResponse =3D managerConnection.sendAction(commandAction,30000);
managerConnection.logoff();
CommandResponse response =3D (CommandResponse)mResponse;
List list =3D response.getResult();
for (Iterator it =3D list.iterator(); it.hasNext ();)
{
String s =3D (String) it.next();
System.out.println("STRING=3D"+s);
}
}
I get the following output on System.out:
STRING=3DUser #: 03 202 device Channel: SIP/202-7924
(Admin) (unmonitored)INFO: Connected via Asterisk Call Manager/1.0
STRING=3DUser #: 05 202 Graham F Channel: SIP/202-d58a
(unmonitored)Feb 16, 2006 2:29:10 PM
net.sf.asterisk.util.impl.JavaLoggingLog info
STRING=3D2 users in that conference.
Now I can parse these strings to get the User name , but I was wondering if
there was an easier way to return just the user name?
TIA!
On 2/15/06, g f <gf...@gm...> wrote:
>
> Hello all,
> I am trying to use *-Java to determine who is in each conference.
> Similar to the "meetme" command but with more detail.
> Any ideas?
> TIA!
>
|