530 likes | 1.21k Views
SIP Call Flow. Speaker: Hz-Ping Huang; Huan-Yao Kang Date: 2007.10.24. Outline. Observation of Call Flow SIP Registration SIP Call. Observation of Call Flow. SIP Registration. Registration Registration Update Contact List Request Un-Registration Unsuccessful Registration.
E N D
SIPCall Flow Speaker: Hz-PingHuang; Huan-Yao Kang Date: 2007.10.24
Outline • Observation of Call Flow • SIP Registration • SIP Call
SIP Registration • Registration • Registration Update • Contact List Request • Un-Registration • Unsuccessful Registration
SIP Call • Call Establishment • Through Two Proxy • No Answer • Busy • No Response • Temporarily
正常執行SER,開啟Ethereal,接著開啟舊版X-Lite(假設已經設定完成)就可以擷取到註冊封包,如下圖:正常執行SER,開啟Ethereal,接著開啟舊版X-Lite(假設已經設定完成)就可以擷取到註冊封包,如下圖: Registration SIP Server UA REGISTER 0 Bindings 401 Unauthorized REGISTER 200 OK 1 Bindings
Bindings • O Bindings代表不帶Contact header的封包。 • 1 Bindings代表帶Contact header的封包。 Un-Register 0 bindings no contact Register 1 bindings contact
Registration Update (1/3) • 在正常X-Lite and SER 已開啟情形下: • 每隔180sec會重新要求REGISTER一次
Registration Update (2/3) SIP Server UA 180 sec REGISTER 401 Unauthorized 0 Bindings REGISTER 200 OK 1 Bindings 180 sec . . .
SIP Registration(3/3) • 這個部分我們使用 X-Lite and SER, 直接擷取封包 • 請更改X-Lite的Advanced System Settings / SIP Settings, 設定Reregister Proxy = 180
Contact List Request (1/2) • 進入System settings/ SIP Proxy/Default • 設定 • Display Name:2000 • Username:2000 • Authorization User:2000 • Password:2000
Contact List Request (2/2) SIP Server UA REGISTER 0 Bindings 401 Unauthorized REGISTER 200 OK 1 Bindings
Un-Registration(1/2) • 關閉X-Lite,可擷取到解除註冊的封包
Un-Registration(2/2) SIP Server UA REGISTER 0 Bindings 401 Unauthorized REGISTER 200 OK 0 Bindings Un-Register 0 bindings no contact Register 1 bindings contact
Difference • Contact List Request(轉換Number使用) • 新版X-Lite • 有做下線的動作(Expires=0) • 舊版X-Lite • 沒有下線的動作,直接要求註冊 • Un-Registration(關閉X-Lite) • 新版X-Lite • 只需做兩個動作(封包有夾帶認證資訊) • 舊版X-Lite • 需要做四個動作(沒有夾帶認證資訊,所以需重覆夾帶一次)
Unsuccessful Registration(1/2) • 把X-Lite向SIP server註冊的帳號及密碼故意填錯,可以擷取到註冊失敗的封包。 • 每20秒會傳送一次(default=20) • 進入System settings/ SIP Proxy/Default • 設定(隨便填) • Display Name • Username • Authorization User • Password
Unsuccessful Registration(2/2) SIP Server UA REGISTER 0 Bindings 401 Unauthorized REGISTER 401 Unauthorized 0 Bindings
SIP Server Architecture 192.168.1.3:5060 1000/1000pwd 2000/2000pwd
Request: REGISTER 401:Unauthorized Request: REGISTER 200 OK REGISTER – X-LITE SIP Proxy X-lite
Request: REGISTER Request: REGISTER Request: REGISTER 401:Unauthorized 401:Unauthorized 401:Unauthorized Register Unsuccessful SIP Proxy X-lite
Request: REGISTER 200 OK Unregister SIP Proxy X-lite
Request: REGISTER 401:Unauthorized Request: REGISTER 200 OK Register – SJPHONE SIP Proxy X-lite
INVITE ACK ACK INVITE 100 trying 100 trying 200 OK 200 OK 180 Ring 180 Ring X-LITE CALL SJPHONECall Establishment X-LITE SIP PROXY SJPHONE
BYE BYE 200 OK 200 OK X-LITE HANG UP X-LITE SIP PROXY SJPHONE
INVITE INVITE 100 trying 100 trying 183 183 183 183 180 Ring 180 Ring X-LITE CALL SJPHONENo Answer . . . X-LITE SIP PROXY SJPHONE
INVITE ACK CANCEL INVITE ACK INVITE 408 Request timeout 180 Ring 200 OK 180 Ring 487 Request Term. 100 trying 100 trying 180 Ring X-LITE CALL SJPHONENo Answer (New SJphone call Old X-lite) . . . SJPHONE SIP PROXY X-LITE SJPHONE SIP PROXY X-LITE
INVITE INVITE ACK ACK 100 trying 100 trying 486 Busy 486 Busy 180 Ring 180 Ring X-LITE CALL SJPHONEIgnore X-LITE SIP PROXY SJPHONE
CANCEL INVITE ACK INVITE ACK CANCEL 180 Ring 100 trying 100 trying 180 Ring 200 OK 487 Request term. 487 200 canceling X-LITE CALL SJPHONECancel X-LITE SIP PROXY SJPHONE
INVITE INVITE ACK 100 trying 408 Request timeout X-LITE CALL SJPHONENo Responsible X-LITE SIP PROXY SJPHONE
INVITE 404 not found X-LITE CALL SJPHONE Temporarily Unavailable X-LITE SIP PROXY SJPHONE
SIP CALL THROUGH 2 PROXIES PROXY 5060 PROXY 5061 192.168.1.3 REGISTER REGISTER 192.168.1.1 1000 (PORT=50600) 2000 (PORT=5060)
CONFIGURE • Configure a new ser.cfg • cp /usr/local/etc/ser/ser.cfg \/usr/local/etc/ser/ser1.cfg; • Edit /usr/local/etc/ser/ser1.cfg; • Find “!lookup(“location”) • Add a new line with the contentrewritehostport(“<IP>:<port>”); • Comment the next 2 lines. • Save and exit your text editor.
CONFIGURE (cont.) • Execute the ser with default conf. file. • ser • Execute the ser with modified conf. file. • ser –f <your configure file>; • Check your ser proxies is in running & listening. • ps aux |grep ser; • netstat –ntdl;
INVITE INVITE 100 TRYING 100 TRYING 180 RINGING 180 RINGING 200 OK 200 OK INVITE 180 RINGING 200 OK SJPHONE CALL X-LITE SJPHONE PROXY 5061 PROXY 5060 X-LITE