Professional Documents
Culture Documents
o Theoretical introduction
BRI
PRI
ISDN Layers
Layer 1
Layer 2
Layer 3
o CAPI based EICON/Dialogic interface cards
Gathering traces with the dmonitor tool
Gathering traces with the Diva Trace Assistant
Take a trace as follows:
How to convert the Trace to text format
Gathering traces with mlog tool
Analysing trace files
Is the ISDN Network to blame?
Is the Escaux UCS server to blame?
o Zaptel based Digium PRI interface cards
Taking the right trace
Add more traces in /etc/asterisk/logger.conf needed (ESCAUX or RESELLER)
Restart asterisk (ESCAUX or RESELLER)
Put trace on the PRI (ESCAUX or RESELLER)
Wait an occurrence of the problem and analyze the log (ESCAUX)
Check that Layer 1 (Physical layer) is up
Check that Layer 2 (Link layer) is up
Important parameters : CRC4 / Clocking
Zaptel groups & channels
Groups
Channels
o Woomera based Sangoma interface cards
Theoretical introduction
BRI
Access to the network is called Basic Access (BA).
It is provided through a Basic Rate Interface (BRI).
This kind of interface is also called an S0 Interface.
There are two channels that you can use.
The Basic Rate Interface (BRI) consists of two full-duplex 64 Kbps B channels and one full-duplex 16 Kbps D
channel. The BRI is intended to meet the needs of most individual users. The end user with a BRI connects to the
ISDN through an S0 interface.
PRI
Access to the network is called Primary Rate Access (PRA).
It is provided through a Primary Rate Interface (PRI).
This kind of interface is also called an S2 Interface.
There are either 30 channels (most of the world) or 23 channels (North America, Japan) that you can use.
The Primary Rate Interface (PRI) consists of 30 full-duplex B channels and one fullduplex 64 Kbps D channel. In
some countries a PRI only consists of 23 B channels. The PRI was designed to meet the needs of users with
greater requirements. The end-user with a PRI connects to the ISDN with an S2 interface.
ISDN Layers
The bulk of ISDN protocol specifications address user to network interface and signalling information carried over
the D channel. The signalling protocol Q.931, for instance, carries call messages only between the user and network
and has no user-to-user significance. The protocols used on the B channel perform the user-to-user transmission of
information. The three protocol layers for the D channel are shown below.
Layer 1
Describes the physical connection between the terminal equipment (TE) and the network termination (NT), including
connectors, line code scheme, framing and electrical characteristics. It is a serial, full-duplex connection that can be
point-to-point or multipoint. Time Division Multiplexing is used to carry data from the D and B channels over the
physical link.
Several Layer 1 states can occur, the two most important ones are:
Down: this indicates that Layer 1 is deactivated, this means the Communicator is not establishing a Layer 1
connection to the telco ISDN switch
Activated: this indicates that Layer 1 is up and that you have a connection to the telco
Layer 2
Uses LAP-B and LAP-D procedures (Q.921) to ensure error-free communications over the physical link and defines
the logical link between the user and the network. The protocol also provides the procedures for multiplexing
multiple TEs on a single physical channel at the S/T reference point.
Layer 3
Defines the Q.931 signalling messages used to request services from the network. You will notice that layer 3 of the
B channel is not defined. This is because user data may be transported in any protocol the user application defines.
Optionally, Layer 3 of the D channel will support X.25.
Detailed specifications of the Q.931 protocol can be found in the ITU document
1. To start a Trace, go to the /usr/lib/eicon/divas directory and type ./Trace and choose the "Standard trace level”
option. On the screen "activate selective tracing" select NO. Accept all other default values.
2. Reproduce the problem.
3· Stop the Trace by typing ./Trace and select the option 'Save Trace and compress file'.
Once the trace has been generated, a file called /var/log/ditrace.bin will be created. To convert the trace into a file
that can be read easily, type the following command in the /usr/lib/eicon/divas directory.
divactrl ditrace -i /var/log/ditrace.bin >ditrace.txt
This will create a file called ditrace.txt in the /usr/lib/eicon/divas directory. This file can now be sent to Customer
Support along with a complete problem description.
/usr/lib/eicon/divas/divactrl mlog -o -b
The Diva Server Diagnostics utility produces a lot of output, most of this information is only useful to a developer,
but some of the more useful types of message are listed below.
Particularly the 'Cause' information is of interest. Below is an example of what this would look like in a trace. The
contents of your message will almost certainly be different from this one, so just look for the word 'Cause' and take
note of the two groups of letters and numbers following 'Cause' - in this case '82' and 'd8'.
The first byte '82' contains 'location' information - where the message comes from - while the second byte 'd8' is the
'diagnostic'.
Make a note of the two 'Cause' codes (82 d8 in the above example) and enter these codes into EICON's ISDN
Diagnostic Code Analyser. The code analyser will show you where in the network the problem was reported from,
describe the problem and suggest solutions.
You can often tell a lot about the mode of failure by only looking at the SIG-X and SIG-R messages. Look out for
these messages:
Some common types of bearer capabilities (present in the SIG-X SETUP message) are:
*Suggested Strategy for finding problems in a Diva Server Trace*
Layer1 & Layer 2 problems:
It is normal to have this kind of traces on a multipoint line (ex: BA without DDI):
SIG-EVENT FFFF0A
SIG-EVENT FFFF00
SIG-EVENT FFFF0A
...
*STEP 1:* Use the Diva Server Trace to find the message !"LoadAdapter" in the Initialisation sequence. To capture
the initialisation sequence of the Diva Server card follow the instructions on the page How to take a Diva Server
trace
This LoadAdapter message reports that the Diva Server card is installed and loaded correctly.
Also look for the message L1_UP in the trace. If you do not see this, then the Diva Server card is not even talking to
the network at the physical layer. Check the cable and the switch type configuration.
_*STEP 2:* Look for SIG-EVENT FFFF messages._
This shows low-level problems with the card. Look to see if there are any D-X or D-R messages; if there are not,
then the DIVA is not communicating with the NT1 or the network.
*STEP 3.* Quickly scan through the trace and look for " EVENT ".
This may show a local or network failure of some kind.
Layer 3 Problems:
_*STEP 4.* Make sure there is a SIG-X containing " SETUP "_
This indicates that a call is being made by the Diva Server card. If there is no SETUP, perhaps the application never
tried to make a call, or perhaps there is a layer 2 problem (see above).
_*STEP 5.* Check if a SIG-R came in containing " CONN "._
If the SETUP receives a "CONN" (CONNECT) as a response, then a "B" channel was successfully connected. If the
SETUP gets "DISCON" (DISCONNECT) as a response, then there is a problem with the network, or with the
equipment at the far end. DISCON normally has Q.931 cause codes to tell you what the problem is.
_*STEP 6.* If the cause of a "DISCON" is not obvious, then check the SETUP message_
Make sure that the ISDN numbers are correct, and also that the Bearer Capabilities look right.
_*STEP 7.* If the " CONN " event is received then look for " B-X " and " B-R " messages._
If you can see one or more of these, then the ISDN network and connection are OK, and you need to go on to the
next stage.
Higher Level Problems:
1. If you see B-X messages, but no B-R messages, then this means that DIVA is sending data (e.g. PPP frames),
but the remote equipment is not responding. Perhaps the remote equipment is not using the same protocol on the
"B" channel?
2. If the B-X and B-R data starts with " *FF 03* " then this is PPP protocol, and the next logical step is to analyse the
PPP to look for negotiation problems.
For example, are both ends using the same protocol (IP, IPX, Netbeui etc), does the authentication (i.e. PAP,
CHAP) succeed?
3. All "B" channel protocols (X.75, X.25, V.120 etc) have their own activation sequence, so at this stage you need to
start analysing the B-channel data with protocol-specific tools. Needless to say, it is important to have some idea
what kind of protocols the equipment at the other end of the link supports.
You can sometimes guess what the protocol is from the first frames sent and received, for example:
In this example, the first two lines show normal D-channel idle activity in both directions, and then at line 3, the
network resets the LAPD level by sending a SAMBE. This unexpected reset is detected by the Diva Server card as
an MDL error (according to the definitions for ISDN, for example in the ETSI specification). The type of the error is
'F', which means 'received SABME, Peer initiated re-establish'. More information on MDL Errors.
If calls are rejected and none of them show up in the asterisk console log and if you are sure that all external
number mappings are correct, the Diva Eicon CAPI stack might be to blame. Restart the Eicon card as
follows:
o Stop asterisk
o Stop ALL processes of tracing ISDN line
o Stop F-Secure anti-rootkit
o /usr/lib/eicon/divas/Stop to stop the card
o /usr/lib/eicon/divas/Start to start the card.
ESCAUX:
[logfiles]
RESELLER:
Enable more trace in the asterisk module.
Asterisk Console
Jul 23 01:09:28 DEBUG[1063] chan_zap.c: Got event HDLC Bad FCS (8) on D-channel for span 1
Jul 23 01:09:28 DEBUG[1063] chan_zap.c: Got event HDLC Bad FCS (8) on D-channel for span 1
Jul 23 01:09:29 DEBUG[1063] chan_zap.c: Got event HDLC Abort (6) on D-channel for span 1
Jul 23 01:09:29 DEBUG[1063] chan_zap.c: Got event HDLC Bad FCS (8) on D-channel for span 1
Jul 23 01:09:30 DEBUG[1063] chan_zap.c: Got event HDLC Abort (6) on D-channel for span 1
Jul 23 01:09:32 DEBUG[1063] chan_zap.c: Got event HDLC Bad FCS (8) on D-channel for span 1
Jul 23 01:09:32 DEBUG[1063] chan_zap.c: Got event HDLC Bad FCS (8) on D-channel for span 1
Jul 23 01:09:32 DEBUG[1063] chan_zap.c: Got event HDLC Bad FCS (8) on D-channel for span 1
If there are such messages, it is either the Escaux card or the line which had error. However, the communications
are not cut. If you can see yellow alarm or red alarms in /var/log/asterisk/messages then all the communication are
cut. If it is not case, look if a lot of DISCONNECT message comes in the same time from the provider. If it is the
case, ask why to the provider.
Check that Layer 1 (Physical layer) is up
zttool command should show Digium TE110P T1/E1 or 405P Cards PRI green
to be 100% sure AND the service is down, you can reconfigure all zaptel devices in order to refresh the
status of zttool (That cuts calls): ztcfg -vvvv
The following messages can be found in the log files
Primary D-channel: 16
Switchtype: EuroISDN
Type: CPE
Sentrej: 0
SolicitFbit: 0
Retrans: 0
Busy: 0
Overlap Dial: 0
Switchtype: EuroISDN
Type: CPE
Sentrej: 0
SolicitFbit: 0
Retrans: 0
Busy: 0
Overlap Dial: 0
If all is good at this moment issues a 'pri debug span x' where x is the PRI number and make an incoming
calls. You should see a SETUP Q931 message. GOOD:
< [a1]
< Bearer Capability (len= 5) [ Ext: 1 Q.931 Std: 0 Info transfer capability: Speech (0)
< Channel ID (len= 5) [ Ext: 1 IntID: Implicit, PRI Spare: 0, Preferred Dchan: 0
< Calling Number (len=12) [ Ext: 0 TON: National Number (2) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)
< Presentation: Presentation permitted, user number passed network screening (1) '26860903' ]
< Called Number (len=11) [ Ext: 1 TON: National Number (2) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)
'27661091' ]
> Channel ID (len= 5) [ Ext: 1 IntID: Implicit, PRI Spare: 0, Exclusive Dchan: 0
If you see "Dial ZAP/g1" -> it means the call is going over the 1st PRI interface (i.e. the one that is defined
as group=1 in gen_zapata.conf)
If you see "Dial ZAP/g2" -> it means the call is going over the 2nd PRI interface (i.e. the one that is defined
as group=2 in gen_zapata.conf)
Channels
If you see "Zap/6-1 is ringing", it means zaptel sent the call to the Zaptel Channel nr 6.
For more detail about zaptel channels : see zaptel.conf