Lab 4 TCOM631 Overview Use Asterisk softswitch and X-Lite client to initiate VoIP sessions and capture associated traffic with the Whireshark network protocol analyzer. Objective Configure X-Lite client and initiate SIP based sessions between two endpoints using Asterisk softswitch server. Configure Whireshark network analyzer to capture VoIP traffic during the session initiation and teardown. Analyze captured traffic and protocol behavior. Explore Asterisk internals and capabilities. Write your names here:
Instructions 1) Open X-Lite application 2) Click the right mouse button over the X-Lite window and choose Sip Account Settings... 3) Select first account and click on Properties 4) Go to the Topology tab and define Port used on local computer and check the box Manually Specify Range so you can specify the range between 5060 and 5061 as it is shown. 5) Click Apply to accept these settings. 6) Go to Account tab and specify Display Name and User Name from the the table explained by your instructor. Use IP Address provided by your instructor for Domain and proxy Address configuration and make sure that you check Register with the domain and receive incoming calls checkbox as it is shown in the following diagram.
7) Click OK to accept settings and Close SIP Accounts window. 8) Make sure that you now exit from X-Lite application. 9) Open Whireshark application clicking on the desktop icon. 10) Go to Capture Capture Filters to create new filter that captures Asterisk related traffic. 11) Click on the New button and type asterisk for Filter name and host <IP Address of the Asterisk Server> for Filter string to create new filter. 12) Click OK to accept these settings 13) Go to Capture Interfaces to start the capturing process. (if there is a change from the previous release of Wireshark ask for help)
14) Click the Options button to select the filter you just added. Double click on the Local Area Connection from the list that you want to use for capturing. 15) Now select asterisk filter by selecting Capture Filter button and selecting it. 16) Click Start to start capturing traffic associated with this interface and specified IP address of the softswitch. 17) Based on the given worksheet on the board start placing calls to the other lab stations using the extension numbers (3000, 3001, 3002, 3003, 3004, 3005, ).
18) Click the green Dial button 19) Other end point will indicate incoming call. Answer it and hold the session for 10 seconds before you hang up using the red Hang Up button. 20) Go to Capture Stop to stop the capturing process. Captured data will be available in the opened window. 21) Analyze captured data and answer following questions. Looking into this new section, try to answer to the following questions: Question 1: What was the first SIP message you captured and what is the purpose of this message? Question 2: What IP address is used to send SIP INVITE message? How this differs from the Lab 1 Part A peer to peer call. Question 3: What were the From: and To: fields of SIP INVITE messages? Question 4: When RTP data was sent and received what were the corresponding sources and destination IP addresses? Explain why there are no other addresses but the one of your workstations and the softswitch server. (HINT ask your professor ) Question 5: Who is the originator of the SIP 180 Ringing message and why? Question 6: Are there via headers in SIP INVITE and 200 OK messages, and if yes explain the actual content. What is the purpose of the Via header in SIP signaling?
Question7: What are the three files we covered in the lab intro material that enabled our lab exercises today? Aterisk Specifics: You will first try dialing few extensions (these will be explained during your lab time) and then look into some Asterisk specifics. Dial extension 600 Dial extension 1000 Dial extension 5000 Lets now run asterisk server on your own pc: 1. Open extensions.conf (c:\cygroot\asterisk\etc) file and add these instructions: exten => 1234,1,Answer exten => 1234,2,Wait(2) exten => 1234,3,SayDigits(${CALLERIDNUM}) exten => 1234,4,Wait(2) exten => 1234,5,SayDigits(${CALLERIDNUM}) exten => 1234,6,Wait(2) exten => 1234,7,Goto(internal,3002,1) exten => 1234,8,Hangup just after the exten => 100,3,Hangup() statement (under internal context). The extensions.conf file consists of a number of special keywords, followed by arguments presented in syntax specific to those keywords. It is structured by context, with each context in a specific section. Each context may contain a number of extensions that route calls to specific channels, applications, or other extensions within local or remote dialplans. 2. Start the instance of the Asterisk server on your PC. Go to Start -> Programs -> AsteriskWin32 PBX -> AsteriskWin32 Console. The console will allow you to monitor events and issue server specific commands. 3. Find out what is the IP address of your system using command prompt. 4. Use this IP address to update Domain and Proxy server IP address of your X-Lite sip user. 5. Once registered with your own Asterisk server dial extension 1234. Can you explain the dialing logic? 6. Leave and retrieve voice message for mailbox 3000. 7. Download configuration files we used during Lab #4: http://mason.gmu.edu/~dhrnjez/config_files_for_lab4.zip and try to explain the call logic - Identify and write down administrative extensions used in this setup. - What extension is the voicemail extension only? - How do all these extensions end up?
8. Try typing these Asterisk management commands (use the console window) and explore different options: sip show channels - Show active SIP channels sip show channel - Show detailed SIP channel info (hint: look Call ID) sip show peers - Show defined SIP peers show dialplan - Show dialplan (and look for 3000 etc.) show codecs - Shows codecs show channels - Display information on channels show voicemail users - List defined voicemail boxes and these: reload - Reload configuration remove extension - Remove a specified extension extensions reload - Reload extensions and *only* extensions restart gracefully - Restart Asterisk gracefully reload - Reload configuratio There are many other commands related to different services supported by the Asterisk. Explore those if you are done with your lab.