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

sip based prepaid mechanism based prepaid mechanism sip
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

1

LAB 117 & VoIP LAB

SIP SIP-

  • based Prepaid Mechanism

based Prepaid Mechanism

  • n NTP VoIP Platform in
  • n 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

slide-2
SLIDE 2

2

LAB 117 & VoIP LAB

Outlines

  • NTP VoIP Platform
  • RADIUS Accounting
  • Prepaid System Architecture
  • Call Flow
  • Conclusions & Future Work
slide-3
SLIDE 3

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.

slide-4
SLIDE 4

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.

slide-5
SLIDE 5

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.

slide-6
SLIDE 6

6

LAB 117 & VoIP LAB

Non-Prepaid Call Flow

UA1

Call Server

PSTN Gateway

  • 1. INVITE
  • 4. 200 OK
  • 2. INVITE
  • 3. 200 OK
  • 5. ACK

RTP Media

  • 6. BYE
  • 7. 200 OK

user 2 user 1

UA1

Call Server

PSTN Gateway

  • 1. INVITE
  • 4. 200 OK
  • 2. INVITE
  • 3. 200 OK
  • 5. ACK

RTP Media

  • 6. BYE
  • 7. 200 OK

user 2 user 1

slide-7
SLIDE 7

7

LAB 117 & VoIP LAB

Prepaid Call Setup

UA1

Call Server

PSTN Gateway

Prepaid System

  • 1. INVITE
  • 8. 200 OK
  • 4. INVITE
  • 5. 200 OK
  • 2. INVITE
  • 3. INVITE
  • 6. 200 OK
  • 7. 200 OK

Subsession1 Subsession2

Subsession 1 Call ID: random1@ua1 Contact: b2bua@prepaid.com Subsession 2 Call ID: random2@prepaid.com Contact: b2bua@prepaid.com

  • 9. ACK
  • 11. INFO
  • 12. 200 OK
  • 10. ACK

UA1

Call Server

PSTN Gateway

Prepaid System

  • 1. INVITE
  • 8. 200 OK
  • 4. INVITE
  • 5. 200 OK
  • 2. INVITE
  • 3. INVITE
  • 6. 200 OK
  • 7. 200 OK

Subsession1 Subsession2

Subsession 1 Call ID: random1@ua1 Contact: b2bua@prepaid.com Subsession 2 Call ID: random2@prepaid.com Contact: b2bua@prepaid.com

  • 9. ACK
  • 11. INFO
  • 12. 200 OK
  • 10. ACK
slide-8
SLIDE 8

8

LAB 117 & VoIP LAB

Prepaid Call Teardown

UA1

Prepaid System

PSTN Gateway

UA1

Prepaid System

PSTN Gateway

  • 13. BYE
  • 14. BYE
  • 15. 200 OK
  • 16. 200 OK
  • 13. BYE
  • 13. BYE
  • 14. 200 OK
  • 14. 200 OK

a) UA1 terminates the call b) Prepaid credit is exhausted, the call is force-terminated by Prepaid System UA1

Prepaid System

PSTN Gateway

UA1

Prepaid System

PSTN Gateway

  • 13. BYE
  • 14. BYE
  • 15. 200 OK
  • 16. 200 OK
  • 13. BYE
  • 13. BYE
  • 14. 200 OK
  • 14. 200 OK

a) UA1 terminates the call b) Prepaid credit is exhausted, the call is force-terminated by Prepaid System

slide-9
SLIDE 9

9

LAB 117 & VoIP LAB

NTP VoIP CDR Format

User-Request acctterminatecause 0944003921 callingstationid 035795128 calledstationid 00:00:31 acctsessiontime 2004-06-17 10:29:52 acctstoptime 2004-06-17 10:29:21 acctstarttime 140.113.250.25 nasipaddress Alice username 6201 radacctid Example Value Field

Table 1: The CDR Format.

slide-10
SLIDE 10

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).

slide-11
SLIDE 11

11

LAB 117 & VoIP LAB

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.

Figure 2: The NTP Prepaid System Architecture

AAA Database B2BUA (with residing RADIUS client) RADIUS Server RADIUS protocol SQL

Prepaid System

OA&M

slide-12
SLIDE 12

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.

slide-13
SLIDE 13

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.

slide-14
SLIDE 14

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.

slide-15
SLIDE 15

15

LAB 117 & VoIP LAB

Prepaid System Integration

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; };

  • 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:

slide-16
SLIDE 16

16

LAB 117 & VoIP LAB

UA1 Call Server B2BUA RADIUS Server

  • 1. INVITE
  • 2. Access-Request (Prepaid phone number)
  • 3. Access-Accept (Prepaid credit)
  • 4. INVITE

Calculates the authorized session time for the prepaid call

  • 7. 200 OK
  • 1. INVITE
  • 4. INVITE
  • 7. 200 OK

NTP Prepaid Mechanism PSTN Gateway

  • 5. IAM
  • 6. ANM

Terminating Switch (Phone2)

slide-17
SLIDE 17

17

LAB 117 & VoIP LAB

UA1 Call Server B2BUA RADIUS Server

  • 10. 200 OK

Starts the authorized session timer

  • 8. Accounting-Request (start)
  • 9. Accounting-Response

Prepaid call conversation

  • 10. 200 OK

NTP Prepaid Mechanism

Opening CDR

  • 13. INFO
  • 14. 200 OK

PSTN Gateway

  • 11. ACK
  • 12. ACK

Terminating Switch (Phone2)

slide-18
SLIDE 18

18

LAB 117 & VoIP LAB

UA1 Call Server B2BUA RADIUS Server NTP Prepaid Mechanism PSTN Gateway Terminating Switch (Phone2)

  • 15. BYE
  • 15. BYE
  • 20. 200 OK
  • 21. 200 OK

Closing the CDR

  • 18. Accounting-Request (stop)
  • 19. Accounting-Response

Authorized session timer expires

  • 16. REL
  • 17. RLC
slide-19
SLIDE 19

19

LAB 117 & VoIP LAB

OA&M Snapshot1

slide-20
SLIDE 20

20

LAB 117 & VoIP LAB

Snapshot2

slide-21
SLIDE 21

21

LAB 117 & VoIP LAB

Snapshot3

slide-22
SLIDE 22

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

slide-23
SLIDE 23

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.

slide-24
SLIDE 24

24

LAB 117 & VoIP LAB

Future Works

  • Integration with prepaid system of

messaging service

  • Robustness
  • Accuracy
  • IVR handling at credit depletion
slide-25
SLIDE 25

25

LAB 117 & VoIP LAB

Prepaid Mechanism of SIP-based Services

PSTN Internet

(a) Call Server (b) PSTN Gateway Terminating Switch / Phone 2 (c) UA1 6 (d) IM-SMS Gateway

GSM

(j) Phone2 (k) MS3 1 2 4 7 5

(h) AAA Database (g) RADIUS Server (i) OA&M RADIUS client B2BUA

(e) Prepaid Mechanism

(f)

3

slide-26
SLIDE 26

26

LAB 117 & VoIP LAB

This talk is supported by NCHC, TWAREN and APAN Fellowship.

Thank You.

slide-27
SLIDE 27

27

LAB 117 & VoIP LAB

References

1. Collins, D., Carrier Grade Voice over IP. John Wiley & Sons, Inc., 2001. 2. Lin, Y.-B., and Chlamtac, I. Wireless and Mobile Network Architectures. JohnWiley & Sons, 2001. 3. Rigney, C., RADIUS Accounting, RFC 2866, June 2000. 4. Rigney, C., Willens, S., Rubens, A. and Simpson W., Remote Authentication Dial In User Service (RADIUS), RFC 2865, June 2000.. 5. Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A., Peterson, J., Sparks, R., Handley, M. and Schooler, E., SIP: Session Initiation Protocol, RFC 3261, June 2002. 6. The FreeRADIUS Server Project, http://www.freeradius.org 7. The PostgreSQL Global Development Group, http://www.postgresql.org 8. The Vovida community, http://www.vovida.org 9. Wu, Q., Chen, W.-E., Pang, A.-C., Lin, Y.-B., Chlamtac, I., NTP VoIP Testbed: A SIP-based Wireless VoIP Platform, to appear as a book chapter in Handbook of Algorithms for Mobile and Wireless Networking and Computing by CRC Press.