Skip to content

Commit a2a6125

Browse files
committed
External auth bypass
Bypass mandatory user authentication if the extension is of type external. This fixes dial-in from phone numbers that have been explicitly created as EXTERNAL extension in the routing tables.
1 parent b5813be commit a2a6125

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ywsd/stage1.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ async def _sanitize_caller(self, caller, db_connection) -> Extension:
2929
except DoesNotExist:
3030
# this caller doesn't exist in our database, create an external extension
3131
return Extension.create_external(caller)
32-
32+
if caller_extension.type == Extension.Type.EXTERNAL:
33+
# this is an external extension that we also explicitly have in our db,
34+
# return it similar to the on-the-fly created external extension
35+
return caller_extension
3336
if (
3437
self._message.params.get("connection_id")
3538
in self._yate.settings.TRUSTED_LOCAL_LISTENERS

0 commit comments

Comments
 (0)