Multimedia Service Support and Session Management 鍾國麟 2003-9-31 1 1
Agenda Introduction What is Session? Definition Functions Why need Session Management 2G,Internet,3G SIP Basic Operation User Location Characteristics SIP in Use SIP in 3G 2 2
Introduction 3G network support multimedia applications and Virtual Home Environment. 讓不同的多媒體傳輸 不同的應用程式可以使用一種溝通協定 找到人比找到裝置更重要 ( 如 ICQ,MSN) 3 未來的 3G 網路能支援更多源化的多媒體軟體 應用, 並且有 VHE 的概念, 無論是漫遊到那種網路或是更換何種裝置, 都能有相同的服務 (Profile,preferences,data 會跟人移動 )( 就像在家一樣 ) VHE 的例子, 比如使用遠傳的手機, 按 222 可以聽簡訊, 可是今天手機可能漫遊到中華電信, 甚至到美國去了, 你撥了 222, 還是可以聽到簡訊 不會因為換了基地台而改變服務 3
What is session Multimedia communication A video-telephony call Message(IMS, MMS) Internet Browser web page 任何影像 聲音 文字建立的連線 A session is a series of meaningful communications between two or more end points. 4 4
Functions of session management protocols Session-layer(signalling) protocols are used for creating,modifying,monitoring, and terminating sessions with one or more participants. 建立連線時需要做到那些事? Voice/Video codec Sampling rate Data compression Error coding IP/TCP/UDP 5 一個 session 信令控制協定, 在建立 session 時會做到下列這些. 5
The key functions Locating the parties to be involved in the session Negotiating the characteristics of the session Modifying the session Closing the session Session management Control plane -> SIP Data plane -> RTP/RTCP 6 一個良好的 session management 協定, 除了能找到對方建立 終止一個 session, 並且能依當時的裝置 頻寬 QoS 去改變 / 選擇 / 提供多媒體 使用的資源 6
Session management within 2G Circuit-switched telephony network 提供語音功能資料的 encoding 方式 data rate 已事先定義好 PSTN 64kbit/s and 2G 14kbit/s Session management and QoS are tightly integrated with in the application and network. 2.5G GPRS Users set up a PDP context and connect to their ISP. Web,email No real time multimedia 7 即使人們常常在使用多媒體, 但 session 的管理仍然未被重視, 在 2g 的網路中, 因為頻寬 規格都已定義好,QoS 也事先定義好, 幾乎不需要 session management 7
Session management within the Internet Mail / Web 使用 DNS 找到對方位置 使用 TCP 傳遞資料 使用 MIME type 描述資料格式 (Web) But no negotiation of session. User cannot choose a gif over a jpeg 8 Session location : 使用 dns 8
Session Management for Future Application 選擇權在 user 手上一種溝通協定可以被不同應用程式重複利用 找到人比找到裝置更重要 ( 如 ICQ,MSN) 9 3G NETWORK 希望未來的 session management 可以操縱在 user 手上, 或是裝置上, 同時希望不同的應用程式都可以使用相同的協定 例始 : 我用 pda 來講電話的時候, 希望可以有 video 功能, 但是換成小營幕講話的時候,video 就不需要了 在技術上 session management 在 3g 中還需要處理連接 pstn 或是 ip 等異質網路的問題, 當然也包含其他服務 9
About Session Initiation Protocol SIP is an application-layer control protocol that can establish, modify and terminate multimedia sessions or Internet telephony calls. Proposed standard from the IETF : RFC2543, RFC3261 SIP usually uses Session Description Protocol (SDP) for media description. (SDP:RFC2327) Text-based Encoding Based on a client-server architecture. Request/Response transaction model Transport Independence TCP,UDP 10 10
通訊 ( 控制信號, 語音資料 ) 台語, 國語 英語, 台語 台語 11 11
SIP Basic Call Flow User Agent Client (Caller) Server (Callee) User Agent INVITE 100: Trying 180: Ringing 200: OK ACK RTP BYE 12 200: OK 12
INVITE 內容 SIP INVITE sip:bob@ccu.edu.tw SIP/2.0 From:sip:alice@office.tw To:sip:oocat@ccu.edu.tw Call-ID: 1234567@office.tw Cseq: 1 INVITE Subject: happy new year Contact: alice lin <sip:alice@office.tw> Content-type: application/sdp Content-Length: 160 SDP 13 V=0 O=clive 4534593492 3284729843 IN IP4 ccu.edu.tw s=session SDP C= IN IP4 140.123.113.60 M=audio 9160 RTP/AVP 0 A=rtpmap:0 PCMU/8000 13
Caller 發出 INVITE Request 給 Callee 端 ( 建立 session) INVITE 訊息包含 SDP 媒體描述語言. Callee 如果接受此 INVITE, 會回應 200:0K 訊息, 包含 Callee 端的 SDP. 如果 Callee 端不支援 Caller 要求的媒體功能 ( 如無法使用 video 或是 audio 的 codec 不支援 ), 但是有其他功能可以使用 ( 其他的 codec, 簡訊等 ), 會回覆在 OK 訊息內 14 14
Client (Caller) Server (Callee) User Agent Client INVITE SDP: 國語 200: OK SDP: 國語 ACK User Agent Server RTP 15 15
Client (Caller) Server (Callee) INVITE SDP: 國語,Video 200: OK SDP: 台語, 日語, 電子白版 CANCAL INVITE SDP: 台語 16 16
Request Methods (Main message types) INVITE The user is begin invited to participate in a session.( 建立 session) ACK The client has received a final response to an INVITE. OPTIONS The server is begin queried as to its capabilities.( 查詢能力 ) BYE The user wishes to release the call. CANCEL It cancels a pending request (not completed request). REGISTER It conveys the user s location information to a SIP server.( 註冊 ) 17 17
SIP Response Code Classes CLASS Description 1xx Provisional response : Informational 2xx Success:Request has completed successfully 3xx Redirection:Request should be tried at another location 4xx Client-Error:Bad request.. 5xx 6xx Server-Error Global-Failure: busy. 18 18
SIP and User Location Proxy Servers. Location Servers. Registration Servers. Redirect Servers. SIP Universal Resource Locators (URL) SIP URI : user@host Example: sip:alice@ccu.edu.tw Sip: 23939889@pizza.tw 19 SIP 使用 SIP URI 來 identify 使用者, 因此需要一個 location database 來存放 ip 對 sip url 的資料 以發 register server 讓 user agent 一開機時就能註冊, 同使打電話時, 需要一個 proxy server 幫 user agent 轉換 sip 訊息 查詢 dns 等工作 而 redirect 則是當對方移動時可以通知 user agent 或是 proxy 其最新的位置. 19
SIP Architecture request response non-sip protocol SIP Redirect Server Query Location Server Resp SIP Proxy SIP Proxy SIP Proxy RTP SIP User Agent (Caller) 20 SIP User Agent (Callee) 20
SIP Registration Oocat@ccu.edu.tw SIP Registrar (domain: ccu.edu.tw) Location Server 1 Register 4 200 OK 2 Update(non-SIP) 3 Response(non-SIP) 21 REGISTER sip:oocat@ccu.edu.tw SIP/2.0 From:sip:oocat@ccu.edu.tw To:sip:oocat@ccu.edu.tw Contact:<sip:140.123.1.100> Expires:3600 RFC 沒規範 SIP Register server 到 location server 之間的訊息如何傳遞 21
Location database UserB Home REGISTER sip:userb@domainname.com SIP Registrar UserB Office 22 使用者到不同環境, 或是使用不同的裝置, 都可以用相同的 sip url 註冊 22
Location database UserB Home INVITE sip:userb@domainname.com User A INVITE sip:userb@domainname.com SIP Proxy UserB Office 23 這樣其他人打電話進來, 經過 proxy 像 location server 查詢對方真正的位置, 就可以找到對方了 23
SIP Redirect mode SIP Caller SIP Redirect Server Location Server SIP Callee INVITE sip:callee@office.com 302 Moved Temporarily Contact: Callee@home.com Callee 的現在位址 ACK INVITE sip:callee@home.com SIP/2.0 200 OK 24. SIP Redirect 通常是要呼叫的人已經離開這個 proxy 網域, 會回一個 302 的訊息給打電話的人, 並且告訢他 callee 正確的位置 當然也可能是 proxy 會負責幫忙 forward sip message 到 callee 那, 端看系統如何設計 24
SIP Mobility Support: Roaming Users Personal mobility Service mobility 25 Sip 也支援 mobility 25
Roaming Users Logging into different IP networks away from home Basic Steps: 1. Get an IP address Use DHCP 2. Register with local proxy For firewall transversal for UDP (Option) 3. Register with home Registrar For calls routing 26 當一個 UA 到了一個新的區域, 會由當地的 DHCP 取得新的 IP, 並且像 HOME register server 註冊現在的位置, 當然也可以這個 register message 會經過當地的 proxy 轉送, 因此當地的 proxy 會做一些防火牆的工作 26
SIP Mobility Remote registration MN 166.1.2.3 Move 166.4.5.6 台大 中正 (home) From:me@CCU.EDU Contact:166.1.2.3 From:me@CCU.EDU Contact:166.4.5.6 INVITE From:me@CCU.EDU Contact:me@ntu INVITE INVITE 27 假設一個 MN 漫遊到台大, 得到一個 163.1.2.3 的 IP, REGISTER MESSAGE 會經由台大的 PROXY.. 在回到中正的 proxy 中正的 proxy 只要知道 MN 現在在台大 就可以了 如果 MN 一直在台大內移動, 換了 IP 還是在台大的 Proxy 服務範圍內, 則 REGISTER 訊息不會回傳到 Home. 當有 INVITE 訊息 CALL IN 時, 中正的 PROXY 只要負責轉送給台大 PROXY 台大 proxy 會負責找到 MN 27
Midcall mobility MEDIA Re INVITE(SDP: 新的 IP 位址 ) OK ACK MEDIA 28 這是在講電話當中,MN 換了位置, 會發一個 RE-INVITE 訊息給對方, 告之對方換 IP 了 但是中斷的問題?? 28
Personal mobility 人除了會移動之外, 還會因為所處環境的不同選擇不同的工具進行通訊 Switch between PDA, cell phone, PC, Ethernet phone,.. Several generic address, one person, many terminals. 29 應用 : 手機玩 game 現到一半, 剛好你走到 office, 可以換到桌上型電腦繼續玩 29
Personal mobility Tel:+1-123-456@com.com Tel:+1-654-321@mobile.com Men@sip.com.com Men@wireless.com Men@sip.com2.com sip.com.com sip.com2.com Men@pdanet.com Men@com.com 30 在不同時候, 選擇使用不用工具, 甚至一個工具也可能有二個以上的電話號碼. 30
Service Mobility What services? 電話簿 好友名單以及 Preference 語音信箱 MMS. 娛樂 購物 金融服務. 只要是你在平常會使用到的服務都有可能 有些服務只有當你出門在外到處移動才會需要 如 : 導航 以及還沒有人想到的服務! 31 換到 pda 打電話, 好友名單 電話簿是否可以跟著轉移? 31
Characteristics of SIP Simplicity Generic Session Description SDP Modularity and extensibility Programmability Integration with other IP component technologies Scalability and robustness 32 簡單, 通用的媒體描述語言 SDP 等 32
SIP in Use Connecting IP and Telephony SIP 與 PSTN 電話連線 Voice packets <-> PCM 64kbit/s stream SIP messages <-> SS7 messages E.164 number ( 電話號碼 ) 33 33
34 34
SIP Supported Services 所有訊息經過 SIP Proxy 都可以控制 Third-party call control Time-dependent routing Person-dependent routing Media-dependent routing Calling-name delivery Finding a party Call sip:chess@bt.com Other? 35 35
36 36
SIP in 3G network Internet Multimedia core network subsystem 37 37
(SIP Proxy) (SIP Proxy) (SIP Proxy) MGC 38 (IP Multimedia Core Network) CSCF 看做 SIP Proxy, 只是在 3g 網路中, 更細分功能 38
CSCF: call state control function P-CSCF: Proxy CSCF 服務於漫遊區 (Visited domain) 接受, 傳送 SIP UA 的訊息依據 SIP URI 尋找相關網域, 並將呼叫 / 註冊訊息傳遞至該網域 I-CSCF 負責與 UE 之間的安全連線,QoS, SIP message compression/decompression Emergency call to local S-CSCF ( 如 119) MN 可由 DHCP 找到 P-CSCF, 爾後所有 SIP 訊息都由 P-CSCF 轉發給 S-CSCF 39 39
I-CSCF: Interrogating-CSCF 為 home domain 的入口, 通常也是 Firewall 為每個 SIP 訊息找到相對應 S-CSCF 根據查尋 HSS 中的用户屬性來確定是由那個 S-CSCF 為該用戶服務, 可能有多個 S-CSCF 來分擔負載 在 P-CSCF 和 S-CSCF 之間傳遞 SIP 訊息還可以提供 P-CSCF/S- CSCF 之間的安全驗證功能 40 40
S-CSCF: Serving-CSCF 具有 SIP Registrar 和 SIP Proxy 功能接受用戶註冊, 進行 URI 分析, 路由 SIP Message, 儲存狀態與 Application server 溝通, 觸發相關業務接收本地與漫游用戶註冊保存由 HSS(HLR) 下載的臨時用戶資料尋找下一個 I-CSCF ( 如果被呼叫端在另一個網域 ) HSS : Home Subscriber Server 用戶身份 號碼 位址 Profile(service,information ) 41 41
MN(User Agent) 註冊 ( 經由 Proxy CSCF) Proxy-CSCF 找到相關的 Home Domain, 並傳送註冊訊息給 Interrogating-CSCF I-CSCF 由 HSS(Home Subscriber Server) 中選擇 Serving-CSCF 服務 MN 42 42
43 43
Call model in roaming case 44 44
45 45
SIP with ENUM PSTN to SIP phone 1. ENUM Query ENUM DNS SCP SSP 2. NAPTR RR 3. DNS Query DNS 4. A RR 5. Invite 6. Invite 7. 320, Move.. Softswitch SIP proxy 8. Ack STP 9. Invite Redirect PSTN Media Gateway SIP proxy 10. Invite CALL : 23939889 46 Sip:pizza@1.2.3.4 46
References SIP: Session Initiation Protocol,IETF RFC 3261 3GPP Release 5, TS 24.228 Session Initiation Protocol in 3G,Tuomo Sipila, Nokia Research Center,Helsinki,Finland SIP in 3G Networks,Paulius Meskauskas,Internet Protocols for Mobile Computing Department of Computer Science University of Helsinki ENUM:http://www.enum.org.tw/ SIP_Phone 軟體下載 http://www.iptel.org/info/products/sipphones.php 47 47