6.9 IAX2 debug commands | 164
vtsvoffice*CLI> iax2 show netstats
--- LOCAL --- --- REMOTE --- Channel RTT Jit Del Lost % Drop OOO Kpkts Jit Del Lost % Drop OOO Kpkts IAX2/8590-1 16 -1 0 -1 -1 0 -1 1 60 110 3 0 0 0 0
iax2 show channels
vtsvoffice*CLI> iax2 show channels
Channel Peer Username ID (Lo/Rem) Seq (Tx/Rx) Lag Jitter JitBuf Format IAX2/8590-2 8.8.30.43 8590 00002/26968 00004/00003 00000ms -0001ms 0000ms unknow
iax2 show peers
vtsvoffice*CLI> iax2 show peers
Name/Username Host Mask Port Status 8584 (Unspecified) (D) 255.255.255.255 0 UNKNOWN 8564 (Unspecified) (D) 255.255.255.255 0 UNKNOWN 8576 (Unspecified) (D) 255.255.255.255 0 UNKNOWN 8572 (Unspecified) (D) 255.255.255.255 0 UNKNOWN 8571 (Unspecified) (D) 255.255.255.255 0 UNKNOWN 8585 (Unspecified) (D) 255.255.255.255 0 UNKNOWN 8589 (Unspecified) (D) 255.255.255.255 0 UNKNOWN 8590 8.8.30.43 (D) 255.255.255.255 4569 OK (16 ms) 3232 (Unspecified) (D) 255.255.255.255 0 UNKNOWN 9 iax2 peers [1 online, 8 offline, 0 unmonitored]
iax2 debug
Look into this output and identify the beginning and the end of the call. Observe the delay and jitter information obtained using poke and pong packets. Theses packets help to create the output of “iax2 show netstats” command.
vtsvoffice*CLI> iax2 debug IAX2 Debugging Enabled
Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 000 Type: IAX Subclass: REGREQ Timestamp: 00003ms SCall: 26975 DCall: 00000 [8.8.30.43:4569]
USERNAME : 8590 REFRESH : 60
Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 001 Type: IAX Subclass: REGAUTH Timestamp: 00009ms SCall: 00003 DCall: 26975 [8.8.30.43:4569]
AUTHMETHODS : 2
CHALLENGE : 137472844 USERNAME : 8590
Rx-Frame Retry[ No] -- OSeqno: 001 ISeqno: 001 Type: IAX Subclass: REGREQ Timestamp: 00016ms SCall: 26975 DCall: 00003 [8.8.30.43:4569]
USERNAME : 8590 REFRESH : 60
MD5 RESULT : f772b6512e77fa4a44c2f74ef709e873
Tx-Frame Retry[000] -- OSeqno: 001 ISeqno: 002 Type: IAX Subclass: REGACK Timestamp: 00025ms SCall: 00003 DCall: 26975 [8.8.30.43:4569]
USERNAME : 8590
DATE TIME : 2006-04-17 16:03:00 REFRESH : 60
APPARENT ADDRES : IPV4 8.8.30.43:4569 CALLING NUMBER : 4830258590
CALLING NAME : Flavio
Exclusivo para Rachael Davis
Timestamp: 00025ms SCall: 26975 DCall: 00003 [8.8.30.43:4569]
Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 000 Type: IAX Subclass: POKE Timestamp: 00003ms SCall: 00006 DCall: 00000 [8.8.30.43:4569]
Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 001 Type: IAX Subclass: ACK Timestamp: 00003ms SCall: 26976 DCall: 00006 [8.8.30.43:4569]
Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 001 Type: IAX Subclass: PONG Timestamp: 00003ms SCall: 26976 DCall: 00006 [8.8.30.43:4569]
RR_JITTER : 0 RR_LOSS : 0 RR_PKTS : 1 RR_DELAY : 40 RR_DROPPED : 0 RR_OUTOFORDER : 0
Tx-Frame Retry[-01] -- OSeqno: 001 ISeqno: 001 Type: IAX Subclass: ACK Timestamp: 00003ms SCall: 00006 DCall: 26976 [8.8.30.43:4569]
Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 000 Type: IAX Subclass: NEW Timestamp: 00003ms SCall: 26977 DCall: 00000 [8.8.30.43:4569]
VERSION : 2 CALLING NUMBER : 8590 CALLING NAME : 4830258590 FORMAT : 2 CAPABILITY : 1550 USERNAME : 8590 CALLED NUMBER : 8580 DNID : 8580
Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 001 Type: IAX Subclass: AUTHREQ Timestamp: 00007ms SCall: 00004 DCall: 26977 [8.8.30.43:4569]
AUTHMETHODS : 2
CHALLENGE : 190271661 USERNAME : 8590
Rx-Frame Retry[Yes] -- OSeqno: 000 ISeqno: 000 Type: IAX Subclass: NEW Timestamp: 00003ms SCall: 26977 DCall: 00000 [8.8.30.43:4569]
VERSION : 2 CALLING NUMBER : 8590 CALLING NAME : 4830258590 FORMAT : 2 CAPABILITY : 1550 USERNAME : 8590 CALLED NUMBER : 8580 DNID : 8580
Tx-Frame Retry[-01] -- OSeqno: 000 ISeqno: 001 Type: IAX Subclass: ACK Timestamp: 00003ms SCall: 00004 DCall: 26977 [8.8.30.43:4569]
Rx-Frame Retry[ No] -- OSeqno: 001 ISeqno: 001 Type: IAX Subclass: AUTHREP Timestamp: 00063ms SCall: 26977 DCall: 00004 [8.8.30.43:4569]
MD5 RESULT : 57cc5c48affba14106c29439944413a1
Tx-Frame Retry[000] -- OSeqno: 001 ISeqno: 002 Type: IAX Subclass: ACCEPT Timestamp: 00054ms SCall: 00004 DCall: 26977 [8.8.30.43:4569]
FORMAT : 1024
Tx-Frame Retry[000] -- OSeqno: 002 ISeqno: 002 Type: CONTROL Subclass: ANSWER Timestamp: 00057ms SCall: 00004 DCall: 26977 [8.8.30.43:4569]
Tx-Frame Retry[000] -- OSeqno: 003 ISeqno: 002 Type: VOICE Subclass: 138 Timestamp: 00090ms SCall: 00004 DCall: 26977 [8.8.30.43:4569]
Rx-Frame Retry[ No] -- OSeqno: 002 ISeqno: 002 Type: IAX Subclass: ACK Timestamp: 00054ms SCall: 26977 DCall: 00004 [8.8.30.43:4569]
Rx-Frame Retry[ No] -- OSeqno: 002 ISeqno: 003 Type: IAX Subclass: ACK Timestamp: 00057ms SCall: 26977 DCall: 00004 [8.8.30.43:4569]
Rx-Frame Retry[ No] -- OSeqno: 002 ISeqno: 004 Type: IAX Subclass: ACK Timestamp: 00090ms SCall: 26977 DCall: 00004 [8.8.30.43:4569]
Rx-Frame Retry[ No] -- OSeqno: 002 ISeqno: 004 Type: VOICE Subclass: 138 Timestamp: 00210ms SCall: 26977 DCall: 00004 [8.8.30.43:4569]
Tx-Frame Retry[-01] -- OSeqno: 004 ISeqno: 003 Type: IAX Subclass: ACK Timestamp: 00210ms SCall: 00004 DCall: 26977 [8.8.30.43:4569]
Rx-Frame Retry[ No] -- OSeqno: 003 ISeqno: 004 Type: IAX Subclass: PING Timestamp: 02083ms SCall: 26977 DCall: 00004 [8.8.30.43:4569]
Tx-Frame Retry[000] -- OSeqno: 004 ISeqno: 004 Type: IAX Subclass: PONG Timestamp: 02083ms SCall: 00004 DCall: 26977 [8.8.30.43:4569]
6.10 Summary | 166 RR_JITTER : 0 RR_LOSS : 0 RR_PKTS : 1 RR_DELAY : 40 RR_DROPPED : 0 RR_OUTOFORDER : 0
Rx-Frame Retry[ No] -- OSeqno: 004 ISeqno: 005 Type: IAX Subclass: ACK Timestamp: 02083ms SCall: 26977 DCall: 00004 [8.8.30.43:4569]
Rx-Frame Retry[ No] -- OSeqno: 004 ISeqno: 005 Type: IAX Subclass: HANGUP Timestamp: 08693ms SCall: 26977 DCall: 00004 [8.8.30.43:4569]
CAUSE : Dumped Call
To turn off debugging, use:
vtsvoffice*CLI>iax2 no debug
6.10
SUMMARY
In this chapter, we have learned the strengths and weaknesses of the IAX protocol. We demonstrated IAX working in several scenarios, such as soft- phones as well as a trunk between two Asterisk servers. Trunk mode allows you to save bandwidth by carrying more then one call in a single packet. At the end, you learned console commands to check the status and debug the protocol.
6.11
QUESTIONS
1. Two of the main benefits of IAX are bandwidth savings and easier NAT traversal.
a) False b) True
2. IAX protocols use different UDP ports for signaling and media. a) False
b) True
3. The bandwidth used by the IAX protocol is the voice payload and the following headers (Mark all that apply):
a) IP b) UDP c) IAX d) RTP e) cRTP
4. It is important to match the codec payload (20 to 30 ms) with frame synchronization (20ms default) when using trunk mode.
a) False b) True
5. When IAX is used in trunk mode, just one header is used for multiple calls.
a) False b) True
6. IAX is the most used protocol to connect to service providers, because it is easier for Nat traversal.
a) False b) True
7. In an IAX channel as shown below, the option <secret> can be a password or a ____________________.
6.11 Questions | 168
IAX/[<user>[:<secret>]@]<peer>[:<portno>][/<exten>[@<context>][/<options>]]
8. The IAX2 show registry shows information about:
a) Registered users
b) Providers to which Asterisk is connected
9. Jitter buffer sacrifices latency to have a steady flow of voice.
a) True b) False
10. RSA keys can be used for IAX authentication. You have to keep the ___________ key secret and give to your costumers and partners the matching ___________ key.
a) public, private b) private, public c) shared, private d) public, shared
The SIP Protocol
7.1
OBJECTIVES
By the end of this chapter, you will be able to:
Figure 7.1 Objectives