use of org.asteriskjava.manager.response.ManagerError in project openmeetings by apache.
the class SipDao method execEvent.
private ResponseEvents execEvent(EventGeneratingAction action) {
if (factory == null) {
log.warn("There is no Asterisk configured");
return null;
}
ManagerConnection con = getConnection();
try {
con.login("on");
ResponseEvents r = con.sendEventGeneratingAction(action);
if (r != null) {
log.debug(r.getResponse().toString());
}
return (r == null || r.getResponse() instanceof ManagerError) ? null : r;
} catch (Exception e) {
log.error("Error while executing EventGeneratingAction: " + action, e);
} finally {
try {
con.logoff();
} catch (Exception e) {
// no-op
}
}
return null;
}
use of org.asteriskjava.manager.response.ManagerError in project openmeetings by apache.
the class SipDao method exec.
private ManagerResponse exec(ManagerAction action) {
if (factory == null) {
log.warn("There is no Asterisk configured");
return null;
}
ManagerConnection con = getConnection();
try {
con.login();
ManagerResponse r = con.sendAction(action);
if (r != null) {
log.debug(r.toString());
}
return (r instanceof ManagerError) ? null : r;
} catch (Exception e) {
log.error("Error while executing ManagerAction: " + action, e);
} finally {
try {
con.logoff();
} catch (Exception e) {
// no-op
}
}
return null;
}
Aggregations