Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

send DTMF via hidden call #537

Merged
merged 2 commits into from
Sep 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/re_telev.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ int telev_set_srate(struct telev *tel, uint32_t srate);
int telev_send(struct telev *tel, int event, bool end);
int telev_recv(struct telev *tel, struct mbuf *mb, int *event, bool *end);
int telev_poll(struct telev *tel, bool *marker, struct mbuf *mb);
bool telev_is_empty(const struct telev *tel);

int telev_digit2code(int digit);
int telev_code2digit(int code);
9 changes: 9 additions & 0 deletions src/telev/telev.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,15 @@ int telev_poll(struct telev *tel, bool *marker, struct mbuf *mb)
}


bool telev_is_empty(const struct telev *tel)
{
if (!tel)
return true;

return tel->state == IDLE && !mbuf_get_left(tel->mb);
}


/**
* Convert DTMF digit to Event code
*
Expand Down