SIP Introduction and Packet Analysis 97598050 Outline SIP

  • Slides: 25
Download presentation
SIP Introduction and Packet Analysis 97598050 王謙志

SIP Introduction and Packet Analysis 97598050 王謙志

Outline �SIP Introduction �Call Flow � Point to Point Flow � Transfer Flow �

Outline �SIP Introduction �Call Flow � Point to Point Flow � Transfer Flow � Conference Flow � Exception �How to use JPcap �Future Work �Reference

SIP Introduction �Session Initiation Protocol,透過IP封包來完成多媒體通 訊訊號的控制。第一個被提議的標準版本在RFC 2543 中定義。在RFC 3261中對這個協議有更深入的解釋。 �由五個元件組成,User Agent、Proxy Server、Redirect Server、Registrar、Location Server。

SIP Introduction �Session Initiation Protocol,透過IP封包來完成多媒體通 訊訊號的控制。第一個被提議的標準版本在RFC 2543 中定義。在RFC 3261中對這個協議有更深入的解釋。 �由五個元件組成,User Agent、Proxy Server、Redirect Server、Registrar、Location Server。

SIP Architecture

SIP Architecture

程式設計環境: SIPRMA Proxy Server、 Redirect Server、 Registrar、 Location Server。

程式設計環境: SIPRMA Proxy Server、 Redirect Server、 Registrar、 Location Server。

Request methods Request name Description INVITE Indicates a client is being invited to participate

Request methods 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.

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.

Response codes Response Messages Type Description 1 xx Informational Responses:request received, continuing to process

Response codes Response Messages Type Description 1 xx Informational Responses:request received, continuing to process the request. ex. 180 Ringing、100 Trying 2 xx Successful Responses:action was successfully received, understood, and accepted. ex. 200 OK、202 Accepted 3 xx Redirection Responses:further action needs to be taken in order to complete the request. ex. 302 Moved Temporarily 4 xx Request Failure Responses:the request contains bad syntax or cannot be fulfilled at this server. ex. 404 Not Found、407 Proxy Authentication Required 5 xx Server Failure Responses:the server failed to fulfill an apparently valid request. ex. 503 Service Unavailable 6 xx Global Failures Responses:the request cannot be fulfilled at any server. ex. 600 Busy Everywhere

Point to Point Call

Point to Point Call

INVITE Request

INVITE Request

200 OK Response � 200 OK可以用來回應如:INVITE、REGISTER、BYE 等Request method。 �CSeq: INVITE Request 200 OK

200 OK Response � 200 OK可以用來回應如:INVITE、REGISTER、BYE 等Request method。 �CSeq: INVITE Request 200 OK

BYE Request

BYE Request

Transfer Call

Transfer Call

Transfer Call �REFER Request

Transfer Call �REFER Request

Conference Call �目前沒有Conference這項功能的Request method。 �由Conference發起人送出INVITE去邀請另一個人加入。 �若是發起人掛斷電話,則Conference結束。

Conference Call �目前沒有Conference這項功能的Request method。 �由Conference發起人送出INVITE去邀請另一個人加入。 �若是發起人掛斷電話,則Conference結束。

Conference call flow

Conference call flow

201 202 203

201 202 203

Exception:CANCEL Request

Exception:CANCEL Request

CANCEL Request

CANCEL Request

486 Busy Here Response

486 Busy Here Response

486 Busy Here Response

486 Busy Here Response

How to use JPcap �JAVA本身的API並不能抓取到底層的網路數據,JPcap 乃是一種提供Windows或Unix系統進行捕捉或發送封 包的Java API。 �Jpcap. Captor Jpcap = Jpcap. Captor.

How to use JPcap �JAVA本身的API並不能抓取到底層的網路數據,JPcap 乃是一種提供Windows或Unix系統進行捕捉或發送封 包的Java API。 �Jpcap. Captor Jpcap = Jpcap. Captor. open. Device():設 定網路卡。 �Jpcap. Captor jpcap. process. Packet():裝取封包,抓到 後將封包丟至Packet. Receiver。 �到Packet. Receiver裡的void receive. Packet(Packet packet) function去處理抓到的封包。

Reference �RFC 3261 �RFC 3515 �馬兆緯,” JPANDDR: 網路協定分析、診斷、與資料重 組系統之研製”,國立台北科技大學 資訊 程所,July 2007 �http: //netresearch.

Reference �RFC 3261 �RFC 3515 �馬兆緯,” JPANDDR: 網路協定分析、診斷、與資料重 組系統之研製”,國立台北科技大學 資訊 程所,July 2007 �http: //netresearch. ics. uci. edu/kfujii/jpcap/doc/index. html, JPcap �http: //en. wikipedia. org/wiki/Session_Initiation_Proto col, Session Initiation Protocol - Wikipedia, the free encyclopedia

Thanks for your attention

Thanks for your attention