One PRI card with 2 (or more) Telcos

Home » Asterisk Users » One PRI card with 2 (or more) Telcos
Asterisk Users 2 Comments

Hi list!

We currently have a PRI gateway composed by a box with two Digium quad-span
PRI cards (a TE420 and a ).
One of the cards is filled with TELCO1, while the other has first two slots
filled with TELCO2, and 3rd slot with TELCO3.

I am currently having (timer ?) issues on TELCO3 (span 7)

D-Chan (202 as determined by dahdi_genconf ) is constantly failing causing
on-going calls to terminate.
Problem clears immediately tho. I send a copy of the log with pri debug at a
time of problems…

Is there a problem having 2 telcos on the same PRI card?
Would somebody help?

asterisk*CLI> pri show span 7
Primary D-channel: 202
Status: Provisioned, Up, Active
Switchtype: EuroISDN
Type: CPE
Overlap Dial: 0
Logical Channel Mapping: 0
Timer and counter settings:
N200: 3
N202: 3
K: 7
T200: 1000
T202: 10000
T203: 10000
T303: 4000
T305: 30000
T308: 4000
T309: 6000
T313: 4000
T-HOLD: 4000
T-RETRIEVE: 4000
T-RESPONSE: 4000
Overlap Recv: No

and

[Mar 18 17:04:05] VERBOSE[19844] chan_dahdi.c: TEI=0 MDL-ERROR (I): T200
expired N200 times sending RR/RNR in state 8(Timer recovery)
[Mar 18 17:04:05] VERBOSE[19844] chan_dahdi.c: TEI=0 Sending SABME
[Mar 18 17:04:05] VERBOSE[19844] chan_dahdi.c: Changing from state 8(Timer
recovery) to 5(Awaiting establishment)
[Mar 18 17:04:06] VERBOSE[19844] chan_dahdi.c: TEI=0 Sending SABME
[Mar 18 17:04:07] VERBOSE[19844] chan_dahdi.c: TEI=0 Sending SABME
[Mar 18 17:04:08] VERBOSE[19844] chan_dahdi.c: TEI=0 Sending SABME
[Mar 18 17:04:09] VERBOSE[19844] chan_dahdi.c: TEI=0 MDL-ERROR (G): *T200
expired N200 times sending SABME in state 5(Awaiting establishment)*
[Mar 18 17:04:09] VERBOSE[19844] chan_dahdi.c: Changing from state
5(Awaiting establishment) to 4(TEI assigned)
[Mar 18 17:04:09] VERBOSE[19844] chan_dahdi.c: TEI=0 DL event:
Q931_DL_EVENT_DL_RELEASE_IND(3)
[Mar 18 17:04:09] VERBOSE[19844] chan_dahdi.c: Start T309 for call cref=56
on channel 2
[Mar 18 17:04:09] VERBOSE[19844] chan_dahdi.c: Start T309 for call cref=64
on channel 3
[Mar 18 17:04:09] VERBOSE[19844] chan_dahdi.c: Start T309 for call cref=58
on channel 4
[Mar 18 17:04:09] VERBOSE[19844] chan_dahdi.c: Start T309 for call cref=66
on channel 6
[Mar 18 17:04:09] VERBOSE[19844] chan_dahdi.c: TEI=0 Sending SABME
[Mar 18 17:04:09] VERBOSE[19844] chan_dahdi.c: Changing from state 4(TEI
assigned) to 5(Awaiting establishment)
[Mar 18 17:04:09] VERBOSE[19844] chan_dahdi.c: == Primary D-Channel on
span 7 down
[Mar 18 17:04:09] WARNING[19844] chan_dahdi.c: No D-channels available!
Using Primary channel 202 as D-channel anyway!
[Mar 18 17:04:10] VERBOSE[19844] chan_dahdi.c: TEI=0 Sending SABME
[Mar 18 17:04:11] VERBOSE[19844] chan_dahdi.c: TEI=0 Sending SABME
[Mar 18 17:04:12] VERBOSE[19844] chan_dahdi.c: TEI=0 Sending SABME
[Mar 18 17:04:13] VERBOSE[19844] chan_dahdi.c: TEI=0 MDL-ERROR (G): T200
expired N200 times sending SABME in state 5(Awaiting establishment)
[Mar 18 17:04:13] VERBOSE[19844] chan_dahdi.c: Changing from state
5(Awaiting establishment) to 4(TEI assigned)
[Mar 18 17:04:13] VERBOSE[19844] chan_dahdi.c: TEI=0 DL event:
Q931_DL_EVENT_DL_RELEASE_IND(3)
[Mar 18 17:04:13] VERBOSE[19844] chan_dahdi.c: TEI=0 Sending SABME
[Mar 18 17:04:13] VERBOSE[19844] chan_dahdi.c: Changing from state 4(TEI
assigned) to 5(Awaiting establishment)
[Mar 18 17:04:13] WARNING[19844] chan_dahdi.c: No D-channels available!
Using Primary channel 202 as D-channel anyway!
[Mar 18 17:04:14] VERBOSE[19844] chan_dahdi.c: TEI=0 Sending SABME
[Mar 18 17:04:15] VERBOSE[19844] chan_dahdi.c: T309 timed out waiting for
data link re-establishment
[Mar 18 17:04:15] VERBOSE[19844] chan_dahdi.c: q931.c:7750
pri_internal_clear: Call 56 enters state 0 (Null). Hold state: Idle
[Mar 18 17:04:15] VERBOSE[19844] chan_dahdi.c: clearing, alive 1, hangupack
0
[Mar 18 17:04:15] VERBOSE[19844] chan_dahdi.c: == Primary D-Channel on
span 7 up
[Mar 18 17:04:15] VERBOSE[19844] chan_dahdi.c: — Channel 0/2, span 7
got hangup, cause 27
[Mar 18 17:04:15] VERBOSE[19844] chan_dahdi.c: T309 timed out waiting for
data link re-establishment
[Mar 18 17:04:15] VERBOSE[19844] chan_dahdi.c: q931.c:7750
pri_internal_clear: Call 64 enters state 0 (Null). Hold state: Idle
[Mar 18 17:04:15] VERBOSE[19844] chan_dahdi.c: clearing, alive 1, hangupack
0
[Mar 18 17:04:15] VERBOSE[19844] chan_dahdi.c: — Channel 0/3, span 7
got hangup, cause 27
[Mar 18 17:04:15] VERBOSE[19844] chan_dahdi.c: T309 timed out waiting for
data link re-establishment
[Mar 18 17:04:15] VERBOSE[19844] chan_dahdi.c: q931.c:7750
pri_internal_clear: Call 58 enters state 0 (Null). Hold state: Idle
[Mar 18 17:04:15] VERBOSE[19844] chan_dahdi.c: clearing, alive 1, hangupack
0
[Mar 18 17:04:15] VERBOSE[19844] chan_dahdi.c: — Channel 0/4, span 7
got hangup, cause 27
[Mar 18 17:04:15] VERBOSE[19844] chan_dahdi.c: T309 timed out waiting for
data link re-establishment
[Mar 18 17:04:15] VERBOSE[19844] chan_dahdi.c: q931.c:7750
pri_internal_clear: Call 66 enters state 0 (Null). Hold state: Idle
[Mar 18 17:04:15] VERBOSE[19844] chan_dahdi.c: clearing, alive 1, hangupack
0
[Mar 18 17:04:15] VERBOSE[19844] chan_dahdi.c: — Channel 0/6, span 7
got hangup, cause 27
[Mar 18 17:04:15] VERBOSE[27353] pbx.c: == Spawn extension (incoming-pri,
sw-30-218543080, 11) exited non-zero on ‘DAHDI/189-1’
[Mar 18 17:04:15] VERBOSE[27353] chan_dahdi.c: q931_hangup: other hangup
[Mar 18 17:04:15] VERBOSE[27354] app_mixmonitor.c: == MixMonitor close
filestream
[Mar 18 17:04:15] VERBOSE[27353] chan_dahdi.c: NEW_HANGUP DEBUG: Calling
q931_hangup, ourstate Null, peerstate Null, hold-state Idle
[Mar 18 17:04:15] VERBOSE[27353] chan_dahdi.c: NEW_HANGUP DEBUG: Destroying
the call, ourstate Null, peerstate Null, hold-state Idle
[Mar 18 17:04:15] VERBOSE[27353] chan_dahdi.c: — Hungup ‘DAHDI/189-1’
[Mar 18 17:04:15] VERBOSE[27354] app_mixmonitor.c: == Executing
[/usr/local/bin/mixmon “1300465595.27894_withhold.gsm”
“/var/log/asterisk/asterisk_rec/218543080/2011-03-18”]
[Mar 18 17:04:15] VERBOSE[27279] pbx.c: == Spawn extension (incoming-pri,
sw-30-218543080, 11) exited non-zero on ‘DAHDI/188-1’
[Mar 18 17:04:15] VERBOSE[27279] chan_dahdi.c: q931_hangup: other hangup
[Mar 18 17:04:15] VERBOSE[27279] chan_dahdi.c: NEW_HANGUP DEBUG: Calling
q931_hangup, ourstate Null, peerstate Null, hold-state Idle
[Mar 18 17:04:15] VERBOSE[27279] chan_dahdi.c: NEW_HANGUP DEBUG: Destroying
the call, ourstate Null, peerstate Null, hold-state Idle
[Mar 18 17:04:15] VERBOSE[27280] app_mixmonitor.c: == MixMonitor close
filestream
[Mar 18 17:04:15] VERBOSE[27279] chan_dahdi.c: — Hungup ‘DAHDI/188-1’
[Mar 18 17:04:15] VERBOSE[27280] app_mixmonitor.c: == Executing
[/usr/local/bin/mixmon “1300465487.27876_219575683.gsm”
“/var/log/asterisk/asterisk_rec/218543080/2011-03-18”]
[Mar 18 17:04:15] VERBOSE[27954] pbx.c: == Spawn extension (incoming-pri,
sw-30-218543080, 11) exited non-zero on ‘DAHDI/192-1’
[Mar 18 17:04:15] VERBOSE[27955] app_mixmonitor.c: == MixMonitor close
filestream
[Mar 18 17:04:15] VERBOSE[27954] chan_dahdi.c: q931_hangup: other hangup
[Mar 18 17:04:15] VERBOSE[27954] chan_dahdi.c: NEW_HANGUP DEBUG: Calling
q931_hangup, ourstate Null, peerstate Null, hold-state Idle
[Mar 18 17:04:15] VERBOSE[27954] chan_dahdi.c: NEW_HANGUP DEBUG: Destroying
the call, ourstate Null, peerstate Null, hold-state Idle
[Mar 18 17:04:15] VERBOSE[27954] chan_dahdi.c: — Hungup ‘DAHDI/192-1’
[Mar 18 17:04:15] VERBOSE[19844] chan_dahdi.c: TEI=0 Sending SABME
[Mar 18 17:04:15] VERBOSE[27955] app_mixmonitor.c: == Executing
[/usr/local/bin/mixmon “1300467477.28066_229959499.gsm”
“/var/log/asterisk/asterisk_rec/218543080/2011-03-18”]
[Mar 18 17:04:15] VERBOSE[27487] pbx.c: == Spawn extension (incoming-pri,
sw-30-218543080, 11) exited non-zero on ‘DAHDI/190-1’
[Mar 18 17:04:15] VERBOSE[27487] chan_dahdi.c: q931_hangup: other hangup
[Mar 18 17:04:15] VERBOSE[27488] app_mixmonitor.c: == MixMonitor close
filestream
[Mar 18 17:04:15] VERBOSE[27487] chan_dahdi.c: NEW_HANGUP DEBUG: Calling
q931_hangup, ourstate Null, peerstate Null, hold-state Idle
[Mar 18 17:04:15] VERBOSE[27487] chan_dahdi.c: NEW_HANGUP DEBUG: Destroying
the call, ourstate Null, peerstate Null, hold-state Idle
[Mar 18 17:04:15] VERBOSE[27487] chan_dahdi.c: — Hungup ‘DAHDI/190-1’
[Mar 18 17:04:15] VERBOSE[27488] app_mixmonitor.c: == Executing
[/usr/local/bin/mixmon “1300466049.27932_263949634.gsm”
“/var/log/asterisk/asterisk_rec/218543080/2011-03-18”]
[Mar 18 17:04:16] VERBOSE[27280] app_mixmonitor.c: == End MixMonitor
Recording DAHDI/188-1
[Mar 18 17:04:16] VERBOSE[27488] app_mixmonitor.c: == End MixMonitor
Recording DAHDI/190-1
[Mar 18 17:04:16] VERBOSE[27354] app_mixmonitor.c: == End MixMonitor
Recording DAHDI/189-1
[Mar 18 17:04:16] VERBOSE[27955] app_mixmonitor.c: == End MixMonitor
Recording DAHDI/192-1
[Mar 18 17:04:16] VERBOSE[19844] chan_dahdi.c: TEI=0 Sending SABME
[Mar 18 17:04:17] VERBOSE[19844] chan_dahdi.c: TEI=0 MDL-ERROR (G): T200
expired N200 times sending SABME in state 5(Awaiting establishment)
[Mar 18 17:04:17] VERBOSE[19844] chan_dahdi.c: Changing from state
5(Awaiting establishment) to 4(TEI assigned)
[Mar 18 17:04:17] VERBOSE[19844] chan_dahdi.c: TEI=0 DL event:
Q931_DL_EVENT_DL_RELEASE_IND(3)
[Mar 18 17:04:17] VERBOSE[19844] chan_dahdi.c: TEI=0 Sending SABME
[Mar 18 17:04:17] VERBOSE[19844] chan_dahdi.c: Changing from state 4(TEI
assigned) to 5(Awaiting establishment)
[Mar 18 17:04:17] VERBOSE[19844] chan_dahdi.c: == Primary D-Channel on
span 7 down
[Mar 18 17:04:17] WARNING[19844] chan_dahdi.c: No D-channels available!
Using Primary channel 202 as D-channel anyway!
[Mar 18 17:04:18] VERBOSE[19844] chan_dahdi.c: TEI=0 Sending SABME
[Mar 18 17:04:19] VERBOSE[19844] chan_dahdi.c: TEI=0 Sending SABME
[Mar 18 17:04:20] VERBOSE[19844] chan_dahdi.c: TEI=0 Sending SABME
[Mar 18 17:04:21] VERBOSE[19844] chan_dahdi.c: TEI=0 MDL-ERROR (G): T200
expired N200 times sending SABME in state 5(Awaiting establishment)
[Mar 18 17:04:21] VERBOSE[19844] chan_dahdi.c: Changing from state
5(Awaiting establishment) to 4(TEI assigned)
[Mar 18 17:04:21] VERBOSE[19844] chan_dahdi.c: TEI=0 DL event:
Q931_DL_EVENT_DL_RELEASE_IND(3)
[Mar 18 17:04:21] VERBOSE[19844] chan_dahdi.c: TEI=0 Sending SABME
[Mar 18 17:04:21] VERBOSE[19844] chan_dahdi.c: Changing from state 4(TEI
assigned) to 5(Awaiting establishment)
[Mar 18 17:04:21] WARNING[19844] chan_dahdi.c: No D-channels available!
Using Primary channel 202 as D-channel anyway!
[Mar 18 17:04:22] VERBOSE[19844] chan_dahdi.c: TEI=0 Sending SABME
[Mar 18 17:04:23] VERBOSE[19844] chan_dahdi.c: TEI=0 Sending SABME
[Mar 18 17:04:24] VERBOSE[19844] chan_dahdi.c: TEI=0 Sending SABME
[Mar 18 17:04:25] VERBOSE[19844] chan_dahdi.c: TEI=0 MDL-ERROR (G): T200
expired N200 times sending SABME in state 5(Awaiting establishment)
[Mar 18 17:04:25] VERBOSE[19844] chan_dahdi.c: Changing from state
5(Awaiting establishment) to 4(TEI assigned)
[Mar 18 17:04:25] VERBOSE[19844] chan_dahdi.c: TEI=0 DL event:
Q931_DL_EVENT_DL_RELEASE_IND(3)
[Mar 18 17:04:25] VERBOSE[19844] chan_dahdi.c: TEI=0 Sending SABME
[Mar 18 17:04:25] VERBOSE[19844] chan_dahdi.c: Changing from state 4(TEI
assigned) to 5(Awaiting establishment)
[Mar 18 17:04:25] WARNING[19844] chan_dahdi.c: No D-channels available!
Using Primary channel 202 as D-channel anyway!
[Mar 18 17:04:26] VERBOSE[19844] chan_dahdi.c: TEI=0 Sending SABME
[Mar 18 17:04:27] VERBOSE[19844] chan_dahdi.c: TEI=0 Sending SABME
[Mar 18 17:04:28] VERBOSE[19844] chan_dahdi.c: TEI=0 Sending SABME

2 thoughts on - One PRI card with 2 (or more) Telcos

  • Just a follow up with a bit more information

    asterisk*CLI> module show like timing
    Module Description Use
    Count
    res_timing_pthread.so pthread Timing Interface 0

    *res_timing_dahdi.so DAHDI Timing Interface
    40*
    2 modules loaded
    asterisk*CLI>

  • If your telcos are not synchronizing their network clocks to each other,
    you will not be able to solve this problem on a multi-port Digium T1/E1
    card. Digium T1/E1 cards select a single master clock (either the
    onboard clock or the clock recovered from one of the spans) to use as
    the ‘board clock’, which is then used to transmit data on all the spans.
    If the master clock is not in synchronization with the clocks at the
    other end of those spans, then bit slips will occur and cause various
    sorts of problems. This is why a card is always configured to use the
    recovered clock from a telco span if there is one, because the onboard
    clock would never by in sync with it.

    If you have a board connected to two telcos and their clocks are not
    synchronized, not only will you have trouble using a Digium card, but
    even using a card that can handle using multiple transmit clocks at once
    will not solve the underlying bit slip problem that will occur if you
    ever connect a channel from Telco1 to a channel from Telco2. If you
    *never* connect channels between Telcos, then you don’t have to worry
    about that problem, but if you do, at some point during the call there
    will be buffer overruns or underruns and there will be some effect (for
    a normal voice call, the effect might be a short audio artifact, and
    fairly harmless… unless the call is a modem or FAX call, in which case
    it could cause the call to fail).

    For your sanity, I would strongly suggest that you don’t connect spans
    from multiple telcos/networks/etc. on a single card, but keep each span
    provider on their own card.