Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
voicemngr
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Voice
voicemngr
Commits
dad897cf
Commit
dad897cf
authored
7 months ago
by
Yalu Zhang
Browse files
Options
Downloads
Patches
Plain Diff
Move the definition of enum call_action to voice-types.h to be shared with dectmngr
parent
ff71c195
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#182265
passed
7 months ago
Stage: static_code_analysis
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
libvoice/voice-types.h
+15
-0
15 additions, 0 deletions
libvoice/voice-types.h
line.h
+0
-14
0 additions, 14 deletions
line.h
ubus.c
+2
-0
2 additions, 0 deletions
ubus.c
with
17 additions
and
14 deletions
libvoice/voice-types.h
+
15
−
0
View file @
dad897cf
...
...
@@ -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
*/
...
...
This diff is collapsed.
Click to expand it.
line.h
+
0
−
14
View file @
dad897cf
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
ubus.c
+
2
−
0
View file @
dad897cf
...
...
@@ -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
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment