Skip to content
Snippets Groups Projects
Commit dad897cf authored by Yalu Zhang's avatar Yalu Zhang
Browse files

Move the definition of enum call_action to voice-types.h to be shared with dectmngr

parent ff71c195
Branches
No related tags found
No related merge requests found
Pipeline #182265 passed
......@@ -29,6 +29,7 @@ enum VOICE_CODEC {
VOICE_CODEC_G726,
VOICE_CODEC_G729,
};
enum voice_dtmf_mode {
VOICE_DTMF_NONE,
VOICE_DTMF_RFC_4733,
......@@ -51,6 +52,20 @@ struct config_update_struct {
// add more if needed
};
// In UBUS request to voicemngr we need to define what this request is about
enum call_action {
CALL_DEFAULT0, // answer/release the call for PCM_0
CALL_DEFAULT1, // answer/release the call for PCM_1
CALL_DIGIT_PRESSED, // DTMF pressed
CALL_TOGGLE, // Switch in Call Waiting
CALL_CONFERENCE, // Join - start Call Conference
CALL_DECT_UNAVAILABLE, // No DECT handset available for call
CALL_REJECT, // indicate for call_reject event, upper 16 bits for pcm_id when using
CALL_MODE_SINGLE, // indicate the Single Call Mode has been set for DECT line
CALL_MODE_MULTIPLE, // indicate the Multiple Call Mode has been set for DECT line
CALL_LAST
};
/*
* UBUS related definitions
*/
......
......@@ -17,20 +17,6 @@ enum line_action_t {
ACTION_RINGING_STOP
};
// In UBUS request to voicemngr we need to define what this request is about
enum call_action {
CALL_DEFAULT0, // answer/release the call for PCM_0
CALL_DEFAULT1, // answer/release the call for PCM_1
CALL_DIGIT_PRESSED, // DTMF pressed
CALL_TOGGLE, // Switch in Call Waiting
CALL_CONFERENCE, // Join - start Call Conference
CALL_DECT_UNAVAILABLE, // No DECT handset available for call
CALL_REJECT, // indicate for call_reject event, upper 16 bits for pcm_id when using
CALL_MODE_SINGLE, // indicate the Single Call Mode has been set for DECT line
CALL_MODE_MULTIPLE, // indicate the Multiple Call Mode has been set for DECT line
CALL_LAST
};
// Event sent with UBUS when something has happened with a phone line
struct line_event_t {
const char *name; // String communicated with Asterisk
......
......@@ -737,8 +737,10 @@ static int ubus_request_status(struct ubus_context *uctx, struct ubus_object *ob
for(line = 0; line < totEndpoints; line++) {
void *tbl;
tbl = blobmsg_open_table(&blob, NULL);
blobmsg_add_u32(&blob, "line", line);
blobmsg_add_u32(&blob, "offhook", voice_line_is_offhook(line + unpopulatedDectEndpoints));
blobmsg_close_table(&blob, tbl);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment