aboutsummaryrefslogtreecommitdiff
path: root/plugins/simtech/mm-modem-helpers-simtech.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2019-10-15 11:07:41 +0200
committerAleksander Morgado <aleksander@aleksander.es>2019-10-15 11:14:40 +0200
commitd61cb4a21cc1f3509c54f841e2eafafc3ea9a4a9 (patch)
treea3afffafdcd72ceb020b375084216a3180eb1322 /plugins/simtech/mm-modem-helpers-simtech.c
parent345922caa10fc86dad181ccd83239af1f43fd30e (diff)
simtech: handle '+RXDTMF' URCs reporting DTMF tones
Diffstat (limited to 'plugins/simtech/mm-modem-helpers-simtech.c')
-rw-r--r--plugins/simtech/mm-modem-helpers-simtech.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/plugins/simtech/mm-modem-helpers-simtech.c b/plugins/simtech/mm-modem-helpers-simtech.c
index 331853d8..4da3c988 100644
--- a/plugins/simtech/mm-modem-helpers-simtech.c
+++ b/plugins/simtech/mm-modem-helpers-simtech.c
@@ -161,3 +161,19 @@ mm_simtech_get_cring_urc_regex (void)
return g_regex_new ("(?:\\r)+\\n\\+CRING:\\s*(\\S+)(?:\\r)+\\n",
G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
}
+
+/*****************************************************************************/
+
+/*
+ * <CR><CR><LF>+RXDTMF: 8<CR><CR><LF>
+ * <CR><CR><LF>+RXDTMF: *<CR><CR><LF>
+ * <CR><CR><LF>+RXDTMF: 7<CR><CR><LF>
+ *
+ * Note! using TWO <CR> instead of one...
+ */
+GRegex *
+mm_simtech_get_rxdtmf_urc_regex (void)
+{
+ return g_regex_new ("(?:\\r)+\\n\\+RXDTMF:\\s*([0-9A-D\\*\\#])(?:\\r)+\\n",
+ G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL);
+}