sip introduction and packet analysis
DESCRIPTION
SIP Introduction and Packet Analysis. 97598050 王謙志. Outline. SIP Introduction Call Flow Point to Point Flow Transfer Flow Conference Flow Exception How to use JPcap Future Work Reference. SIP Introduction. - PowerPoint PPT PresentationTRANSCRIPT
SIP IntroductionCall Flow
Point to Point FlowTransfer FlowConference FlowException
How to use JPcapFuture WorkReference
Outline
Session Initiation Protocol ,透過 IP 封包來完成多媒體通訊訊號的控制。第一個被提議的標準版本在 RFC 2543 中定義。在 RFC 3261 中對這個協議有更深入的解釋。
由五個元件組成, User Agent 、 Proxy Server 、 Redirect Server 、 Registrar 、 Location Server 。
SIP Introduction
Request name Description
INVITE Indicates a client is being invited to participate in a call session.
ACK Confirms that the client has received a final response to an INVITE request.
BYE Terminates a call and can be sent by either the caller or the callee.
CANCEL Cancels any pending request.OPTIONS Queries the capabilities of servers.
REGISTER Registers the address listed in the To header field with a SIP server.
PRACK Provisional acknowledgement.
SUBSCRIBE Subscribes for an Event of Notification from the Notifier.
NOTIFY Notify the subscriber of a new Event.PUBLISH publishes an event to the Server.
INFO Sends mid-session information that does not modify the session state.
Request methods
Request name Description
REFER Asks recipient to issue SIP request (call transfer.)(RFC 3515)
MESSAGE Transports instant messages using SIP.
UPDATE Modifies the state of a session without changing the state of the dialog.
Request methods
Response codesResponse
Messages Type Description
1xxInformational Responses : request received,
continuing to process the request.ex. 180 Ringing 、 100 Trying
2xxSuccessful Responses : action was successfully
received, understood, and accepted.ex. 200 OK 、 202 Accepted
3xxRedirection Responses : further action needs to be
taken in order to complete the request.ex. 302 Moved Temporarily
4xx
Request Failure Responses : the request contains bad syntax or cannot be fulfilled at this server.
ex. 404 Not Found 、 407 Proxy Authentication Required
5xxServer Failure Responses : the server failed to
fulfill an apparently valid request.ex. 503 Service Unavailable
6xxGlobal Failures Responses : the request cannot be
fulfilled at any server. ex. 600 Busy Everywhere
200 OK 可以用來回應如:INVITE 、 REGISTER 、 BYE 等 Request method 。
CSeq :
200 OK Response
INVITE Request
200 OK
目前沒有 Conference 這項功能的 Request method 。
由 Conference 發起人送出 INVITE 去邀請另一個人加入。若是發起人掛斷電話,則 Conference 結束。
Conference Call
JAVA 本身的 API 並不能抓取到底層的網路數據, JPcap 乃是一種提供 Windows 或 Unix 系統進行捕捉或發送封包的 Java API 。JpcapCaptor Jpcap =
JpcapCaptor.openDevice() :設定網路卡。JpcapCaptor jpcap.processPacket() :裝取封包,抓到後將封包丟至 PacketReceiver 。到 PacketReceiver 裡的 void
receivePacket(Packet packet) function 去處理抓到的封包。
How to use JPcap
RFC 3261RFC 3515馬兆緯,” JPANDDR: 網路協定分析、診斷、與資料重組系統之研製”,國立台北科技大學 資訊工程所, July 2007http://netresearch.ics.uci.edu/kfujii/jpcap/doc/index.html,
JPcaphttp://
en.wikipedia.org/wiki/Session_Initiation_Protocol, Session Initiation Protocol - Wikipedia, the free encyclopedia
Reference