Build SIP-based VOIP Service With RADIUS AAA Using Kamailio (OpenSER) And FreeRadius

本文档详细介绍了如何配置FreeRadius,为OpenSER SIP服务器提供AAA服务,以构建VoIP服务。涵盖了从FreeRadius和OpenSER的安装到配置,包括RADIUS客户端、FreeRADIUS和OpenSER的配置文件,以及故障排查步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

1. Overview

OpenSER (http://www.kamailio.org) is a scalable and flexible SIP (RFC3261) server with a lot of features that can power your VoIP services. Features like ENUM lookup, TLS support, authentication, authorization and accounting against database or Radius servers, least cost routing, load balancing or Call Processing Language allow providing residential or carrier VoIP services.

FreeRADIUS (http://www.freeradius.org) is an open source RADIUS server.It scales from embedded systems with small amounts of memory, to systems with millions of users. It is fast, flexible, configurable, and supports many authentication servers.

This document focuses on configuring FreeRadius to offer AAA services to OpenSER SIP server, needed for VoIP services. Step by step configuration is provided and you must be logged in as 'root' user to be able to execute the commands exampled in this document. It is assumed that you have basic knowledge about Linux or Debian operation and administration.

2. The architecture of the VoIP service

Communication between VoIP users (phones) and the server uses the SIP (RFC3261) protocol. The SIP server will communicate with the AAA server via radius client, which is linked to the SIP server. Users' profile can be stored to the local file system (as it is done is the examples included in this document) or other storage system supported by AAA server (e.g., database, ldap).

    +---------+                                              +---------+
    | PHONE 1 |<--SIP--+    +-------------------+            | STORAGE |
    +---------+        |    |    SIP SERVER     |            +----+----+
                       #===>|     (OpenSER)     |                 |        
    ...........        |    |-------------------|         +-------+-------+
                       |    |   RADIUS CLIENT   |<==AAA==>| RADIUS SERVER |
    +---------+        |    | (radiusclient-ng) |         |  (FreeRADIUS) |
    | PHONE N |<--SIP--+    +-------------------+         +---------------+
    +---------+

3. FreeRadius Installation

FreeRadius server is part of official Debian distribution. To install it just do:

	~# apt-get install freeradius

If you install FreeRadius from Debian packages, the configuration files are located in “/etc/freeradius/”.

If you prefer to install FreeRadius from sources, then go to FreeRadius web site and download it from there. Please note that next commands are the basic steps to install FreeRadius from source - you should read FreeRadius installation documentation to do it properly.

    ~# mkdir -p /usr/local/src/freeradius
    ~# cd /usr/local/src/freeradius
    ~# wget ftp://ftp.freeradius.org/pub/radius/freeradius-1.1.0.tar.gz
    ~# tar xvfz freeradius-1.1.0.tar.gz
    ~# cd freeradius-1.1.0
    ~# ./configure
    ~# make
    ~# make install

If you install FreeRadius from sources, the configuration files are located in “/usr/local/raddb/”.

4. OpenSER Installation

To compile the Radius support in OpenSER you must install first the “radiusclient-ng” library.

4.1. RadiusClient-ng library installation

The homepage for “radiusclient-ng” library is: http://developer.berlios.de/projects/radiusclient-ng/.

You can get Debian packages for “radiusclient-ng” from OpenSER download s

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值