VoIP系統設計與SIP server實務.ppt
文本预览下载声明
loadmodule /usr/local/lib/ser/modules/mysql.so“ loadmodule /usr/local/lib/ser/modules/auth.so loadmodule /usr/local/lib/ser/modules/auth_db.so“ modparam(usrloc, db_mode, 2) modparam(auth_db, calculate_ha1, yes) modparam(auth_db, password_column, password) www_authorize(, subscriber) www_challenge(, 0) Reg auth A send “REGISTER” to P P send “401 Unauthorized” to A (407 Proxy Authentication Required) A send “REGISTER” to P with Authorization information P send “200 OK” to A Enable call auth with SER Copy the reg auth settings Modify it if (method==INVITE) { if (!www_authorize(, subscriber)) { www_challenge(, 0); break; }; }; Call auth A send “INVITE” to P P send “401 Unauthorized” to A A send “ACK” to P A send “INVITE” to P with Authorization information P send “INVITE” to B B send “180 Ringing” to P P send “180 Ringing” to A B send “200 OK” to P P send “200 OK” to A A send “ACK” to B Media connection between A and B B send “BYE” to P P send “BYE” to A A send “200 OK” to P P send “200 OK” to B 實地演練 練習將SJPhone和X-Lite都註冊到SER, 由SJPhone打給X-Lite, 啟動Ethereal抓取封包, 然後檢視封包內容 請比較no auth, reg auth和call auth之間行為的差異性 Quiz What should I fill the address of “From”, “To”, and “Contact” fields? Should it be local address, NAT’s address, or proxy server’s address? 大綱 SIP Registration Registration Registration Update Contact List Request UnRegistration Unsuccessful Registration SIP Registration 這個部分我們使用X-Lite and SER, 直接擷取封包 請更改X-Lite的Advanced System Settings / SIP Settings, 設定Reregister Proxy = 180 Registration:正常執行SER, 然後開啟X-Lite(假設已經設定完成)就可以擷取到註冊封包 Registration Update:我們前面設定了Expire Time = 180 sec, 所以等待3分鐘後就可以擷取到重新註冊封包 Contact List Request:X-Lite於正常執行狀態, 更改X-Lite向SIP server註冊的帳號及密碼即可擷取到新的註冊封包 UnRegistration:關閉X-Lite, 即可擷取到解除註冊的封包 Unsuccessful Registration:把X-Lite向SIP server註冊的帳號及密碼故意填錯, 可以擷取到註冊失敗的封包 大綱 SIP Call Call Establishment Through Two Proxies No Answer Busy No Response Temporarily Unavailable SIP Call 這個部分我們使用SJPhone, X-Lite and SER, 直接擷取封包 請將前面更改X-Lite的設定改回來(Advan
显示全部