With this dialplan, we have only catered for incoming calls. Of course we will want to create extensions to dial out.
How these outgoing extensions look depends on the plan we made earlier. It also depends on how you want the switch to act for your users. We always want to make it as similar to any old system as possible to reduce the need to retrain users.
Most phone systems require a user to dial a certain digit to designate the call as one that has a destination outside the switch. In our legacy PBX, we accessed outgoing lines by dialing a 9. To copy this behavior, we could do something like:
[outgoing] exten => _9.,1,Dial(dahdi/g1/${EXTEN:1})
Notice that we are using pattern matching as we did before. Also notice that we used g1
as the DAHDI interface. This is a good use for a group. This simply means "any free interface in group 1". Thus, if we put all of our outgoing lines in group 1, when we dial an outside number, we do not have to guess which channel...