sip based prepaid mechanism based prepaid mechanism sip
play

SIP- -based Prepaid Mechanism based Prepaid Mechanism SIP on NTP - PowerPoint PPT Presentation

LAB 117 & VoIP LAB SIP- -based Prepaid Mechanism based Prepaid Mechanism SIP on NTP VoIP Platform in on NTP VoIP Platform in Taiwan Taiwan 19th APAN Meeting in Bangkok, January 2005 Ines Sok-Ian Sou and Prof. Quincy Wu Dept. of


  1. LAB 117 & VoIP LAB SIP- -based Prepaid Mechanism based Prepaid Mechanism SIP on NTP VoIP Platform in on NTP VoIP Platform in Taiwan Taiwan 19th APAN Meeting in Bangkok, January 2005 Ines Sok-Ian Sou and Prof. Quincy Wu Dept. of Computer Science and Information Engineering National Chiao Tung University, Taiwan {sisou, solomon}@csie.nctu.edu.tw 1

  2. LAB 117 & VoIP LAB Outlines • NTP VoIP Platform • RADIUS Accounting • Prepaid System Architecture • Call Flow • Conclusions & Future Work 2

  3. LAB 117 & VoIP LAB NTP VoIP Platform • Call Server – provides primary capabilities for call-session control. – processes SIP requests and responses as a SIP proxy server. – functions as a registrar that stores the contact information of each SIP user. • PSTN Gateway – interworks between the NTP VoIP Platform and the Public Switched Telephone Network (PSTN), – allows IP phone users to reach PSTN users directly or indirectly through Private Branch Exchanges. • SIP User Agent (UA) – a hardware-based or a software-based SIP phone client that provides basic call functions such as dial, answer, reject, hold/unhold, and call transfer. 3

  4. LAB 117 & VoIP LAB Service Trial • Subscribers can make IP-to-IP or IP-to- PSTN phone calls through this platform. • To control the domestic and long-distance call tolls, it is essential to deploy the appropriate components that collect and process charging information. 4

  5. LAB 117 & VoIP LAB Accounting • Remote Authentication Dial In User Service (RADIUS) is the common protocol adopted in accounting systems in NTP VoIP Platform. • A RADIUS client sends user connection information or accounting information in a RADIUS message to a RADIUS server. • A RADIUS server authenticates and authorizes the RADIUS client request, and sends back a RADIUS response message. RADIUS server also stores accounting information. • A RADIUS message consists of a RADIUS header and RADIUS attributes. 5

  6. LAB 117 & VoIP LAB Non-Prepaid Call Flow user 2 user 2 user 1 user 1 1. INVITE 1. INVITE 2. INVITE 2. INVITE 4. 200 OK 4. 200 OK 3. 200 OK 3. 200 OK PSTN PSTN Call Server Call Server Gateway Gateway UA1 UA1 5. ACK 5. ACK RTP Media RTP Media 6. BYE 6. BYE 7. 200 OK 7. 200 OK 6

  7. LAB 117 & VoIP LAB Prepaid Call Setup Prepaid System Prepaid System Subsession 1 Subsession 1 Subsession 2 Subsession 2 Call ID: random1@ua1 Call ID: random1@ua1 Call ID: random2@prepaid.com Call ID: random2@prepaid.com Contact: b2bua@prepaid.com Contact: b2bua@prepaid.com Contact: b2bua@prepaid.com Contact: b2bua@prepaid.com Subsession1 Subsession1 Subsession2 Subsession2 2. INVITE 2. INVITE 6. 200 OK 6. 200 OK 3. INVITE 3. INVITE 9. ACK 9. ACK 7. 200 OK 7. 200 OK 10. ACK 10. ACK 11. INFO 11. INFO 12. 200 OK 12. 200 OK 1. INVITE 1. INVITE 4. INVITE 4. INVITE PSTN PSTN 8. 200 OK 8. 200 OK 5. 200 OK 5. 200 OK Call Server Call Server Gateway Gateway UA1 UA1 7

  8. LAB 117 & VoIP LAB Prepaid Call Teardown a) UA1 terminates the call a) UA1 terminates the call Prepaid System Prepaid System 13. BYE 13. BYE 14. BYE 14. BYE 16. 200 OK 16. 200 OK 15. 200 OK 15. 200 OK PSTN PSTN Gateway Gateway UA1 UA1 b) Prepaid credit is exhausted, the call is force-terminated by Prepaid System b) Prepaid credit is exhausted, the call is force-terminated by Prepaid System Prepaid System Prepaid System 13. BYE 13. BYE 13. BYE 13. BYE PSTN PSTN 14. 200 OK 14. 200 OK 14. 200 OK 14. 200 OK Gateway Gateway UA1 UA1 8

  9. LAB 117 & VoIP LAB NTP VoIP CDR Format Field Example Value radacctid 6201 username Alice nasipaddress 140.113.250.25 acctstarttime 2004-06-17 10:29:21 acctstoptime 2004-06-17 10:29:52 acctsessiontime 00:00:31 calledstationid 035795128 callingstationid 0944003921 acctterminatecause User-Request Table 1: The CDR Format. 9

  10. LAB 117 & VoIP LAB NTP VoIP CDR Format • radacctid is a unique CDR identity. • username is the user identity used in the NTP VoIP Platform. • nasipaddress indicates the IP address of the CDR generating node. • acctstarttime and the acctstoptime are the timestamps when the CDR was started and was ended, respectively. • acctsessiontime = acctstoptime − acctstarttime is the elapsed time of the call. • calledstationid and the callingstationid are the identities (the telephone numbers) of the called party and the calling party of the call, respectively. • acctterminatecause indicates how the session was terminated (ie., by User-Request or Session-Timeout). 10

  11. LAB 117 & VoIP LAB Prepaid System Architecture SQL AAA RADIUS Server OA&M Database RADIUS protocol B2BUA (with residing RADIUS client) Prepaid System Figure 2: The NTP Prepaid System Architecture • Remote Authentication Dial-In User Service (RADIUS) enables centralized authentication, authorization, and accounting functions (AAA) for network access. • The RADIUS protocol is utilized to provide AAA functions in the NTP Prepaid System. 11

  12. LAB 117 & VoIP LAB Prepaid System Components • The RADIUS client residing in a SIP-based Back-to-Back UA (B2BUA) can process and exchange SIP messages between the call parties, and terminates a prepaid call when the authorized session time for the call is expired. • The RADIUS server authorizes prepaid requests and responds the RADIUS client with authorized information (such as maximum call time). It also processes the RADIUS accounting messages and stores the accounting record in the non-versatile AAA database. • The RADIUS server queries this SQL-based database to retrieve user information. The AAA database also acts as the accounting database storing the user Call Detail Records (CDRs). • The Operation, Administration and Maintenance (OA&M) system can be accessed from web browsers over Secure Sockets Layer (SSL) protocol. Through OA&M, an administrator can view and/or modify user information and browse the prepaid CDRs generated by the NTP Prepaid System. 12

  13. LAB 117 & VoIP LAB • The B2BUA triggers the RADIUS Accounting- Request message with Status “start” or “stop” when it receives SIP messages such as INVITE/200 OK/ACK and BYE/200 OK ; and terminates the prepaid call session when the prepaid credit of a user depletes. • Before a prepaid call starts, the RADIUS client asks the RADIUS server for authorization. • When the prepaid call terminates, it instructs the RADIUS server to log the session accounting information. 13

  14. LAB 117 & VoIP LAB • In the NTP VoIP platform, some telephone numbers are reserved for prepaid call services. • When the Call Server receives a SIP request from a prepaid user, it forwards the request to the B2BUA for authorization. • After authorization, the B2BUA sends the authorized request to the Call Server. The Call Server then sets up the call to the called party. • If the Call Server receives SIP requests from non- prepaid users, it sets up the calls without involving the prepaid mechanism. 14

  15. LAB 117 & VoIP LAB Prepaid System Integration • In our deployment, a prepaid phone number must have prefix “09440210”. An example of the re-configuring routing rules in the Call Server (based on the SIP Express Router) is shown: if (search("From:.*sip:09440210[0-9][0-9]@") && !search("Call-ID:.*@prepaid.com") && (method=="INVITE" || method=="CANCEL" || method=="BYE" || method=="ACK")) { log(1,"Pre-paid User"); rewritehost("prepaid.com"); forward(prepaid.com,5060); break; }; 15

  16. LAB 117 & VoIP LAB NTP Prepaid Mechanism PSTN Terminating RADIUS UA1 Call Server B2BUA Gateway Switch (Phone2) Server 1. INVITE 1. INVITE 2. Access-Request (Prepaid phone number) 3. Access-Accept (Prepaid credit) Calculates the authorized session time for the prepaid call 4. INVITE 4. INVITE 5. IAM 6. ANM 7. 200 OK 7. 200 OK 16

  17. LAB 117 & VoIP LAB NTP Prepaid Mechanism PSTN Terminating RADIUS UA1 Call Server B2BUA Gateway Switch (Phone2) Server Starts the authorized session timer 8. Accounting-Request (start) Opening CDR 9. Accounting-Response 10. 200 OK 10. 200 OK 11. ACK 12. ACK 13. INFO 14. 200 OK Prepaid call conversation 17

  18. LAB 117 & VoIP LAB NTP Prepaid Mechanism PSTN Terminating RADIUS UA1 Call Server B2BUA Gateway Switch (Phone2) Server Authorized session timer expires 15. BYE 15. BYE 16. REL Closing the CDR 17. RLC 18. Accounting-Request (stop) 19. Accounting-Response 20. 200 OK 21. 200 OK 18

  19. 19 VoIP LAB LAB 117 & OA&M Snapshot1

  20. 20 VoIP LAB LAB 117 & Snapshot2

  21. 21 VoIP LAB LAB 117 & Snapshot3

  22. LAB 117 & VoIP LAB System Components • SIP Proxy Server – SER (SIP Express Router from iptel.org) • PSTN Gateway – Cisco 2621 • Back-to-Back User Agent – VOCAL B2BUA from Vovida.org • RADIUS – FreeRADIUS • Database – PostgreSQL • OA&M – OpenSSL+ Apache + ModSSL+PHP 22

  23. LAB 117 & VoIP LAB Conclusions • We proposed a SIP-based prepaid mechanism to handle the prepaid calls in a VoIP system. • Integration of our prepaid mechanism with the existing VoIP platform is easily achieved by re-configuring the Call Server. • A prototype of our prepaid mechanism has been developed in the NTP VoIP platform connecting major universities in Taiwan. 23

Recommend


More recommend