Jump to Navigation

Asterisk "l2mgr: prim" error

When telkom screws your Asterisk server

Sometimes you get a call for Asterisk support and you are told by your client that their Asterisk server suddenly stopped working which is weird because once Asterisk, or any Linux application, has been setup it just runs.

Weird l2mgr errors

We got such a call recently and went out to investigate. We made some inquiries on arrival and the client told us Telkom had been in recently to fix the ISDN lines and according to the technician all was well with the lines. In fact the client had phoned Telkom several times to be told the same storey.

Looking at the misdn.log files there where numerous errors like

"Could not create channel on port:-1 with extensions:<dialed number>"

Meanwhile the console was being flooded with messages such as:

"l2mgr: prim <some number>"

Since we knew telkom had been working on the lines, our first move was to prove that it was not Asterisk. We decided to disable the seemingly borked BRI ISDN line in ,mISDN-init.conf by removing references to port 1 and 2 and modify the contexts in the mISDN.conf file. We also modified the dial plan since it had been hacked to directly reference the ports, to not use the affected trunk. After doing this the second ISDN line, ports 3 and 4, also reported the same error.Since Telkom reported the lines were fine it was starting to look like the twilight zone.

Have confidence in your battle tested applications

At this point we sat back and assessed the situation. From past experience we were confident in Asterisk and that is just works. So if we stood by that assessment, and taking Telkom's word for it that all was ok with their lines, what else could be wrong?

We had previously checked the lines where plugged into the Digium card securely but we had not check their termination in the ISDN NT boxes. When we looked we found the Telkom technician had plugged two of the cables from the Digium card into the same ISDN box. Simply plugging the cable into its own box solved the problem.

Open Source: 


by Dr. Radut.