61.7. CTISIP diagnostics, statistics, logs and debug

61.7.1. CTISIP diagnostics

To display the diagnostics of the CTISIP resource the following commands are used:

d d ctisip/d d sip

Shows diagnostic information, such as the state of the resource, the currently used channels, the remote SIP username, the local/remote IP address-port of the SIP channel for incoming packets, the calling and the called number only for in-use sessions.

d de ctisip/d de sip

Shows diagnostic information in an extended format: the same information listed for d d ctisip command and the state of Unattended/Attended Call Transfer, the local/remote IP address-port of the SIP channel for outgoing packets, the local/remote IP address-port for RTP and RTCP channel only for in-use sessions.

[12:34:34] ABILIS_CPX:d d sip

RES:CtiSip --------------------------------------------------------------------
       Session_Initiation_Protocol                                             
       STATE:ACTIVE    UDP-STATE:OPENED    USED-CHAN:1
       - SIP Channels diagnostics ---------------------------------------------
       CH:  SIP-State               SIP-LocAdd-Port-In       SIP-RemAdd-Port-In
            Q931-State              CG                       CD
            User                             CallId
       ------------------------------------------------------------------------
       0    CONNECTED               192.168.020.254-5060     192.168.013.096-13447
            10-CONNECTED-FROM       888                      767
            test                             OWMxMDQzYTliODBjZjU4MzJkN2RkMT..
       ------------------------------------------------------------------------
[12:34:34] ABILIS_CPX:d de sip

RES:CtiSip --------------------------------------------------------------------
       Session_Initiation_Protocol                                             
       STATE:ACTIVE    UDP-STATE:OPENED    USED-CHAN:1
       - SIP Channels diagnostics ---------------------------------------------
       CH:  SIP-State               SIP-LocAdd-Port-In       SIP-RemAdd-Port-In
                                    SIP-LocAdd-Port-Out      SIP-RemAdd-Port-Out
            Q931-State              CG                       CD
            User                             CallId
            RTP-State               RTP-LocAdd-LocPort       RTP-RemAdd-RemPort
            RTCP-State              RTCP-LocAdd-LocPort      RTCP-RemAdd-RemPort
            Q932-State   CPO-State  UCT-State                ACT-State
       ------------------------------------------------------------------------
       0    CONNECTED               192.168.020.254-5060     192.168.013.096-13447
                                    192.168.020.254-5060     192.168.013.096-13447
            10-CONNECTED-FROM       uxq888                   ue767
            test                             OWMxMDQzYTliODBjZjU4MzJkN2RkMT..
            OPENED                  192.168.020.254-6000     192.168.013.096-53792
            OPENED                  192.168.020.254-6001     192.168.013.096-53793
       ------------------------------------------------------------------------

Is possible to use some additional filters when more calls are in-use.

[14:27:11] ABILIS_CPX:d d sip ?

D D [RES:]CtiSip                           Display diagnostics of CtiSip
D D [RES:]CtiSip filter:val [filter:val]   Display diagnostics of SIP channels
                                           matching the specified filters.

Allowed filters:

CH:        SIP channel identifier.                                   <Optional>
           One value in the range [0..7999] or a range of values 'xxx-yyy'
           or a list of values 'xxx,yyy,...' separated by ',' (comma)
           or A or ALL.
CD:        Filter SIP channels by Called address.                    <Optional>
           From 1 up to 20 characters, in the range ['0'..'9', '?'
           '*'] or #, optionally preceded by TON [u, i, n, o, s, h, k]
           and/or NP [x, e, d, t, l, p] attributes.
CG:        Filter SIP channels by Calling address.                   <Optional>
           From 1 up to 20 characters, in the range ['0'..'9', '?'
           '*'] or #, optionally preceded by TON [u, i, n, o, s, h, k]
           and/or NP [x, e, d, t, l, p] and/or PI [a, r, m, q]
           and/or SI [y, v, w, z, j] attributes.
USER:      Filter SIP channels by User name.                         <Optional>
           From 1 up to 32 characters in the range ['0'..'9',
           'A'..'Z', 'a'..'z', '_', ':'], or a string preceded and/or
           followed by '*' (e.g. *mystr or mystr* or *mystr*) or #.
IP:        Filter SIP channels by remote IP address                  <Optional>
           [0.0.0.0..255.255.255.255]
PO:        Filter SIP channels by remote UDP port.                   <Optional>
           [0..65535]

The meaning:

STATE

Overall state of SIP driver:

  • INACTIVE - SIP driver does not accept incoming SIP calls and does not make outgoing SIP calls.

  • ACTIVE - SIP driver fully active.

UDP-STATE

UDP State: CLOSED, OPENING, OPENED, CLOSING.

USED-CHAN

Currently used channels.

CH

Channel identifier.

SIP-State

State of SIP protocol for this Channel

Q931-State

State of Q931 protocol for this Channel.

User

SIP Channel remote SIP user name.

RTP-State

State of RTP protocol for this Channel: CLOSED, OPENING, OPENED, CLOSING.

RTCP-State

State of RTCP protocol for this Channel: CLOSED, OPENING, OPENED, CLOSING.

Q932-State

State of Q932 protocol for this Channel.

SIP-LocAdd-Port-In

SIP Channel local IP address / UDP port for incoming packets.

SIP-LocAdd-Port-Out

SIP Channel local IP address / UDP port for outgoing packets.

SIP-RemAdd-Port-In

SIP Channel remote IP address / UDP port for incoming packets.

SIP-RemAdd-Port-Out

SIP Channel remote IP address / UDP port for outgoing packets.

CG

The Calling Number of the Call.

CD

The Called Number of the Call.

CallId

Call identifier.

RTP-LocAdd-LocPort

SIP RTP Channel local IP address / UDP local port.

RTCP-LocAdd-LocPort

SIP RTPC Channel local IP address / UDP local port.

RTP-RemAdd-RemPort

SIP RTP Channel remote IP address / UDP remote port.

RTCP-RemAdd-RemPort

SIP RTPC Channel remote IP address / UDP remote port.

UCT-State

State of Unattended Call Transfer for this Channel.

ACT-State

State of Attended Call Transfer for this Channel.

CPO-State

State of Call Path Optimization for this Channel.

61.7.2. CTISIP statistics

To display statistics of the CTISIP resource the following commands are used:

d s ctisip/d s sip

Shows statistic information, such as the number of incoming/outgoing accepted/rejected calls, the number of incoming/outgoing succesful/failed registrations, the number of incoming/outgoing reinvites, the number of successful incoming/outgoing transfers, the number of expired retransmission timer in incoming/outgoing calls.

d se ctisip/d se sip

Shows statistic information of OPENED SIP channels.

d se ctisip all/d se sip all

Shows statistic information of of ALL SIP channels.

[12:34:34] ABILIS_CPX:d s sip

RES:CtiSip --------------------------------------------------------------------
       Session_Initiation_Protocol                                             
       --- Cleared 7 days 16:30:07 ago, on 25/06/2020 at 19:06:33 -------------
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       SUCC-CALL  |          0|          0|FAIL-CALL  |          0|          0|
       SUCC-REG   |        480|          0|FAIL-REG   |         52|          0|
       SUCC-SUB   |         18|           |FAIL-SUB   |         60|           |
       SUCC-NOT   |           |          0|FAIL-NOT   |           |         18|
       SUCC-TRAN  |          0|          0|FAIL-TRAN  |          0|          0|
       NOCHAN-CALL|          0|          0|NOCHAN-REG |          0|          0|
       NOCHAN-SUB |          0|           |NOCHAN-NOT |           |          0|
       EXP-RETRY  |          0|          0|DTMF       |          2|          0|
       HOLD       |          0|          0|UN-HOLD    |          0|          0|
       UNKNOWN    |          0|         51|REINVITES  |          0|          0|
       SIP-NOBUF  |          0|          0|OUTSEQ     |          0|           |
       DENIED-IP  |          2|           |BANNED-IP  |          0|           |
[12:34:34] ABILIS_CPX:d se sip

RES:CtiSip --------------------------------------------------------------------
       Session_Initiation_Protocol                                             
       --- Cleared 7 days 16:30:11 ago, on 25/06/2020 at 19:06:33 -------------
       ------------------------------------------------------------------------
       CH:0       CallId:OWMxMDQzYTliODBjZjU4MzJkN2RkMT..
       ST:OPENED  CG:uxq888                     CD:ue767
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       RTP-PCK    |       1587|       1596|T38-PCK    |          0|          0|
       RTP-NOBUF  |          0|          0|T38-NOBUF  |          0|          0|
       RTP-MISS   |          2|          0|T38-MISS   |          0|           |
       RTP-OUTSEQ |          0|           |T38-OUTSEQ |          0|           |
       RTP-REORDER|          0|           |T38-REORDER|          0|           |
       RTP-MALFORM|          0|           |T38-MALFORM|          0|           |
       RTCP-PCK   |         13|          1|SIP-OUTSEQ |          0|           |
       ------------------------------------------------------------------------

Is possible to use some additional filters when more calls are in-use.

[14:27:11] ABILIS_CPX:d s sip ?

D SE [RES:]CtiSip                              Display statistics of OPENED SIP channels
D SE [RES:]CtiSip ALL | CH:A | CH:ALL          Display statistics of ALL SIP channels
D SE [RES:]CtiSip CH:x                         Display statistics of SPECIFIED SIP channel

D SE [RES:]CtiSip filter:val [filter:val]      Display statistics of OPENED SIP channels
                                               matching the specified filters.
D SE [RES:]CtiSip ALL filter:val [filter:val]  Display statistics of ALL SIP channels
                                               matching the specified filters.

Options:

ALL        ALL SIP channels.                                         <Optional>
           It is the same as CH:A or CH:ALL.
CH:        SIP channel identifier.                                   <Optional>
           One value in the range [0..7999] or a range of values 'xxx-yyy' or
           a list of values 'xxx,yyy,...' separated by ',' (comma) or A or ALL.
           Value CH:A and CH:ALL are the same as option ALL.

Allowed filters:

CD:        Called address.                                           <Optional>
           Up to 20 characters in the range ['0'..'9', '?', '*'] or #.
CG:        Calling address.                                          <Optional>
           Up to 20 characters in the range ['0'..'9', '?', '*'] or #.
USER:      User name.                                                <Optional>
           Up to 32 characters in the range ['0'..'9', 'A'..'Z', 'a'..'z',
           '_', ':'], optionally preceded and/or followed by '*'
           (e.g. *mystr or mystr* or *mystr*) or #.

With reference to the shown interval of time («Cleared 7 days 16:30:11 ago») these counters show the number of:

SUCC-CALLSuccessful incoming/outgoing calls.
SUCC-REGSuccessful incoming/outgoing registrations.
SUCC-SUBSuccessful incoming/outgoing subscriptions.
SUCC-NOTSuccessful outgoing notifications.
SUCC-TRANReceived and executed incoming/outgoing call transfer requests.
FAIL-CALLFailed incoming/outgoing calls
FAIL-REGFailed incoming/outgoing registrations.
FAIL-SUBFailed incoming/outgoing subscriptions.
FAIL-NOTFailed outgoing notifications.
FAIL-TRANReceived and failed incoming/outgoing call transfer requests.
NOCHAN-CALLIncoming/outgoing calls discarded because there was no available channel.
NOCHAN-SUBIncoming subscriptions discarded because there was no available channel.
NOCHAN-REGIncoming/outgoing registrations discarded because there was no available channel.
NOCHAN-NOTOutgoing notifications discarded because there was no available channel.
EXP-RETRYExpired retransmission timer in incoming/outgoing calls.
DTMFReceived/sent DTMF frames.
HOLDReceived/sent ON HOLD invite.
UN-HOLDReceived/sent OFF HOLD invite.
UNKNOWNReceived/sent unknown responses.
REINVITESIncoming/outgoing re-invites.
SIP-NOBUFIN - discarded voice packets coming from UDP because buffers full. OUT - discarded voice packets coming from CTIR because buffers full.
OUTSEQOut of sequence frames.
DENIED-IPDiscarded signalling packets coming from UDP cause IP source is not allowed. The not-allowed requester is a client whose IP address is not present in IPSRC and IPSRCLIST parameters configuration.
BANNED-IPDiscarded signalling packets coming from UDP cause IP source is banned by IPBAN service.

SIP channel statistic:

CHChannel Identifier.
CallIdCall identifier.
STState of the Channel.
CGThe Calling Number of the Call.
CDThe Called Number of the Call.
RTP-PCKReceived/sent RTP packets.
RTP-NOBUFLost incoming/outgoing RTP packets cause buffer overflow.
RTP-MISSIN - missing RTP packets. OUT - missing outgoing RTP Packets cause jittering.
RTP-OUTSEQOut of sequence RTP packets.
RTP-REORDERReordered RTP packets.
RTP-MALFORMMalformed IN RTP packets.
T38-PCKReceived/sent T38 packets.
T38-NOBUFLost incoming/outgoing T38 packets cause buffer overflow.
T38-MISSMissing T38 packets.
T38-OUTSEQOut of sequence T38 packets.
T38-REORDERReordered T38 packets.
T38-MALFORMMalformed IN T38 packets.
RTCP-PCKReceived/sent RTCP packets.
SIP-OUTSEQOut of Sequence SIP messages.

61.7.3. CTISIP logs

To show the log of CTISIP type the following command:

[15:54:16] ABILIS_CPX:d sip log

CURRENT EVENTS LOG MASK: ERR REG INFO 

19/07 15:57:23 [ 10] Reg Info in IN channel with 192.168.20.107:42968
19/07 15:57:23 [ 10] Opened new SIP REG channel
19/07 15:57:23 [ 10] Declared user: test
19/07 15:57:23 [ 10] Freeing the channel
19/07 15:57:28 [ 10] Reg Info in IN channel with 192.168.20.107:63330
19/07 15:57:28 [ 10] Opened new SIP REG channel
19/07 15:57:28 [ 10] Declared user: test3
19/07 15:57:28 [ 10] Freeing the channel
19/07 15:59:34 [ 10] Reg Info in IN channel with 192.168.20.107:42968
19/07 15:59:34 [ 10] Opened new SIP REG channel
19/07 15:59:34 [ 10] Declared user: test
19/07 15:59:34 [ 10] Freeing the channel
19/07 15:59:38 [ 10] Reg Info in IN channel with 192.168.20.107:63330
19/07 15:59:38 [ 10] Opened new SIP REG channel
19/07 15:59:38 [ 10] Declared user: test3
19/07 15:59:38 [ 10] Freeing the channel
19/07 16:00:15 [ 10] Reg Info in IN channel with 192.168.20.107:42968
19/07 16:00:15 [ 10] Opened new SIP REG channel
19/07 16:00:15 [ 10] Declared user: test
19/07 16:00:15 [ 10] Freeing the channel
19/07 16:00:16 [ 10] Reg Info in IN channel with 192.168.20.107:63330
19/07 16:00:16 [ 10] Opened new SIP REG channel
19/07 16:00:16 [ 10] Declared user: test3
19/07 16:00:16 [ 10] Freeing the channel

To set the filter event use, type the command: s ctisip log event:<filter>

[15:55:22] ABILIS_CPX:s ctisip log event: ?

S CTISIP LOG EVENT:val                Set CTISIP log events filter

EVENT:         CTISIP log events filter [ERR, REG, INFO] or [DFT, FULL], where:
               - ERR, REG, INFO filters can be joined using "," operator;
               - DFT: means ERR events;
               - FULL: means every type of event.

[15:55:46] ABILIS_CPX:s ctisip log event:full

Debug log mask was set to:ERR REG INFO 

To clear the log, type the following command:

[15:55:25] ABILIS_CPX:c ctisip log

Now session log is empty

61.7.4. D SIP CALLS

SIP call data can be delivered to a SYSLOG server, moreover the latest 1000 calls are kept in ram memory and are visible via D SIP CALLS command. Each record contains several fields like timestamps, numbers, users, state reached, RTP ad T38 statistics.

Below there is an example for different calls:

  • direct call with RTP and T38

  • direct call with RTP

  • redirected call with RTP

[12:32:04] ABILIS_CPX:d sip calls

010720 121254 start:2020-07-01 12:12:00.841 dur:7/46 user:test210 In CONN-FROM cg:9002 cd:5103 rtp-I/O[462/458 0/0 0/0 0/- 0/- 0/-] t38-I/O[676/74 0/0 0/- 0/- 0/- 0/-] ses:1246 id:1246
010720 122925 start:2020-07-01 12:28:52.692 dur:1/32 user:test210 In CONN-FROM cg:9002 cd:5103 rtp-I/O[1540/1622 0/0 0/0 0/- 0/- 0/-] ses:1379 id:1379
010720 190238 start:2020-07-01 19:02:35.013 dur:2/1 user:test210 Out CONN-TO cg:5103 cd:9002 rg:5101 rtp-I/O[54/54 0/0 0/0 0/- 0/- 0/-] ses:6 id:7 

Description of fields:

  • start: date and time of call start

  • dur: duration in seconds of start-to-active phase/active-to-close. In practice the time required to get connected and the time spent in connected.

  • user: Abilis user involved in the call

  • call direction: In CONN-FROM or Out CONN-TO as seen from Abilis side, i.e. user->Abilis is In, Abilis->user is Out.

  • cd: called number

  • cg: calling number

  • rg: redirecting numer. This field is present only if the redirecting number is present in the call.

  • rtp-I/O: RTP statistics of input and output directions, fields are in the same order as D SE output, i,e.: PCK, NOBUF, MISS, OUTSEQ, REORDER, MALFORM.

  • t38-I/O: T38 statistics of input and output directions, fields are in the same order as D SE output, i,e.: PCK, NOBUF, MISS, OUTSEQ, REORDER, MALFORM.

61.7.5. Debug of the CTISIP resource

Below debug commands are described.

[Note]Note

To use these commands you need to have administrator or super user rights.

Type the following command to display the syntax of the command:

[12:34:34] ABILIS_CPX:debug res:ctisip lsn:0

RES:CtiSip --------------------------------------------------------------------
       Session_Initiation_Protocol                                             
       BufferLength:64512  Date/Time:29/05/2015 15:22:27 TraceTime:70443851

Usage:

   LSN:0                   - This help
   LSN:1                   - Extra channels diags
   LSN:2                   - Advanced channels diags
   LSN:3                   - Show debug log
   LSN:3 CMD:CLR           - Clear debug log
   LSN:3 CMD:SET:[DFT | CLR | FULL | [level,...]] - Set log event mask
                       No parameters - Show current events log mask
                       DFT    - Log default events (ERR events only)
                       CLR    - Clear log event mask
                       FULL   - Log all events
                       levels:
                       ERR    - Log only error events
                       REG    - Registration events
                       INFO   - Informative events
   LSN:4                   - Show registrations
   LSN:4  CMD:<user>       - Show registration of the specified user
   LSN:5                   - Show subscriptions
   LSN:5  CMD:<user>       - Show subscriptions of the specified user
   LSN:10 CMD:<user>       - Make remote registration with the specified user
   LSN:11 CMD:<user>       - De-register the specified user
   LSN:12 CMD:<user>       - Remove subscriptions of the specified user
   LSN:20 CMD:<NumPackets>  - Simulates loss of NumPackets packets from CTIR
   LSN:21 CMD:<NumPackets>  - Simulates loss of NumPackets packets to CTIR
   LSN:22                  - Print Call&Ring table
   LSN:23                  - Print Capability table
   LSN:24 CMD:<user>       - Remove a specified user  from capability table
   LSN:24 CMD:ALL          - Remove all users from capability table
   LSN:30                  - Show extra UDP receivers dignostics

Type the below command to view the event logs connected with the users registration:

[12:37:17] ABILIS_CPX:debug res:ctisip lsn:3

RES:CtiSip --------------------------------------------------------------------
       Session_Initiation_Protocol                                             
       BufferLength:64512  Date/Time:29/05/2015 15:23:20 TraceTime:70496487

DD/MM/YYYY HH:MM:SS - CHANNEL DESCRIPTION
29/05/2015 09:33:26 - [   30] Error in OUT channel with 62.62.62.62:5060
29/05/2015 09:33:26 - [   30] AUTH timer timeout
29/05/2015 11:08:09 - [   30] Error in OUT channel with 62.62.62.62:5060
29/05/2015 11:08:09 - [   30] AUTH timer timeout
29/05/2015 15:34:56 - [   30] Error in OUT channel with 62.62.62.62:5060
29/05/2015 15:34:56 - [   30] AUTH timer timeout
29/05/2015 15:40:44 - [   30] Error in OUT channel with 62.62.62.62:5060
29/05/2015 15:40:44 - [   30] AUTH timer timeout
29/05/2015 17:46:24 - [   30] Error in OUT channel with 62.62.62.62:5060
29/05/2015 17:46:24 - [   30] AUTH timer timeout

This table shows data, time, identification of the event and the description of the error.

Possible errors could be:

  • Unknown user;

  • Codec not supported;

  • Retransmission out of time (happens when you're cut off).

The most common usage is:

  • debug res:ctisip lsn:3: shows log;

  • debug res:ctisip lsn:3 cmd:clr: clear log;

  • debug res:ctisip lsn:3 cmd:set:err: set log mask to log only errors events;

  • debug res:ctisip lsn:3 cmd:set:err,reg: set log mask to log only errors and registration events;

  • debug res:ctisip lsn:3 cmd:set:full: set log mask to log any event.

The following command allows to show the registration table (remote peers registered with Abilis and remote peers Abilis is registered too).

[17:03:12] ABILIS_CPX:debug res:ctisip lsn:4

RES:CtiSip --------------------------------------------------------------------
       Session_Initiation_Protocol                                             
       BufferLength:64512  Date/Time:29/05/2015 15:24:37 TraceTime:70573545

User                             Host            Prot Port REG    LIFETIME  AGE
-------------------------------------------------------------------------------
sip_proxy                        062.062.062.062 UDP  5060 REMOTE      120   21
zoiper                           192.168.000.024 UDP  5060 LOCAL        60   35
-------------------------------------------------------------------------------

Meaning of the parameters:

User

Username registered in the user table (d user).

Host

IP address of the user.

Prot

Transport protocol.

Port

UDP port of the user.

REG

Registration of the user [REMOTE: Abilis is registered to a remote peer; LOCAL: a remote peer is registered to Abilis].

LIFETIME

How often (in seconds) the registration is requested.

AGE

Time (in seconds) since last valid registration.

In the previous example, Abilis is registered to the remote peer sip_proxy (IP address: 62.62.62.62) which needs Abilis registration each 120 seconds; Abilis registered itself 21 seconds ago.

The user zoiper (IP address: 192.168.0.24) is registered to Abilis; it registered itself 35 seconds ago.