Deciphering A PRI Turn-up Worksheet

The following outlines some of the more confusing vocabulary pertaining to Primary Rate Interface (PRI) turn-up.

PIC/LPIC – Probably the most confusing acronym out of the bunch. PIC stands for Primary Interexchange Carrier. This is your long distance carrier. This is a code that is kept in a database and when you need to make a long distance call, the telco consults this database to know whose network to send the call along. A great explanation of long distance calls can be found HERE. Conversely, the LPIC is the Local Primary Interexchange Carrier. In other words, they are the company that handles your local calls that aren’t long distance. These two providers can be different, and in many cases they are. In rural areas, the LPIC is the local telco, and the PIC is a larger carrier like AT&T or Verizon. I’ve found that many companies will give you a deal if you specify them for both PIC and LPIC. Most of the time, the PIC/LPIC choice will be whomever is installing the PRI for you, such as AT&T or Cox Communications.

DID – Another one that confuses people. In this case, DID stands for Direct Inward Dial. This is a huge change from the way an analog circuit works. With an analog circuit (like my house), when you call my number it sends an electrical signal along the wire telling the device at the other end to ring. When we hook this circuit up to a CUCM/CCME system, we usually have to configure Private Line Automatic Ringdown (PLAR) in order to be sure something gets trigger when the electrical signal arrives. A PRI doesn’t use electric signals to trigger ringing. Instead, they are configured with two different fields, the Calling Party and the Called Party. In this example, the Calling Party is what is most often referred to as “Caller ID”. The Called Party on a PRI is the DID. This is a number that is delivered to the PRI and sent to the PBX equipment on the other end. The name comes from the fact that these numbers are most often used to directly reach internal extensions without the need to reach a PBX operator or automated attendant. The DID can be configured to ring a phone, a group of phones, or even a recording. The numbers that used to belong to your analog circuits will usually be moved over to a group of DIDs and pointed at the PRI.

Outpulsed Digits – This one sounds straight forward. Digits are being sent somewhere, right? Remember that this worksheet is from the perspective of the service provider, so the outpulsed digits are what the provider is sending to your equipment. You have tons of options, but most providers will usually limit your options to 4, 7, or 10 digits. Continue reading “Deciphering A PRI Turn-up Worksheet”

Asterisk – “I’m sorry an error has occurred”

I recently experienced an issue with Asterisk 1.8 and the voice mail module. If a voice mail is recorded and is less than 6 seconds a non-descript error message will be played:

“I’m sorry an error has occurred”

The cause is a default 5 second voice mail restriction within Asterisk. The solution is to edit: /etc/asterisk/ and edit the following variables:

; Asterisk post 1.6.2 options the minmessage and maxmessage are deprecated in favor of these
; which are per user settable also:
maxsecs=600                     ; max length of vm message
minsecs=1                       ; Minimum length of a voicemail message in seconds

Save the file then restart the amportal (# amportal restart)

Note that this will set the maximum length of a voice mail to 10 minutes and the minimum length to 1 second.

Elastix Drops Calls After 30 Seconds

I recently came across a bug with Elastix 2.x in which outbound calls over a SIP trunk or PRI (E1/T1) drop after 30 seconds. From testing, this can occur with Counterpath X-Lite as well as Linksys PAP2 devices. The issue occurs at random and only affects some outbound calls. There is nothing noted in the Asterisk log, CDR log or system logs which makes the issue difficult to diagnose.

To resolve this problem you need to make two modifications, one to Asterisk and one to X-Lite:


1. Login to your Asterisk server.

2. Edit: /etc/asterisk/chan_dahdi.conf

3. Make sure the following statements are commented out:


4. Restart your amportal or reload Asterisk.


1. Open X-Lite Continue reading “Elastix Drops Calls After 30 Seconds”

Enable video support for Asterisk in FreePBX

Asterisk 1.4 and above supports video calls using h264, h263p, h263 and h261 as a bit rate of 384 kb/s.

To enable Asterisk video support in FreePBX:

1. Login to your server at http://<your-server>/admin

2. Click on ‘Tools’ then ‘Asterisk SIP Settings’

3. Click the ‘Enabled’ check box next to Video Support then check “h264”, “h263p”, “h263” and “h261”

4. Click ‘Apply’ to save the settings.

You can now use soft phone applications such as CouterPath’s free ‘X-Lite‘ application to make video calls to other Asterisk extensions.

Asterisk: chan_dahdi.c: No D-channels available! Using Primary channel as D-channel anyway!

If you are experiencing the following error in /var/log/asterisk/full:

WARNING[8207] chan_dahdi.c: No D-channels available! Using Primary channel 48 as D-channel anyway!
WARNING[8207] chan_dahdi.c: No D-channels available! Using Primary channel 48 as D-channel anyway!

Chances are that you are using a T1 or E1 PRI on a Digium card with two ports (e.g. wct4xxp+) but are only using one active PRI port in production.

This error occurs when Asterisk attempts to identify a D channel (signaling channel) on the second, non-active PRI. You can confirm this by running ‘dahdi_tool’ and checking wether your second port is in a RED condition (e.g. down).

To correct this issue edit:

$ nano -w /etc/asterisk/dahdi-channels.conf

And comment out the second PRI interface:

; Span 1: TE2/0/1 "T2XXP (PCI) Card 0 Span 1" (MASTER) B8ZS/ESF
context=from-pstn Continue reading "Asterisk: chan_dahdi.c: No D-channels available! Using Primary channel as D-channel anyway!"