Calling over asterisk

hi

i am interested on how voice is transfered over asterisk because i want to develop a program like ekiga but less sophisticated. Basically i want to know how voice is transfered over asterisk (with codecs) back and forward between users.

A detailed tutorial will be helpful!

Thank you!!