Context Help

Would someone be able to point me to a good tutorial or book on using the contexts within the extensions.conf?

What I need specifically is to build a dialplan that allows me to host multiple sites via SIP. Those sites need to have their own DID’s, as well as I have three different extension functions as well. I need to be able to configure each site to be isolated from the others. Imagine “virtual” PBX hosting and you kinda have an idea of what I am working on.

The three funtions for the sites extensions are:

  1. Admin – This phones will have inbound, VM, outbound, transfer, roll-over etc… Normal business desktop functions

  2. Internal/Intercom – These extensions are only able to call internally, will not have any other functions

  3. “payphone” – Not really pay phones, but could not think of any other description… Basically this will autodial a hidden extension that takes them into a dialplan that prompts them through various options one of which will allow an outgoing call… Most of which will interact with a database…

  4. (yes I know I said three), this one is for my own company which is meetme conference calling abilities…

I know that the easiest way to do this is to create a context for each of these extension types, but so far I haven’t been able to find a good site or book that explains the contexts in a way that I can understand them all that well. I do have to admit that until I solved the previous issue I was only dabbling with the entensions.conf, but now that it is solved I am ready to move on to the next phase.!!!
And of course you could read lot of examples here and there in Internet.
But - I am working with Asterisk around 4 years, and there are lot of “unknown” things for me in extensions.conf. May be because I prefer AGI.
I think - you can do what you want with very simple contexts/extensions + more AGI scripts and DB of course.