CID not beeing passed from SpanX to SpanY

We are having issues getting CID to pass through our asterisk server. Span7 connects to the PSTN and when doing a PRI intense debug on that span I see CenturyLink (Qwest) passing us CallerID in the Facilities field. Asterisk then passes that out span 8 to our audiocodes gateways. However when I run a pri intense debug on span8 I don’t see the facilities field beeing passed from span7.

Here is the setup and what I have tried. Let me know if there is anything else I need to attach in this message.

Running Asterisk 1.4 (Is it maybe due to the fact we are running a older version? I woudl prefer not to upgrade at this point)

=============Zapata.conf ================
[trunkgroups]
[channels]

switchtype = national
rxwink=300
usecallerid=yes
hidecallerid=no
callwaiting=no
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=no
echocancel=yes
echocancelwhenbridged=no
echotraining=no
relaxdtmf=no
rxgain=0.0
txgain=0.0
immediate=no
;Added in a attempt to get CID to work
sendcalleridafter=2
cidsignalling=bell
usecallingpres=yes
cidstart=ring

; Span 7: TE4/1/3 “T4XXP (PCI) Card 1 Span 3” EC
; Connection to Qwest PRI Service
; group=0,17
group=7
context=FromPSTNContext
switchtype = national
signalling = pri_cpe
channel => 145-165
;Added in a attempt to get CID to work
callerid=asreceived

; Span 8: TE4/1/4 “T4XXP (PCI) Card 1 Span 4” EC
; Connection to Audiocodes Gateway
; group=0,18
group=8
context=FromPingtelContext
switchtype = national
signalling = pri_net
channel => 169-189
;Added in a attempt to get CID to work
callerid=asreceived

==================extensions_PingtelFromCard1.conf=============
;All other 4-digit extensions:
;Added in a attempt to get CID to work
exten => 0,1,Wait(2)
;Start of previous config
exten => _[0-6]XXX,1,Macro(dualtrunk,${PINGTEL},${CARD0LINK},${EXTEN})
exten => 0,1,Macro(dualtrunk,${PINGTEL},${CARD0LINK},${EXTEN})

===================Output of pri intense debug on span7=============
< Informational frame:
< SAPI: 00 C/R: 1 EA: 0
< TEI: 000 EA: 1
< N(S): 104 0: 0
< N(R): 069 P: 0
< 59 bytes of data
– ACKing all packets from 68 to (but not including) 69
– Since there was nothing left, stopping T200 counter
– Stopping T203 counter since we got an ACK
– Nothing left, starting T203 counter
< Protocol Discriminator: Q.931 (8) len=59
< Call Ref: len= 2 (reference 876/0x36C) (Originator)
< Message type: SETUP (5)
< [04 03 80 90 a2]
< Bearer Capability (len= 5) [ Ext: 1 Q.931 Std: 0 Info transfer capability: Speech (0)
< Ext: 1 Trans mode/rate: 64kbps, circuit-mode (16)
< Ext: 1 User information layer 1: u-Law (34)
< [18 03 a9 83 8b]
< Channel ID (len= 5) [ Ext: 1 IntID: Implicit PRI Spare: 0 Exclusive Dchan: 0
< ChanSel: Reserved
< Ext: 1 Coding: 0 Number Specified Channel Type: 3
< Ext: 1 Channel: 11 ]
< [1c 15 9f 8b 01 00 a1 0f 02 01 01 06 07 2a 86 48 ce 15 00 04 0a 01 00]
< Facility (len=23, codeset=0) [ 0x9F, 0x8B, 0x01, 0x00, 0xA1, 0x0F, 0x02, 0x01, 0x01, 0x06, 0x07, ‘*’, 0x86, ‘H’, 0xCE, 0x15, 0x00, 0x04, 0x0A, 0x01, 0x00 ]
PROTOCOL 1F
8B 0001 00 (CONTEXT SPECIFIC [11])
A1 000F (CONTEXT SPECIFIC [1])
02 0001 01 (INTEGER: 1)
06 0007 2A 86 48 CE 15 00 04 (OBJECTIDENTIFIER: 2a 86 48 ce 15 00 04)
0A 0001 00 (ENUMERATED: 0)
< [6c 0c 21 83 33 30 33 33 33 32 32 38 36 35]
< Calling Number (len=14) [ Ext: 0 TON: National Number (2) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)
< Presentation: Presentation allowed of network provided number (3) ‘3033322865’ ]
< [70 05 80 33 34 34 36]
< Called Number (len= 7) [ Ext: 1 TON: Unknown Number Type (0) NPI: Unknown Number Plan (0) ‘3446’ ]
– Making new call for cr 876
– Processing Q.931 Call Setup
– Processing IE 4 (cs0, Bearer Capability)
– Processing IE 24 (cs0, Channel Identification)
– Processing IE 28 (cs0, Facility)
Q.932 Interpretation component is not handled
Handle Q.932 ROSE Invoke component
[ Handling operation -837484540 ]
!! Unable to handle ROSE operation -837484540 [ 0A 01 00 ] - […]
– Processing IE 108 (cs0, Calling Party Number)
– Processing IE 112 (cs0, Called Party Number)
q931.c:3298 q931_receive: call 876 on channel 11 enters state 6 (Call Present)
Sending Receiver Ready (105)

[ 02 01 01 d2 ]

Supervisory frame:
SAPI: 00 C/R: 1 EA: 0
TEI: 000 EA: 1
Zero: 0 S: 0 01: 1 [ RR (receive ready) ]
N(R): 105 P/F: 0
0 bytes of data
– Restarting T203 counter
– Restarting T203 counter
q931.c:2571 q931_call_proceeding: call 876 on channel 11 enters state 9 (Incoming Call Proceeding)

[ 00 01 8a d2 08 02 83 6c 02 18 03 a9 83 8b ]

Informational frame:
SAPI: 00 C/R: 0 EA: 0
TEI: 000 EA: 1
N(S): 069 0: 0
N(R): 105 P: 0
10 bytes of data
– Restarting T203 counter
Stopping T_203 timer
Starting T_200 timer
Protocol Discriminator: Q.931 (8) len=10
Call Ref: len= 2 (reference 876/0x36C) (Terminator)
Message type: CALL PROCEEDING (2)
[18 03 a9 83 8b]
Channel ID (len= 5) [ Ext: 1 IntID: Implicit PRI Spare: 0 Exclusive Dchan: 0
ChanSel: Reserved
Ext: 1 Coding: 0 Number Specified Channel Type: 3
Ext: 1 Channel: 11 ]

[ 00 01 8c d2 08 02 83 6c 07 18 03 a9 83 8b 1e 02 81 82 ]

Informational frame:
SAPI: 00 C/R: 0 EA: 0
TEI: 000 EA: 1
N(S): 070 0: 0
N(R): 105 P: 0
14 bytes of data
T_200 timer already going (2)
Protocol Discriminator: Q.931 (8) len=14
Call Ref: len= 2 (reference 876/0x36C) (Terminator)
Message type: CONNECT (7)
[18 03 a9 83 8b]
Channel ID (len= 5) [ Ext: 1 IntID: Implicit PRI Spare: 0 Exclusive Dchan: 0
ChanSel: Reserved
Ext: 1 Coding: 0 Number Specified Channel Type: 3
Ext: 1 Channel: 11 ]
[1e 02 81 82]
Progress Indicator (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) 0: 0 Location: Private network serving the local user (1)
Ext: 1 Progress Description: Called equipment is non-ISDN. (2) ]
– Executing [s@macro-dualtrunk:3] Dial(“Zap/155-1”, “Zap/g8/3446|60”) in new stack
– Requested transfer capability: 0x00 - SPEECH
– Called g8/3446
mc-v04CLI>
< [ 00 01 01 8c ]
mc-v04
CLI>
< Supervisory frame:
< SAPI: 00 C/R: 0 EA: 0
< TEI: 000 EA: 1
< Zero: 0 S: 0 01: 1 [ RR (receive ready) ]
< N(R): 070 P/F: 0
< 0 bytes of data
– ACKing all packets from 68 to (but not including) 70
– ACKing packet 69, new txqueue is 70 (-1 means empty)
– Something left to transmit (70), restarting T200 counter

< [ 00 01 01 8e ]

< Supervisory frame:
< SAPI: 00 C/R: 0 EA: 0
< TEI: 000 EA: 1
< Zero: 0 S: 0 01: 1 [ RR (receive ready) ]
< N(R): 071 P/F: 0
< 0 bytes of data
– ACKing all packets from 69 to (but not including) 71
– ACKing packet 70, new txqueue is -1 (-1 means empty)
– Since there was nothing left, stopping T200 counter
– Nothing left, starting T203 counter
– Restarting T203 counter

< [ 02 01 d2 8e 08 02 03 6c 0f ]

< Informational frame:
< SAPI: 00 C/R: 1 EA: 0
< TEI: 000 EA: 1
< N(S): 105 0: 0
< N(R): 071 P: 0
< 5 bytes of data
– ACKing all packets from 70 to (but not including) 71
– Since there was nothing left, stopping T200 counter
– Stopping T203 counter since we got an ACK
– Nothing left, starting T203 counter
< Protocol Discriminator: Q.931 (8) len=5
< Call Ref: len= 2 (reference 876/0x36C) (Originator)
< Message type: CONNECT ACKNOWLEDGE (15)
q931.c:3456 q931_receive: call 876 on channel 11 enters state 10 (Active)
Sending Receiver Ready (106)

[ 02 01 01 d4 ]

Supervisory frame:
SAPI: 00 C/R: 1 EA: 0
TEI: 000 EA: 1
Zero: 0 S: 0 01: 1 [ RR (receive ready) ]
N(R): 106 P/F: 0
0 bytes of data
– Restarting T203 counter
– Restarting T203 counter
– Zap/176-1 is proceeding passing it to Zap/155-1
– Zap/176-1 is ringing

< [ 02 01 d4 8e 08 02 03 6c 62 1c 1d 9f 8b 01 00 a1 17 02 01 01 02 01 00 80 0f 42 52 55 49 4e 54 4a 45 53 20 50 49 45 54 45 ]

< Informational frame:
< SAPI: 00 C/R: 1 EA: 0
< TEI: 000 EA: 1
< N(S): 106 0: 0
< N(R): 071 P: 0
< 36 bytes of data
– ACKing all packets from 70 to (but not including) 71
– Since there was nothing left, stopping T200 counter
– Stopping T203 counter since we got an ACK
– Nothing left, starting T203 counter
< Protocol Discriminator: Q.931 (8) len=36
< Call Ref: len= 2 (reference 876/0x36C) (Originator)
< Message type: FACILITY (98)
< [1c 1d 9f 8b 01 00 a1 17 02 01 01 02 01 00 80 0f 42 52 55 49 4e 54 4a 45 53 20 50 49 45 54 45]
< Facility (len=31, codeset=0) [ 0x9F, 0x8B, 0x01, 0x00, 0xA1, 0x17, 0x02, 0x01, 0x01, 0x02, 0x01, 0x00, 0x80, 0x0F, ‘BRUINTJES PIETE’ ]
PROTOCOL 1F
8B 0001 00 (CONTEXT SPECIFIC [11])
A1 0017 (CONTEXT SPECIFIC [1])
02 0001 01 (INTEGER: 1)
02 0001 00 (INTEGER: 0)
80 000F 42 52 55 49 4E 54 4A 45 53 20 50 49 45 54 45 (CONTEXT SPECIFIC [0])
– Processing IE 28 (cs0, Facility)
Q.932 Interpretation component is not handled
Handle Q.932 ROSE Invoke component
[ Handling operation 0 ]
Handle Name display operation
Received caller name ‘BRUINTJES PIETE’
Sending Receiver Ready (107)
mc-v04*CLI>

[ 02 01 01 d6 ]

Supervisory frame:
SAPI: 00 C/R: 1 EA: 0
TEI: 000 EA: 1
Zero: 0 S: 0 01: 1 [ RR (receive ready) ]
N(R): 107 P/F: 0
0 bytes of data
– Restarting T203 counter
– Restarting T203 counter
mc-v04*CLI>
< [ 02 01 d6 8e 08 02 03 6c 45 08 02 80 90 ]

< Informational frame:
< SAPI: 00 C/R: 1 EA: 0
< TEI: 000 EA: 1
< N(S): 107 0: 0
< N(R): 071 P: 0
< 9 bytes of data
– ACKing all packets from 70 to (but not including) 71
– Since there was nothing left, stopping T200 counter
– Stopping T203 counter since we got an ACK
– Nothing left, starting T203 counter
< Protocol Discriminator: Q.931 (8) len=9
< Call Ref: len= 2 (reference 876/0x36C) (Originator)
< Message type: DISCONNECT (69)
< [08 02 80 90]
< Cause (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) Spare: 0 Location: User (0)
< Ext: 1 Cause: Normal Clearing (16), class = Normal Event (1) ]

[ 02 01 01 d8 ]

Supervisory frame:
SAPI: 00 C/R: 1 EA: 0
TEI: 000 EA: 1
Zero: 0 S: 0 01: 1 [ RR (receive ready) ]
N(R): 108 P/F: 0
0 bytes of data
– Restarting T203 counter
– Restarting T203 counter
– Channel 0/11, span 7 got hangup request, cause 16
[ 00 01 8e d8 08 02 83 6c 4d 08 02 81 90 ]

Informational frame:
SAPI: 00 C/R: 0 EA: 0
TEI: 000 EA: 1
N(S): 071 0: 0
N(R): 108 P: 0
9 bytes of data
– Restarting T203 counter
Stopping T_203 timer
Starting T_200 timer
Protocol Discriminator: Q.931 (8) len=9
Call Ref: len= 2 (reference 876/0x36C) (Terminator)
Message type: RELEASE (77)
[08 02 81 90]
Cause (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) Spare: 0 Location: Private network serving the local user (1)
Ext: 1 Cause: Normal Clearing (16), class = Normal Event (1) ]
< [ 00 01 01 90 ]

< Supervisory frame:
< SAPI: 00 C/R: 0 EA: 0
< TEI: 000 EA: 1
< Zero: 0 S: 0 01: 1 [ RR (receive ready) ]
< N(R): 072 P/F: 0
< 0 bytes of data
– ACKing all packets from 70 to (but not including) 72
– ACKing packet 71, new txqueue is -1 (-1 means empty)
– Since there was nothing left, stopping T200 counter
– Nothing left, starting T203 counter
– Restarting T203 counter
< [ 02 01 d8 90 08 02 03 6c 5a ]

< Informational frame:
< SAPI: 00 C/R: 1 EA: 0
< TEI: 000 EA: 1
< N(S): 108 0: 0
< N(R): 072 P: 0
< 5 bytes of data
– ACKing all packets from 71 to (but not including) 72
– Since there was nothing left, stopping T200 counter
– Stopping T203 counter since we got an ACK
– Nothing left, starting T203 counter
< Protocol Discriminator: Q.931 (8) len=5
< Call Ref: len= 2 (reference 876/0x36C) (Originator)
< Message type: RELEASE COMPLETE (90)

[ 02 01 01 da ]

Supervisory frame:
SAPI: 00 C/R: 1 EA: 0
TEI: 000 EA: 1
Zero: 0 S: 0 01: 1 [ RR (receive ready) ]
N(R): 109 P/F: 0
0 bytes of data
– Restarting T203 counter
– Restarting T203 counter

=====================Output of intense debug on span 8==========================

Informational frame:
SAPI: 00 C/R: 1 EA: 0
TEI: 000 EA: 1
N(S): 121 0: 0
N(R): 042 P: 0
40 bytes of data
– Restarting T203 counter
Stopping T_203 timer
Starting T_200 timer
Protocol Discriminator: Q.931 (8) len=40
Call Ref: len= 2 (reference 45/0x2D) (Originator)
Message type: SETUP (5)
[04 03 80 90 a2]
Bearer Capability (len= 5) [ Ext: 1 Q.931 Std: 0 Info transfer capability: Speech (0)
Ext: 1 Trans mode/rate: 64kbps, circuit-mode (16)
Ext: 1 User information layer 1: u-Law (34)
[18 03 a1 83 8b]
Channel ID (len= 5) [ Ext: 1 IntID: Implicit PRI Spare: 0 Preferred Dchan: 0
ChanSel: Reserved
Ext: 1 Coding: 0 Number Specified Channel Type: 3
Ext: 1 Channel: 11 ]
[1e 02 80 83]
Progress Indicator (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) 0: 0 Location: User (0)
Ext: 1 Progress Description: Calling equipment is non-ISDN. (3) ]
[6c 0c 21 83 33 30 33 33 33 32 32 38 36 35]
Calling Number (len=14) [ Ext: 0 TON: National Number (2) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)
Presentation: Presentation allowed of network provided number (3) ‘3033322865’ ]
[70 05 a1 33 34 34 36]
Called Number (len= 7) [ Ext: 1 TON: National Number (2) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1) ‘3446’ ]
q931.c:2881 q931_setup: call 32813 on channel 11 enters state 1 (Call Initiated)
– Called g8/3446
mc-v04*CLI>
< [ 02 01 01 f4 ]

< Supervisory frame:
< SAPI: 00 C/R: 1 EA: 0
< TEI: 000 EA: 1
< Zero: 0 S: 0 01: 1 [ RR (receive ready) ]
< N(R): 122 P/F: 0
< 0 bytes of data
– ACKing all packets from 120 to (but not including) 122
– ACKing packet 121, new txqueue is -1 (-1 means empty)
– Since there was nothing left, stopping T200 counter
– Nothing left, starting T203 counter
– Restarting T203 counter
mc-v04*CLI>
< [ 00 01 54 f4 08 02 80 2d 02 18 03 a9 83 8b ]

< Informational frame:
< SAPI: 00 C/R: 0 EA: 0
< TEI: 000 EA: 1
< N(S): 042 0: 0
< N(R): 122 P: 0
< 10 bytes of data
– ACKing all packets from 121 to (but not including) 122
– Since there was nothing left, stopping T200 counter
– Stopping T203 counter since we got an ACK
– Nothing left, starting T203 counter
< Protocol Discriminator: Q.931 (8) len=10
< Call Ref: len= 2 (reference 45/0x2D) (Terminator)
< Message type: CALL PROCEEDING (2)
< [18 03 a9 83 8b]
< Channel ID (len= 5) [ Ext: 1 IntID: Implicit PRI Spare: 0 Exclusive Dchan: 0
< ChanSel: Reserved
< Ext: 1 Coding: 0 Number Specified Channel Type: 3
< Ext: 1 Channel: 11 ]
– Processing IE 24 (cs0, Channel Identification)
q931.c:3428 q931_receive: call 32813 on channel 11 enters state 3 (Outgoing call Proceeding)
Sending Receiver Ready (43)

[ 00 01 01 56 ]

Supervisory frame:
SAPI: 00 C/R: 0 EA: 0
TEI: 000 EA: 1
Zero: 0 S: 0 01: 1 [ RR (receive ready) ]
N(R): 043 P/F: 0
0 bytes of data
– Restarting T203 counter
– Restarting T203 counter
– Zap/179-1 is proceeding passing it to Zap/157-1
mc-v04*CLI>
< [ 00 01 56 f4 08 02 80 2d 01 1e 02 80 88 ]

< Informational frame:
< SAPI: 00 C/R: 0 EA: 0
< TEI: 000 EA: 1
< N(S): 043 0: 0
< N(R): 122 P: 0
< 9 bytes of data
– ACKing all packets from 121 to (but not including) 122
– Since there was nothing left, stopping T200 counter
– Stopping T203 counter since we got an ACK
– Nothing left, starting T203 counter
< Protocol Discriminator: Q.931 (8) len=9
< Call Ref: len= 2 (reference 45/0x2D) (Terminator)
< Message type: ALERTING (1)
< [1e 02 80 88]
< Progress Indicator (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) 0: 0 Location: User (0)
< Ext: 1 Progress Description: Inband information or appropriate pattern now available. (8) ]
– Processing IE 30 (cs0, Progress Indicator)
q931.c:3343 q931_receive: call 32813 on channel 11 enters state 4 (Call Delivered)
Sending Receiver Ready (44)

[ 00 01 01 58 ]

Supervisory frame:
SAPI: 00 C/R: 0 EA: 0
TEI: 000 EA: 1
Zero: 0 S: 0 01: 1 [ RR (receive ready) ]
N(R): 044 P/F: 0
0 bytes of data
– Restarting T203 counter
– Restarting T203 counter
– Zap/179-1 is ringing
T203 counter expired, sending RR and scheduling T203 again
Sending Receiver Ready (44)

[ 02 01 01 59 ]

Supervisory frame:
SAPI: 00 C/R: 1 EA: 0
TEI: 000 EA: 1
Zero: 0 S: 0 01: 1 [ RR (receive ready) ]
N(R): 044 P/F: 1
0 bytes of data
– Restarting T203 counter
mc-v04*CLI>
< [ 02 01 01 f5 ]

< Supervisory frame:
< SAPI: 00 C/R: 1 EA: 0
< TEI: 000 EA: 1
< Zero: 0 S: 0 01: 1 [ RR (receive ready) ]
< N(R): 122 P/F: 1
< 0 bytes of data
– ACKing all packets from 121 to (but not including) 122
– Since there was nothing left, stopping T200 counter
– Stopping T203 counter since we got an ACK
– Nothing left, starting T203 counter
– Got RR response to our frame
– Restarting T203 counter
mc-v04*CLI> exit
[root@mc-v04 ~]#

Guess you have to know how to ask the the right question, to recieve the answer from the oracle (google). Guess the answer is most of the time simpler then we expect it to be.

Adding this to the global section of the zapata.conf file fixed the CID issue

facilityenable=yes