[OpenSIPS-Users] Syntax error in opensips-cli

Karsten Wemheuer kwem at gmx.de
Mon Feb 2 16:31:13 UTC 2026


Hi,

I think I found a syntax error in opensips-cli.

In file opensipscli/modules/mi.py, line 87

  m = re.match('([a-zA-Z\.\-_]+)=', p)

this throws a warning "SyntaxWarning: invalid escape sequence '\.'"

Patch to fix:

--- a/opensipscli/modules/mi.py
+++ b/opensipscli/modules/mi.py
@@ -84,7 +84,7 @@
     def get_params_set(self, cmds):
         l = set()
         for p in cmds:
-            m = re.match('([a-zA-Z\.\-_]+)=', p)
+            m = re.match('([a-zA-Z\\.\\-_]+)=', p)
             # if it's not a parameter name, skip
             if m:
                 l.add(m.group(1))

Am I correct with this?

Best regards,

Karsten



More information about the Users mailing list