Asterisk in debian w/ apache, mysql and php

Hello i have found an installation of asterisk2billing but it refer Red Hat only

Does anyone have successfully installed it in debian?
Could you please post your step by step installation here
as well as the how to obtain the packages namely:
-mysql or postgresql
-GD library

likewise the version of each packages specifically for php (is it php CLI or CGI)?

i just dont want to mess up my asterisk box by mis installing packages so i beg your
perfect setup for this things in debia 3.1

Thank you very much