Closed rktech-de closed 1 year ago
Thank you for the bug report!
Admittedly, using a regex here is not the right tool; really, the string should be parsed. I'll see if I get around to fixing that in the next few days; if not, I'll just apply your patch.
Sorry for the delay; just got around to implementing this properly.
See https://github.com/astoeckel/femtosip/commit/f6d8e3c6b3170a5a85e228b0bd034a8d9b2e6139
Unfortunately, adding (more or less) proper parsing for the WWW-authenticate
field added quite a bit of code, but I'm feeling that this is a better solution compared to just changing the RegEx.
Thx for this code it is exactly what I was looking for.
but with a first test to connect to asterisk I got this error:
in my case the content of
auth
isDigest algorithm=MD5, realm="asterisk", nonce="0afa88e9"
which will not give a regex match (testet with regex101.com) https://github.com/astoeckel/femtosip/blob/9cf92572014e77ed42cd1a6910aed00baeeca604/femtosip.py#L434-L436Changing line 435 to
will solve the issue in my case