Dialplan set context for each company

I have a newbie question about dialplan context. I know a context in asterisk is a collection of extensions. My question is what is the purpose of a context? Is it used for a hosted environment such that each hosted account/company has its own set of extensions?

There are many examples in the documentation. I would have hoped that a consultant would have read the documentation.

I read the samples in voip-info.org and here but still a little confused. Anyway thanks for the reply.

The definitive samples are in extensions.conf.sample, which comes with the source files and really ought to be installed by any package.

To keep it short - the whole purpose of a context in Asterisk DialPlan is segmentation. You can put different SIP Peers in different context’s for security reasons, call limitation reasons and similar stuff. It’s really a handy mechanism that (when used right) really helps to increase security of your Asterisk DialPlan.

Thank you all for the help

[context] is like you passport.
It defines, to what countrys, codes,phones you have access.
Plus, what extensions you can dial, etc ,etc.