aboutsummaryrefslogtreecommitdiff
path: root/src/mm-modem-helpers.c
diff options
context:
space:
mode:
authorMarco Bascetta <marco.bascetta@sadel.it>2015-05-05 18:00:09 +0200
committerAleksander Morgado <aleksander@aleksander.es>2015-08-02 10:39:13 +0200
commit6d85146bba3edceeaf9f23e0e7a5281fda527d59 (patch)
treee09cc3e936ec9fc60cd4bac01da72e3118999ae8 /src/mm-modem-helpers.c
parentc53bc10092563eb361b4980afb00080009067661 (diff)
core: handle incoming calls (RING/CRING, CLIP, NO CARRIER).
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: