aboutsummaryrefslogtreecommitdiff
path: root/src/mm-modem-helpers.c
diff options
context:
space:
mode:
authorDan Williams <dan@ioncontrol.co>2025-05-22 08:09:41 -0500
committerDan Williams <dan@ioncontrol.co>2025-05-22 08:09:41 -0500
commit7ae153880c75f89dc6427b234d85c57717bb8df3 (patch)
treef6ab6714e3da04b954761598e3c73153c81588b5 /src/mm-modem-helpers.c
parent41ceaf6d5ecd85a7f88fc4ed9bdc80a6d2313d23 (diff)
parentc3c6fdc55e5a45f9bf0611ec0925fd0702aff316 (diff)
Merge request !1356 from 'sierra-call-urc-fix'
serial-parsers: don't echo-remove strange call start/end URCs https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/1356
Diffstat (limited to 'src/mm-modem-helpers.c')
-rw-r--r--src/mm-modem-helpers.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mm-modem-helpers.c b/src/mm-modem-helpers.c
index 926b1997..d69951be 100644
--- a/src/mm-modem-helpers.c
+++ b/src/mm-modem-helpers.c
@@ -483,6 +483,24 @@ mm_at_quote_string (const gchar *input)
/*****************************************************************************/
GRegex *
+mm_call_end_regex_get (void)
+{
+ /* Example:
+ * <CR><LF>NO ANSWER<CR><LF>
+ * <LF>NO CARRIER<CR><LF>
+ * <CR><LF>BUSY<CR><LF>
+ *
+ * Some Sierra devices omit the leading <CR> for in-call responses.
+ */
+ return g_regex_new ("(\\r)?\\n(NO CARRIER)|(BUSY)|(NO ANSWER)|(NO DIALTONE)\\r\\n",
+ G_REGEX_DOLLAR_ENDONLY | G_REGEX_RAW | G_REGEX_OPTIMIZE,
+ 0,
+ NULL);
+}
+
+/*****************************************************************************/
+
+GRegex *
mm_voice_ring_regex_get (void)
{
/* Example: