<div dir="ltr">Hello,<div><br></div><div>This week hasn't gone exactly as I planed. I underestimated the amount of research that I had to do and how many new things I had to learn/relearn. This is probably normal for a beginner like me and I can say I learned many things and I want to learn even more.</div>

<div><br></div><div>The difficulties I had were related to the fact that database lookups need to be asynchronous and I had to find a way to make it work. At first I looked over how repro and reTurn implement multithreading (platform independent) so I can reuse the code or at least get an idea on how everything works. I realized how hard it is to get to know a new codebase, and considering the fact that I haven't used multithreading much (had only some experience in Java) I had to learn how to use POSIX threads and ASIO (still learning this one).</div>
<div><br></div><div>Also, some observations on how the authentication mechanism should be implemented: TURN response messages have a MESSAGE-INTEGRITY attribute that has to be calculated (based on the H(A1) key; H(A1) = MD5(username:realm:password) each time we send a response. So, in order to reduce the number of lookups and improve performance, we should cache this information. Other SIP products such as Kamailio also store two variations of the H(A1), one where the username is normal and another that contains the realm (username@domain), so this suggests that user agents might send the username in 2 forms. But I'm not sure yet if I need to check anything for this. The RFC's for STUN (5389) and TURN (5766) were not really helpful in this regard.</div>
<div><br></div><div>I also started a github repo [1] where I will commit the code.</div><div><br></div><div>With Daniel's help regarding multi-threading (what information I should search for and how I should proceed) and other questions related to the project I am confident I will be able to find solutions and make up for the lost time spent learning.</div>
<div><br></div><div>So, what I've done this week:</div><div>- continued familiarising myself with the reSIProcate codebase and how I could reuse code for the project.</div><div>- learned POSIX threads and started learning ASIO</div>
<div>- started learning autotools (I didn't have time in the past and I will need it)</div><div>- continued studying other TURN implementations so I get a better idea on how thing should be done</div><div><br></div><div>
For the following week (actually starting tomorrow), I will continue with adding support for MySQL to reTurn and if I manage to finish, start looking on implementing LDAP and getting familiar with the RADIUS implementation of repro (and possibly other related technologies that implement RADIUS).</div>
<div><br></div><div>Kind regards,</div><div>Catalin</div><div><br></div><div>[1] <a href="https://github.com/catalinusurelu/resiprocate">https://github.com/catalinusurelu/resiprocate</a></div><div><br></div><div><br></div>
<div><br></div><div><br></div>
</div>