aboutsummaryrefslogtreecommitdiff
path: root/src/mm-modem-helpers.c
diff options
context:
space:
mode:
authorDan Williams <dan@ioncontrol.co>2025-05-16 11:16:57 -0500
committerDan Williams <dan@ioncontrol.co>2025-05-22 08:05:58 -0500
commit7f014add61da3e0411d742756ce372fc0e2aee30 (patch)
tree265ba3df911f615653eaac051e406e50279b8721 /src/mm-modem-helpers.c
parent41ceaf6d5ecd85a7f88fc4ed9bdc80a6d2313d23 (diff)
broadband-modem,modem-helpers: generalize call end regex creation
Signed-off-by: Dan Williams <dan@ioncontrol.co>
Diffstat (limited to 'src/mm-modem-helpers.c')
-rw-r--r--src/mm-modem-helpers.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mm-modem-helpers.c b/src/mm-modem-helpers.c
index 926b1997..c6fa13fc 100644
--- a/src/mm-modem-helpers.c
+++ b/src/mm-modem-helpers.c
@@ -483,6 +483,20 @@ mm_at_quote_string (const gchar *input)
/*****************************************************************************/
GRegex *
+mm_call_end_regex_get (void)
+{
+ /* Example:
+ * <CR><LF>NO ANSWER<CR><LF>
+ */
+ 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: