Constructing authorization header

Hi!
I am working on asterisk client at this moment. I am facing to lack of information, because I have searched everywhere, but I havent found asnwer anywehre. I need to know how exactly construct Authorization haeder, what, how shoul I put into MD5, which statements are necessary etc. Can anybody help me please?