Asterisk AGI programing

Good morning.
i am a student doing a project with Asterisknow.
what i did untill now is a web page alow users to open thie own voicebox, watch and listen to the voice mails they god, also doing some group management etc.
to finish my project i have to enable a user creation by phone as well,
what i really dont know how to do,
i know i have to write a dialplane (i did somthing ,dont know if is good or not) and write an AGI that will check users.conf if the user exist if it does return to the user that a user in that id is allready in the system, else write to the users.conf the username and pass.

can some please help me with that? i am really loosing my mined trying to to it.

thanks alot.
Tal.

  1. Get Perl::AGI - it is nice class wich will help you a lot.
  2. Better is if you keep users in MySQL tables - it is really easy to check users in MySQL DB

thanks for your answer, i donw know perl, and acctualy i dont really know how to write this stuff, (or where to put the files) i am realy a newbe with the asterisk stuff, can you or anybodey else can please help me with the code?
howto whereto etc?
thanks.