Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Last but not least, let's add an [docs:international] context. In North America, you dial 011 to signify that you're going to dial an international number.

...

And there we have it -- a simple chain of contexts going from most privileged (international calls) down to lease privileged (local calling).

At this point, you may be asking yourself, "What's the big deal? Why did we need to break them up into contexts, if they're all going out the same outbound connection?" That's a great question! The primary reason for breaking the different classes of calls into separate contexts is so that we can enforce some security boundaries.

Do you remember what we said earlier, that the channel drivers point inbound calls at a particular context? In this case, if we point a phone at the [docs:local] context, it could only make local and internal calls. On the other hand, if we were to point it at the [docs:international] context, it could make international and long-distance and local and internal calls. Essentially, we've created different classes of service by chaining contexts together with include statements, and using the channel driver configuration files to point different phones at different contexts along the chain.

Many people find it instructive to look at a visual diagram at this point, so let's draw ourselves a map of the contexts we've created so far.

Insert graphic showing chain of includes from international through long-distance to local and to users and features

In this graphic, we've illustrated the various contexts and how they work together. We've also shown that Alice's phone is pointed at the [docs:international] context, while Bob's phone is only pointed at the [docs:local] context.

Please take the next few minutes and implement a series of chained contexts into your own dialplan, similar to what we've explained above. You can then change the configuration for Alice and Bob (in sip.conf, since they're SIP phones) to point to different contexts, and see what happens when you attempt to make various types of calls from each phone. And there we have it -- a simple chain of contexts going from most privileged (international calls) down to lease privileged (local calling).

At this point, you may be asking yourself, "What's the big deal? Why did we need to break them up into contexts, if they're all going out the same outbound connection?" That's a great question! The primary reason for breaking the different classes of calls into separate contexts is so that we can enforce some security boundaries.

Do you remember what we said earlier, that the channel drivers point inbound calls at a particular context? In this case, if we point a phone at the [local] context, it could only make local and internal calls. On the other hand, if we were to point it at the [international] context, it could make international and long-distance and local and internal calls. Essentially, we've created different classes of service by chaining contexts together with include statements, and using the channel driver configuration files to point different phones at different contexts along the chain.

Many people find it instructive to look at a visual diagram at this point, so let's draw ourselves a map of the contexts we've created so far.

Insert graphic showing chain of includes from international through long-distance to local and to users and features

In this graphic, we've illustrated the various contexts and how they work together. We've also shown that Alice's phone is pointed at the [international] context, while Bob's phone is only pointed at the [local] context.

Please take the next few minutes and implement a series of chained contexts into your own dialplan, similar to what we've explained above. You can then change the configuration for Alice and Bob (in sip.conf, since they're SIP phones) to point to different contexts, and see what happens when you attempt to make various types of calls from each phone.