60.6. CTIIAX diagnostics and statistics

60.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
       ------------------------------------------------------------------------

The meaning:

STATE

Overall state of IAX driver:

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

  • ACTIVE - IAX driver fully active.

UDP-STATE

UDP State: CLOSED, OPENING, OPENED, CLOSING.

USED-CHAN

Currently used channels.

CH

Channel identifier.

IAXState

Channel IAX State.

Q931State

State of Q931 protocol for this Channel.

Q932State

Q932 state of IAX channel.

User

IAX2 Channel remote IAX user name.

RemAdd-RemPort

IAX2 Channel remote IP address/ UDP port.

CallId

Call identifier.

CG

Calling address.

CD

Called address.

UCTState

Unattended Call Transfer State.

ACTState

Attended Call Transfer State.

CPOState

Call Path Optimization State.

MinLag

Minimum Lag during the call.

MaxLag

Maximum Lag during the call.

AvgLag

Average Lag during the call.

LastLag

Last calculated Lag.

10sec-JitterLag

Average Jitter in last 10 secs in millisec ( this is the variance of LAG ).

60.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 --------------------------------------------------------------------
       Inter-Asterisk_eXchange_Version_2                                       
       --- Cleared 21 days 03:19:33 ago, on 24/08/2020 at 09:18:34 ------------
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       SUCC-CALL  |       1732|       4337|FAIL-CALL  |         50|          0|
       SUCC-REG   |      36524|          0|FAIL-REG   |     145983|          0|
       SUCC-QUAL  |          0|           |FAIL-QUAL  |          0|           |
       SUCC-TRAN  |          0|           |FAIL-TRAN  |          0|           |
       SUCC-TXREQ |          0|          0|FAIL-TXREQ |         17|          0|
       EXP-RETRY  |          0|          0|DTMF       |        347|        362|
       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:0333333333            CD:0344444444
       -----------|---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|
       ------------------------------------------------------------------------
...

With reference to the shown interval of time («Cleared 21 days 03:19:33 ago») these counters show the number of:

SUCC-CALLSuccessful incoming/outgoing calls.
SUCC-REGSuccessful incoming/outgoing registrations.
SUCC-QUALSuccessful incoming qualifings.
SUCC-TRANReceived and executed unattended call transfer requests.
SUCC-TXREQIN - received and executed attended call transfer requests. OUT - successfully outgoing Call Path Optimization requests.
FAIL-CALLFailed incoming/outgoing calls
FAIL-REGFailed incoming/outgoing registrations.
FAIL-QUALFailed incoming qualifings.
FAIL-TRANReceived and failed unattended call transfer request.
FAIL-TXREQIN - received and failed attended call transfer requests. OUT - failed outgoing Call Path Optimization requests.
EXP-RETRYExpired retransmission timer in incoming/outgoing calls.
DTMFReceived/sent DTMF frames.
QUELCHReceived QUELCH frames.
UNQUELCHReceived UNQUELCH frames
LOST-JITTERDiscarded voice packets coming from CTIR because timestamping.
LOST-NOBUFIN - discarded voice packets coming from UDP because buffers full. OUT - discarded voice packets coming from CTIR because buffers full.
OUTSEQ-FULLOut of Sequence full frames.
OUTSEQ-MINIOut of Sequence mini frames.
UNSUPPORTEDReceived/sent UNSUPPORT frames.
TRUNK-OVROutgoing Meta Trunks overflows.
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.

IAX channel statistic:

CHChannel Identifier.
CallIdCall identifier.
STState of the Channel.
CGThe Calling Number of the Call.
CDThe Called Number of the Call.
VOICE-FRMReceived/sent voice frames.
OUTSEQ-FULLOut of Sequence full frames.
OUTSEQ-MINIOut of Sequence mini frames.
LOSTReceived voice frames minus expected ones.
LOST-JITTERDiscarded voice packets coming from CTIR because timestamping.
LOST-NOBUFDiscarded voice packets coming from CTIR because buffers full.

60.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.