CapichatList is now a single source of information about conference members

This commit is contained in:
MelwareDE 2010-11-05 09:58:12 +00:00
parent 420fdc352d
commit 66562edbcc
3 changed files with 31 additions and 1 deletions

View File

@ -158,6 +158,7 @@ static int pbx_capi_ami_capichat_list(struct mansession *s, const struct message
{
unsigned int roomNumber = pbx_capi_chat_get_room_number(capiChatRoom);
struct ast_channel *c = pbx_capi_chat_get_room_channel(capiChatRoom);
const struct capi_pvt* i = pbx_capi_chat_get_room_interface_c(capiChatRoom);
int isMemberOperator = pbx_capi_chat_is_member_operator(capiChatRoom);
int isCapiChatRoomMuted = pbx_capi_chat_is_room_muted(capiChatRoom);
int isCapiChatMemberMuted = pbx_capi_chat_is_member_muted(capiChatRoom);
@ -167,6 +168,9 @@ static int pbx_capi_ami_capichat_list(struct mansession *s, const struct message
char* cidVisual;
char* callerNameVisual;
if ((c == NULL) || (i == NULL))
continue;
cidVisual = ast_strdup(pbx_capi_get_cid (c, "<unknown>"));
callerNameVisual = ast_strdup(pbx_capi_get_callername (c, "<no name>"));
@ -195,6 +199,14 @@ static int pbx_capi_ami_capichat_list(struct mansession *s, const struct message
"MarkedUser: %s\r\n"
"Muted: %s\r\n"
"Talking: %s\r\n"
"Domain: %s\r\n"
"DTMF: %s\r\n"
"EchoCancel: %s\r\n"
"NoiseSupp: %s\r\n"
"RxAGC: %s\r\n"
"TxAGC: %s\r\n"
"RxGain: %.1f%s\r\n"
"TxGain: %.1f%s\r\n"
"\r\n",
idText,
roomName,
@ -207,7 +219,15 @@ static int pbx_capi_ami_capichat_list(struct mansession *s, const struct message
(isCapiChatMemberListener != 0) ? "Listen only" : "Talk and listen" /* "Talk only" */,
(isCapiChatMostRecentMember != 0) ? "Yes" : "No",
mutedVisualName,
/* "Yes" "No" */ "Not monitored");
/* "Yes" "No" */ "Not monitored",
(i->channeltype == CAPI_CHANNELTYPE_B) ? "TDM" : "IP",
(i->isdnstate & CAPI_ISDN_STATE_DTMF) ? "Y" : "N",
(i->isdnstate & CAPI_ISDN_STATE_EC) ? "Y" : "N",
(i->divaAudioFlags & 0x0080) ? "Y" : "N", /* Noise supression */
(i->divaAudioFlags & 0x0008) ? "Y" : "N", /* Rx AGC */
(i->divaAudioFlags & 0x0004) ? "Y" : "N", /* Tx AGC */
i->divaDigitalRxGainDB, "dB",
i->divaDigitalTxGainDB, "dB");
ast_free (cidVisual);
ast_free (callerNameVisual);

View File

@ -1241,6 +1241,15 @@ struct ast_channel *pbx_capi_chat_get_room_channel(const struct capichat_s * roo
return (c);
}
/*!
* \brief Get room interface
*
* \note called unter protection of chat_lock
*/
const struct capi_pvt* pbx_capi_chat_get_room_interface_c(const struct capichat_s * room) {
return (room->i);
}
/*!
* \brief Is user operator
*

View File

@ -34,6 +34,7 @@ const char* pbx_capi_chat_get_room_name(const struct capichat_s * room);
unsigned int pbx_capi_chat_get_room_number(const struct capichat_s * room);
unsigned int pbx_capi_chat_get_room_members(const struct capichat_s * room);
struct ast_channel *pbx_capi_chat_get_room_channel(const struct capichat_s * room);
const struct capi_pvt* pbx_capi_chat_get_room_interface_c(const struct capichat_s * room);
int pbx_capi_chat_is_member_operator(const struct capichat_s * room);
int pbx_capi_chat_is_room_muted(const struct capichat_s * room);
int pbx_capi_chat_is_member_muted(const struct capichat_s * room);