Download presentation
Presentation is loading. Please wait.
Published byCameron Kelley Modified over 9 years ago
1
P2P VoIP Speaker : Ching Chen Chang Date: 2007/09/27
2
2 Outline Motivation Related Work P2P Enum GSM 6.10 P2P VoIP beta 1.1 Description Protocol Scenario Update Packages Conclusion Reference
3
3 Motivation SIP Proxy Server SIP UA1 UA2 If we use SIP, we usually need a SIP server to handle the signaling. RTP
4
4 Motivation(2/2) CalleeCaller INVITE 180 Ringing SIP Server ACK INVITE 180 Ringing 200 OK ACK RTP BYE 200 OK
5
5 Related Work P2P Point To Point. Enum Enumeration, a user-defined type of C/C++. GSM 6.10 An audio codec is usually used by the cell phone.
6
6 P2P P2P(Point To Point). A link commonly used to establish a direct connection between two nodes. www.tcgs.tc.edu.tw/~sagit/info/p4.htm
7
7 Enum An enumeration is a user-defined type consisting of a set of named constants called enumerators. #define SPRING 0 #define SUMMER 1 #define FALL 2 #define WINTER 3 enum { SPRING, SUMMER, FALL, WINTER };
8
8 GSM 6.10(1/2) GSM(Global System for Mobile Communications) A lossy CBR(Constant Bit Rate) audio compression codec. GSM is also a popular global mobile phone standard.
9
9 GSM 6.10(2/2) FormatPCMGSM 6.10 Samples per second8000 HZ Bit Rate (bits/second)128kbs13kbs Channelmono Bits per sample161.625
10
10 Description(1/2) P2P Internet Phone. Open Source code. http://phonesnd.com/p2pv11.zip http://phonesnd.com/p2pv11.zip Only work in a local network. It works without SIP and RTP. It defines its own communication protocol. Simultaneous work with maximal 5 clients
11
11 Connect RecordReceive Send Play Call out Encode Decode End call The voice packages are transmitted in a format GSM6.10. Voice packages and service information use one and the same UDP port: 4444. Description(2/2)
12
12 Protocol(1/2) enum _PROTOCOL { _NULL_ = 0,_PROGRAMM_ABORT, _CONTACT_REFRESH,_CONTACT_ERASE, _CONTACT_ADD,_CONTACT_PING, _CONTACT_PING_IN,_CONTACT_PING_OUT, _CONTACT_PONG,_CONTACT_PONG_IN, _CONTACT_PONG_OUT, _CONTACT_OFFLINE,_CONTACT_OFFLINE_IN, _CONTACT_OFFLINE_OUT,_CLIENT_SHEET_SHOW, _CLIENT_SHEET_HIDE,_CLIENT_SHEET_NAME, _CLIENT_SHEET_IMAGEINDEX,_CLIENT_CONNECT_DURATION, _CLIENT_PROTOCOL,_TIME_OUT, CALL_IN_,CALL_OUT_,_I_,_I_180_,_I_200_, _I_480_,_A_,_G_,_G_200_,_G_486_, _C_,_C_200_,_C_480_,_LA_,_LG_, _ERROR_PLAY, };
13
13 Protocol(2/2) _CONTACT_PING 5 10 5 16 _CONTACT_PONG 8 10 8 16 _CONTACT_OFFLINE 11 10 b 16 _I_ 23 10 17 16 _I_180_ 24 10 18 16 _I_200_ 25 10 19 16 _A_ 27 10 1b 16 _C_ 31 10 1f 16 _C_200_ 32 10 20 16 _LA_ 34 10 22 16
14
14 Ping(1/2) User online _CONTACT_PONG _CONTACT_PING _CONTACT_PING_IN _CONTACT_PONG_OUT _CONTACT_PING_OUT _CONTACT_PONG_IN Ping all contacts on the contact list per minute. ……
15
15 Ping(2/2) User offlineUser online _CONTACT_PING _CONTACT_PING_OUT _CONTACT_PING Resend two times if the contact doesn’t respond. …… _CONTACT_PING …… 1 minutes
16
16 Call _I_ _I_180_ _I_200_ CalleeCaller _C_200_ _C_ _A_ _I_180_ _I_200_ _A_ _I_ Voice transmission _C_ _C_200_ state == CALL OUT state == CALL IN
17
17 Cancel _I_ _I_180_ CalleeCaller _C_200_ _C_ _I_180_ _I_ _C_ _C_200_ state == CALL OUT state == CALL IN
18
18 No answer _I_ _I_180_ CalleeCaller _I_180_ _I_ _LA_ If state == CALL IN && receive _LA_ state == CALL OUT state == CALL IN If state == CALL OUT && 6 seconds _LA_ …….… …… If state == CALL OUT && 6 seconds If state == CALL IN && receive _LA_
19
19 Log out User 2 would modify the information of User 1. If two users are on the phone, User 2 would pretend to receive an _C_ protocol to terminate the call. _CONTACT_OFFLINE_IN User 2 User 1 _CONTACT_OFFLINE
20
20 Packages Signaling – 4 bytes of the data contains the protocol. Voice packages – 33 bytes data. The first message of the call has the data including the 4-byte protocol and the caller’s account.
21
21 Update 2 Timers Timer1 (Interval 100ms) Contacts List Clients List Speaker & Microphone Volume Timer2 (Interval 500ms) Ring Start Voice
22
22 Conclusion SIP server can provide more service. P2P would produce less delay.
23
23 Reference Phonesnd - Network&Sound Software http://phonesnd.com/ Audio Compression Manager -- Wave File Compression Codecs Compared http://www.nch.com.au/acm/index.html
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.