Docstoc

Lab1 RTP

Document Sample
Lab1 RTP Powered By Docstoc
					VoIP Lab1
   RTP
3/11/2009




            1
                         Lab1
• Goal:
  – Finish a RTP program
• Requirement:
  – Get the program working
  – Modify the program to support port assigning
• Task:
  – Trace and modify the code of SimRTP
• Demo:
  – 3/25/2009(Wed.) 17:30 ~ 21:00 in Lab 118 and hand
    in your report (one page)
  – The report should includes the modifications you have
    made, and if there's problem you've met.

                                                            2
               cclRTP (from ITRI)
• There are three major components in cclRTP library
   – 處理RTP的傳送與接收
      • cclRtp.h, cclRtp.c, rtp.h, rtp.c
   – 處理聲音的輸出入
      • WavInOut.h, WavInOut.c
   – 將RTP與聲音的輸出入結合,並建立到對方的
     RTP連線
      • SimRTPDlg.h, SimRTPDlg.c




                                                       3
               Program flow
• 程式一開始執行的時候,會先執行在SimRTPDlg.c中的
  CSimRTPDlg::CSimRTPDlg,在這裡先初始化cclRTP與WavIOObj,並開啟
  RTP port。
• 當使用者按下“連線”按鍵後,程式會呼叫OnOK function,在這裡先
  關閉WavIO,再呼叫RTP連線,並指定target ip與port。
• 指定好target ip與port之後,程式會先把buffer清掉,之後再開啟WavIO,
  並開始錄放聲音。




                                                4
                   Experiment Steps
• Download lab documents here:
   – http://voip.csie.nctu.edu.tw/main/main.html 課程資訊
   – Note: You may need Visual C++ 6.0 or Up to use the project file.
   – DON’T USE THE EXPRESS EDITION, for it does not include MFC
1. CSimRTPDlg::CSimRTPDlg程序中加入cclRTPStartup(2), 做RTP的一
   些物件初始化並設定最大channel數為2
2. 設定完WavIOObj之後以RTPOpenPort()開啟RTP port
3. 在void CSimRTPDlg::OnOK()中先把WavIO關閉, 再加入
   RTPPeerConnect(ConnectIP,ConnectPort)將RTP連線到對方電腦,其
   IP為ConnectIP, port為ConnectPort(這裡內定為9000)
4. 之後開啟聲音的IO,即可以開始傳送RTP

  Note: You may need 2 PCs and 2 IPs

                                                                        5
                Requirement
• The original program will run like this:




• Please add “target port” and “local port”, so
  user can use user-defined port



                                                  6
                  reference
• VoIP BBS board
  – telnet://bs2.to
  – Board csie.c.voip
• Code and Document download
  – http://voip.csie.nctu.edu.tw/




                                    7
• cclrtp.c
• SimRTPDlg.h
• SimRTPDlg.cpp




                  8

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:0
posted:1/22/2013
language:Latin
pages:8