Always determine the username for authentication from the From: field#143
Always determine the username for authentication from the From: field#143kousu wants to merge 1 commit into
Conversation
Fixes a later crash:
File aiosip/aiosip/auth.py, line 24, in md5digest
return md5(':'.join(args).encode()).hexdigest()
TypeError: sequence item 0: expected str instance, NoneType found
|
I don't understand the motivation behind what I got rid of. Hopefully you can take a look and tell me if this will screw something else up. Especially, why would you want to use a different username depending on the case, or why it ignores the one explicitly passed by the user? Am I misusing aiosip somehow? If I put my app back closer to how I found the initial example ( aiosip/examples/back_to_back/client.py Lines 61 to 71 in 553b7b2 by re-adding the username@ part: then it logs in without complaint. But logging in "to" yourself doesn't make sense to me, and it's not what Linphone does either; so I didn't pass a user part for that field, so DetailsA captured REGISTER packet from Linhpone |
Working off
masterhere (I installed withgit clone https://github.com/Eyepea/aiosip/; cd aiosip ;pip install -e .) I can't log in to my SIP server with aiosip, as it stands. Here is my sample program:Details
sip.pyIt dies deep in with a TypeError:
With the patch, I can log in (though I still can't make a call, but that's because the server I tested with only takes calls to itself and rejected me):
I'm trying this on
because that's what Ubuntu has for me, but I suspect this is a general problem (though I haven't tested other distros yet).