|
|
|
|
@ -65,10 +65,12 @@ EXEC_ACTION_START(ConfPostEventAction) {
|
|
|
|
|
unsigned int ev;
|
|
|
|
|
if (str2i(ev_id, ev)) {
|
|
|
|
|
ERROR("decoding conference event id '%s'\n", ev_id.c_str());
|
|
|
|
|
sc_sess->SET_RES(DSM_RES_UNKNOWN_ARG);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
AmConferenceStatus::postConferenceEvent(channel_id, ev, sess->getLocalTag());
|
|
|
|
|
sc_sess->SET_RES(DSM_RES_OK);
|
|
|
|
|
} EXEC_ACTION_END;
|
|
|
|
|
|
|
|
|
|
static bool ConferenceJoinChannel(DSMConfChannel** dsm_chan,
|
|
|
|
|
@ -94,6 +96,7 @@ static bool ConferenceJoinChannel(DSMConfChannel** dsm_chan,
|
|
|
|
|
sess->getLocalTag());
|
|
|
|
|
if (NULL == chan) {
|
|
|
|
|
ERROR("obtaining conference channel\n");
|
|
|
|
|
throw DSMException("conference");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if (NULL != *dsm_chan) {
|
|
|
|
|
@ -130,9 +133,9 @@ EXEC_ACTION_START(ConfJoinAction) {
|
|
|
|
|
// add to garbage collector
|
|
|
|
|
sc_sess->transferOwnership(dsm_chan);
|
|
|
|
|
|
|
|
|
|
sc_sess->SET_ERRNO(DSM_ERRNO_OK);
|
|
|
|
|
sc_sess->SET_RES(DSM_RES_OK);
|
|
|
|
|
} else {
|
|
|
|
|
sc_sess->SET_ERRNO(DSM_ERRNO_UNKNOWN_ARG);
|
|
|
|
|
sc_sess->SET_RES(DSM_RES_UNKNOWN_ARG);
|
|
|
|
|
}
|
|
|
|
|
} EXEC_ACTION_END;
|
|
|
|
|
|
|
|
|
|
@ -160,10 +163,12 @@ EXEC_ACTION_START(ConfLeaveAction) {
|
|
|
|
|
DSMConfChannel* chan = getDSMConfChannel(sc_sess);
|
|
|
|
|
if (NULL == chan) {
|
|
|
|
|
WARN("app error: trying to leave conference, but channel not found\n");
|
|
|
|
|
sc_sess->SET_ERRNO(DSM_ERRNO_UNKNOWN_ARG);
|
|
|
|
|
sc_sess->SET_RES(DSM_RES_UNKNOWN_ARG);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
chan->release();
|
|
|
|
|
|
|
|
|
|
sc_sess->SET_RES(DSM_RES_OK);
|
|
|
|
|
} EXEC_ACTION_END;
|
|
|
|
|
|
|
|
|
|
CONST_ACTION_2P(ConfRejoinAction, ',', true);
|
|
|
|
|
@ -179,9 +184,9 @@ EXEC_ACTION_START(ConfRejoinAction) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (ConferenceJoinChannel(&chan, sess, sc_sess, channel_id, mode)) {
|
|
|
|
|
sc_sess->SET_ERRNO(DSM_ERRNO_OK);
|
|
|
|
|
sc_sess->SET_RES(DSM_RES_OK);
|
|
|
|
|
} else {
|
|
|
|
|
sc_sess->SET_ERRNO(DSM_ERRNO_UNKNOWN_ARG);
|
|
|
|
|
sc_sess->SET_RES(DSM_RES_UNKNOWN_ARG);
|
|
|
|
|
}
|
|
|
|
|
} EXEC_ACTION_END;
|
|
|
|
|
|
|
|
|
|
@ -193,4 +198,5 @@ EXEC_ACTION_START(ConfSetPlayoutTypeAction) {
|
|
|
|
|
sess->rtp_str.setPlayoutType(JB_PLAYOUT);
|
|
|
|
|
else
|
|
|
|
|
sess->rtp_str.setPlayoutType(SIMPLE_PLAYOUT);
|
|
|
|
|
sc_sess->SET_RES(DSM_RES_OK);
|
|
|
|
|
} EXEC_ACTION_END;
|
|
|
|
|
|