48.6. CTIIAX diagnostics and statistics

48.6.1. CTIIAX diagnostics

Use the following commands to display the diagnostics of the CTIIAX resource:

d d ctiiax

Shows diagnostic information, such as the state of the resource, the currently used channels, the remote IAX username/address/port, the calling and the called number.

d de ctiiax

Shows diagnostic information in an extended format: the same information listed for d d ctiiax command and the state of Unattended/Attended Call Transfer, the minimum/average/maximum lag value during the call and the jitter value (calculated as the variance of the lag) in least 10 seconds.

[22:15:27] ABILIS_CPX:d d ctiiax

RES:CtiIax --------------------------------------------------------------------
       Inter-Asterisk_eXchange_Version_2
       STATE:ACTIVE    UDP-STATE:OPENED    USED-CHAN:1
       - IAX Channels diagnostics ---------------------------------------------
       CH: IAXState     User                              RemAdd-RemPort
           Q931State         CallId  CG                   CD
       ------------------------------------------------------------------------
       0   CONNECTED    asterisk160                       192.168.000.253-4569
           10-CONNECTED-TO   636     9916                 749
       ------------------------------------------------------------------------
       1   DISCONNECTED
           00-DISCONNECTED
       ------------------------------------------------------------------------
       2   DISCONNECTED
           00-DISCONNECTED
       ------------------------------------------------------------------------
       3   DISCONNECTED
           00-DISCONNECTED
       ------------------------------------------------------------------------
       4   DISCONNECTED
           00-DISCONNECTED
       ------------------------------------------------------------------------
       5   DISCONNECTED
           00-DISCONNECTED
       ------------------------------------------------------------------------
       6   DISCONNECTED
           00-DISCONNECTED
       ------------------------------------------------------------------------
       7   DISCONNECTED
           00-DISCONNECTED
       ------------------------------------------------------------------------
       8   DISCONNECTED
           00-DISCONNECTED
       ------------------------------------------------------------------------
       9   DISCONNECTED
           00-DISCONNECTED
       ------------------------------------------------------------------------
[22:15:30] ABILIS_CPX:d de ctiiax

RES:CtiIax --------------------------------------------------------------------
       Inter-Asterisk_eXchange_Version_2
       STATE:ACTIVE    UDP-STATE:OPENED    USED-CHAN:1
       - IAX Channels diagnostics ---------------------------------------------
       CH: IAXState     User                              RemAdd-RemPort
           Q931State         CallId  CG                   CD
           Q932State    UCTState        ACTState          CPOState
                        MinLag  MaxLag  AvgLag  LastLag   10sec-JitterLag
       ------------------------------------------------------------------------
       0   CONNECTED    asterisk160                       192.168.000.253-4569
           10-CONNECTED-TO   636     9916                 749
           IDLE         -               -                 -
                        -       -       -       -         -
       ------------------------------------------------------------------------
       1   DISCONNECTED
           00-DISCONNECTED
       ------------------------------------------------------------------------
       2   DISCONNECTED
           00-DISCONNECTED
       ------------------------------------------------------------------------
       3   DISCONNECTED
           00-DISCONNECTED
       ------------------------------------------------------------------------
       4   DISCONNECTED
           00-DISCONNECTED
       ------------------------------------------------------------------------
       5   DISCONNECTED
           00-DISCONNECTED
       ------------------------------------------------------------------------
       6   DISCONNECTED
           00-DISCONNECTED
       ------------------------------------------------------------------------
       7   DISCONNECTED
           00-DISCONNECTED
       ------------------------------------------------------------------------
       8   DISCONNECTED
           00-DISCONNECTED
       ------------------------------------------------------------------------
       9   DISCONNECTED
           00-DISCONNECTED
       ------------------------------------------------------------------------

48.6.2. CTIIAX statistics

Use the following commands to display the statistics of the CTIIAX resource:

d s ctiiax

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 succesful/failed transmission requests.

d se ctiiax

Shows statistic information in an extended format: the same information listed for d se ctiiax command are shown for each session.

[22:15:27] ABILIS_CPX:d s ctiiax

RES:CtiIax --------------------------------------------------------------------
       IAX2                                                                    
       --- Cleared 3 days 12:31:07 ago, on 28/05/2015 at 19:48:09 -------------
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       SUCC-CALL  |          0|          2|FAIL-CALL  |          0|          0|
       SUCC-REG   |       6085|          0|FAIL-REG   |          0|          0|
       SUCC-QUAL  |          0|           |FAIL-QUAL  |          0|           |
       SUCC-TRAN  |          0|           |FAIL-TRAN  |          0|           |
       SUCC-TXREQ |          0|          0|FAIL-TXREQ |          0|          0|
       EXP-RETRY  |          0|          0|DTMF       |          0|          0|
       QUELCH     |          0|           |UNQUELCH   |          0|           |
       LOST-JITTER|           |          0|OUTSEQ-FULL|          0|           |
       LOST-NOBUF |          0|          0|OUTSEQ-MINI|          0|           |
       UNSUPPORTED|          0|          0|TRUNK-OVR  |           |          0|
       DENIED-IP  |          0|           |BANNED-IP  |          0|           |
[22:15:30] ABILIS_CPX:d se ctiiax

RES:CtiIax --------------------------------------------------------------------
       IAX2                                                                    
       --- Cleared 3 days 12:31:35 ago, on 28/05/2015 at 19:48:09 -------------
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       SUCC-CALL  |          0|          2|FAIL-CALL  |          0|          0|
       SUCC-REG   |       6086|          0|FAIL-REG   |          0|          0|
       SUCC-QUAL  |          0|           |FAIL-QUAL  |          0|           |
       SUCC-TRAN  |          0|           |FAIL-TRAN  |          0|           |
       SUCC-TXREQ |          0|          0|FAIL-TXREQ |          0|          0|
       EXP-RETRY  |          0|          0|DTMF       |          0|          0|
       QUELCH     |          0|           |UNQUELCH   |          0|           |
       LOST-JITTER|           |          0|OUTSEQ-FULL|          0|           |
       LOST-NOBUF |          0|          0|OUTSEQ-MINI|          0|           |
       UNSUPPORTED|          0|          0|TRUNK-OVR  |           |          0|
       DENIED-IP  |          0|           |BANNED-IP  |          0|           |
       ------------------------------------------------------------------------
       CH:0   CallId:1815    CG:0376370598            CD:0376391900
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       VOICE-FRM  |          0|          0|LOST       |          0|           |
       OUTSEQ-FULL|          0|           |LOST-JITTER|           |          0|
       OUTSEQ-MINI|          0|           |LOST-NOBUF |           |          0|
       ------------------------------------------------------------------------
       CH:1   CallId:0       CG:                      CD:
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       VOICE-FRM  |          0|          0|LOST       |          0|           |
       OUTSEQ-FULL|          0|           |LOST-JITTER|           |          0|
       OUTSEQ-MINI|          0|           |LOST-NOBUF |           |          0|
       ------------------------------------------------------------------------
       CH:2   CallId:0       CG:                      CD:
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       VOICE-FRM  |          0|          0|LOST       |          0|           |
       OUTSEQ-FULL|          0|           |LOST-JITTER|           |          0|
       OUTSEQ-MINI|          0|           |LOST-NOBUF |           |          0|
       ------------------------------------------------------------------------
       CH:3   CallId:0       CG:                      CD:
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       VOICE-FRM  |          0|          0|LOST       |          0|           |
       OUTSEQ-FULL|          0|           |LOST-JITTER|           |          0|
       OUTSEQ-MINI|          0|           |LOST-NOBUF |           |          0|
       ------------------------------------------------------------------------
       CH:4   CallId:0       CG:                      CD:
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       VOICE-FRM  |          0|          0|LOST       |          0|           |
       OUTSEQ-FULL|          0|           |LOST-JITTER|           |          0|
       OUTSEQ-MINI|          0|           |LOST-NOBUF |           |          0|
       ------------------------------------------------------------------------
       CH:5   CallId:0       CG:                      CD:
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       VOICE-FRM  |          0|          0|LOST       |          0|           |
       OUTSEQ-FULL|          0|           |LOST-JITTER|           |          0|
       OUTSEQ-MINI|          0|           |LOST-NOBUF |           |          0|
       ------------------------------------------------------------------------
       CH:6   CallId:0       CG:                      CD:
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       VOICE-FRM  |          0|          0|LOST       |          0|           |
       OUTSEQ-FULL|          0|           |LOST-JITTER|           |          0|
       OUTSEQ-MINI|          0|           |LOST-NOBUF |           |          0|
       ------------------------------------------------------------------------
       CH:7   CallId:0       CG:                      CD:
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       VOICE-FRM  |          0|          0|LOST       |          0|           |
       OUTSEQ-FULL|          0|           |LOST-JITTER|           |          0|
       OUTSEQ-MINI|          0|           |LOST-NOBUF |           |          0|
       ------------------------------------------------------------------------
       CH:8   CallId:0       CG:                      CD:
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       VOICE-FRM  |          0|          0|LOST       |          0|           |
       OUTSEQ-FULL|          0|           |LOST-JITTER|           |          0|
       OUTSEQ-MINI|          0|           |LOST-NOBUF |           |          0|
       ------------------------------------------------------------------------
       CH:9   CallId:0       CG:                      CD:
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       VOICE-FRM  |          0|          0|LOST       |          0|           |
       OUTSEQ-FULL|          0|           |LOST-JITTER|           |          0|
       OUTSEQ-MINI|          0|           |LOST-NOBUF |           |          0|
       ------------------------------------------------------------------------

48.6.3. Debug of the CTIIAX resource

Below debug commands are described. They're useful to view the authentication/registration logs and the registered IAX users table.

[Note]Note

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

Type the following command to display the syntax:

[14:09:58] ABILIS_CPX:debug res:ctiiax lsn:0

RES:CtiIax --------------------------------------------------------------------
       Inter-Asterisk_eXchange_Version_2                                       
       BufferLength:931    Date/Time:09/06/2015 09:53:09 TraceTime:42200235

Usage:

   LSN:0                   - This help
   LSN:1                   - Extra channels diags
   LSN:2                   - Show transferring 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 registered users
   LSN:10 CMD:UserName     - Force Abilis registration with this user
   LSN:11 CMD:UserName     - Force User unregisterring.

Type the following command to display the event logs connected with the users registration:

[18:04:09] ABILIS_CPX:debug res:ctiiax lsn:3

RES:CtiIax --------------------------------------------------------------------
       IAX2                                                                    
       BufferLength:64512  Date/Time:01/06/2015 08:21:00 TraceTime:304352308

DD/MM/YYYY HH:MM:SS - CALLID  DESCRIPTION
01/06/2015 08:21:00 - [17449] Error in IN channel with 192.168.0.167:4569
01/06/2015 08:21:00 - [17449] Retransmission out of time FF 6, 14
01/06/2015 08:21:20 - [17451] Error in OUT channel with 192.168.0.100:4569
01/06/2015 08:21:20 - [17451] Password is not valid, peer:iaxphone

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 are cut off).

The most common usage is:

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

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

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

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

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

The following command shows the registration table (remote peers registered with Abilis and remote peers Abilis is registered too). Registration in IAX is a way to avoid NAT troubles and maintain connectivity between IAX peers.

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

RES:CtiIax --------------------------------------------------------------------
       IAX2                                                                    
       BufferLength:64512  Date/Time:01/06/2015 08:22:21 TraceTime:304433357

User                             Host                 Port REG    LIFETIME  AGE
-------------------------------------------------------------------------------
asterisk                         192.168.000.250      4569 REMOTE       60   12
zoiper                           192.168.000.024      4569 LOCAL        60   35
-------------------------------------------------------------------------------

Meaning of the parameters:

User

Username registered in the user table (d user).

Host

IP address of the user.

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 asterisk (IP address: 192.168.0.250) which needs Abilis registration each 60 seconds; Abilis registered itself 12 seconds ago.

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