summaryrefslogtreecommitdiff
path: root/src/libgsmd
diff options
context:
space:
mode:
authorlaforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-01-12 23:57:33 +0000
committerlaforge <laforge@99fdad57-331a-0410-800a-d7fa5415bdb3>2007-01-12 23:57:33 +0000
commita04e6effed0b81ec7495df2a1448484645b20cc5 (patch)
tree6292af769d08022e68cd183358ccc78c6a27238c /src/libgsmd
parent496d202f517dbecc1be4e1afc6782c0e3dc48373 (diff)
- use talloc (of samba project) to debug memory allocations and simplify code
- introduce new ucmd_alloc() function - add DTMF support to gsmd, libgsmd and gsmd-util - fix crash of libgsmd when events don't have handlers registered - implement call progress for TI modem - split modem init string in separate commands to fit our parser git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@544 99fdad57-331a-0410-800a-d7fa5415bdb3
Diffstat (limited to 'src/libgsmd')
-rw-r--r--src/libgsmd/libgsmd_voicecall.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/libgsmd/libgsmd_voicecall.c b/src/libgsmd/libgsmd_voicecall.c
index 2a1d6e6..b21ca37 100644
--- a/src/libgsmd/libgsmd_voicecall.c
+++ b/src/libgsmd/libgsmd_voicecall.c
@@ -51,6 +51,31 @@ int lgsm_voice_out_init(struct lgsm_handle *lh,
return 0;
}
+int lgsm_voice_dtmf(struct lgsm_handle *lh, char dtmf_char)
+{
+ struct gsmd_msg_hdr *gmh;
+ struct gsmd_dtmf *gd;
+ int rc;
+
+ gmh = lgsm_gmh_fill(GSMD_MSG_VOICECALL,
+ GSMD_VOICECALL_DTMF, sizeof(*gd)+1);
+ if (!gmh)
+ return -ENOMEM;
+ gd = (struct gsmd_dtmf *) gmh->data;
+ gd->len = 1;
+ gd->dtmf[0] = dtmf_char;
+
+ rc = lgsm_send(lh, gmh);
+ if (rc < gmh->len + sizeof(*gd)+1) {
+ lgsm_gmh_free(gmh);;
+ return -EIO;
+ }
+
+ lgsm_gmh_free(gmh);
+
+ return 0;
+}
+
int lgsm_voice_in_accept(struct lgsm_handle *lh)
{
return lgsm_send_simple(lh, GSMD_MSG_VOICECALL, GSMD_VOICECALL_ANSWER);
personal git repositories of Harald Welte. Your mileage may vary