aboutsummaryrefslogtreecommitdiff
path: root/src/mm-modem-helpers.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mm-modem-helpers.c')
-rw-r--r--src/mm-modem-helpers.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/mm-modem-helpers.c b/src/mm-modem-helpers.c
index 36eb0390..7ba00f9e 100644
--- a/src/mm-modem-helpers.c
+++ b/src/mm-modem-helpers.c
@@ -349,6 +349,32 @@ mm_voice_cring_regex_get (void)
}
GRegex *
+mm_voice_clip_regex_get (void)
+{
+ /* Example:
+ * <CR><LF>+CLIP: "+393351391306",145,,,,0<CR><LF>
+ * \_ Number \_ Type \_ Validity
+ */
+
+ return g_regex_new ("\\r\\n\\+CLIP:\\s*\"(\\S+)\",\\s*(\\d+),\\s*,\\s*,\\s*,\\s*(\\d+)\\r\\n",
+ G_REGEX_RAW | G_REGEX_OPTIMIZE,
+ 0,
+ NULL);
+}
+
+GRegex *
+mm_voice_nocarrier_regex_get (void)
+{
+ /* Example:
+ * <CR><LF>NO CARRIER<CR><LF>
+ */
+ return g_regex_new ("\\r\\n\\NO CARRIER\\r\\n",
+ G_REGEX_RAW | G_REGEX_OPTIMIZE,
+ 0,
+ NULL);
+}
+
+GRegex *
mm_voice_dtmf_regex_get (void)
{
/* Example: