View Full Version : Setting up DID routing

11-01-12, 11:08 AM
This instruction assumes you have already created a Dahdi FXO Trunk group as well as destinations (ie. extensions, ring groups, announcements, IVRs, etc) (Reference: http://forum.pikatechnologies.com/showthread.php?740-Adding-Trunk-Routes-to-FreePBX)

You can use the ‘Zap Channel DIDs’ option to assign DIDs to specific channels. For example, the ‘Main Line’ may be channel 2 (assuming only 1 FXO module is present in Warp) and it’s DID is 102. The ‘Second Line’ may be channel 3 (again assuming only 1 FXO module is present in Warp) and it’s DID is 103. NOTE: At any time if you are unsure of the channel indices you can use the command < asterisk –rx ‘show dahdi channels’ > in SSH.


Next you need to change the ‘context’ for each FXO line from ‘from-pstn’ to ‘from-zaptel’. To accomplish this you can visit the ‘Dahdi Driver Settings’ screen in FreePBX and edit each FXO line.


(NOTE: this change will be overwritten if any hardware is changed in the system. To avoid this overwrite you can alternatively add the following line to the ‘/etc/dahdi/genconf_parameters’ file:

context_lines from-zaptel

Now you can simply create an Inbound Route for each DID and route calls to different destinations. In this example DID 102 will route to a phone directly.


Or DID 103 to the IVR.