Merlin Legend PBX rejecting PRI calls

As always, if I find a really obscure answer, I try to repost it here to make sure it’s findable down the road. This isn’t quite part of the telephony lab series, although related to it as I work on and fiddle with stuff, but I ran into a doozy of an issue and AMAZINGLY found the answer, that would have likely taken me forever to figure out, if I ever figured it out.

The problem I ran into was when calling a Merlin Legend PBX via PRI from an Asterisk/Freepbx extension, the calls work fine and everything’s good. However, if I try to forward an inbound call from a real phone via my Comcast POTS line, the call is rejected by the Merlin (technically just dropped/doesn’t connect). Doing a PRI debug shows a timer expiring (the call never connects or rings):

19:50:40.885 ISDN.L2_FMT PRI  1     IE - 1C FACILITY            Len=29 
19:50:40.885 ISDN.L2_FMT PRI  1      Calling Name: [V]WIRELESS CAL
19:50:40.886 ISDN.L2_FMT PRI  1     IE - 6C CALLING PARTY #     Len=12 
19:50:40.886 ISDN.L2_FMT PRI  1          00 Numb. Type:UNKNOWN       
19:50:40.886 ISDN.L2_FMT PRI  1             Numb. Plan:UNKNOWN        
19:50:40.886 ISDN.L2_FMT PRI  1          80 Presentation:ALLOWED     
19:50:40.886 ISDN.L2_FMT PRI  1             Screening:USER PROVIDED 
19:50:40.886 ISDN.L2_FMT PRI  1             Ph.# 4845551212
19:50:40.886 ISDN.L2_FMT PRI  1     IE - 70 CALLED PARTY #      Len=5 
19:50:40.887 ISDN.L2_FMT PRI  1          80 Numb. Type:UNKNOWN       
19:50:40.887 ISDN.L2_FMT PRI  1             Numb. Plan:UNKNOWN        
19:50:40.887 ISDN.L2_FMT PRI  1             Ph.# 7108
19:50:41.924 ISDN.L2_FMT PRI  1  ==============================================
19:50:41.924 ISDN.L2_FMT PRI  1    Sapi:00 C/R:C Tei:00 Ctl:SABME   P:1
19:50:41.930 ISDN.L2_FMT PRI  1  ==============================================
19:50:41.930 ISDN.L2_FMT PRI  1    Sapi:00 C/R:C Tei:00 Ctl:UA      F:1
19:50:46.097 ISDN.L2_FMT PRI  1  ==============================================
19:50:46.097 ISDN.L2_FMT PRI  1    Sapi:00 C/R:C Tei:00 INFO Ns:0   Nr:0   P:0
19:50:46.098 ISDN.L2_FMT PRI  1    Prot:08  CRL:2  CRV:002C
19:50:46.098 ISDN.L2_FMT PRI  1    M - 5A RELEASE_CMP 
19:50:46.098 ISDN.L2_FMT PRI  1     IE - 08 CAUSE               Len=2 
19:50:46.098 ISDN.L2_FMT PRI  1          82 Location:LN
19:50:46.098 ISDN.L2_FMT PRI  1          E6 Cause:102 (TIMER_EXPIRY)
19:50:46.109 ISDN.L2_FMT PRI  1  ==============================================

I ended up finding the answer here, so all credit to jomaha on the Tek-Tips site: https://www.tek-tips.com/viewthread.cfm?qid=1036754

Long story short, the caller ID name field (CNAM) on the Legend has a character limit, and if the field is too long, the D channel gets reset and drops the call. In doing my own testing, I found it has a limit of 17 characters, INCLUDING the phone number, which is 10 digits nowadays. This makes sense as originally with 7 digit calling, it allowed a 10 character name.

I was able to correct this in Asterisk/Freepbx by going into the trunk settings, and changing the caller ID to “Remove CNAM”, so the trunk only sends the number. I’m sure there’s other ways but at least this is an easy fix for something that’s a

While researching this issue, I saw a variety of other issues where people had problems getting PRIs up and running due to switch type mismatches and vendors just generally being crappy about getting settings right. Its starting to make sense as to why some of these likely got ripped out.