FreeSWITCH Radius Integration Billing




There are some decent modules out there that help us in tying up FreeSWITCH with Radius namely mod_rad_auth and mod_radius_cdr. However, they are pretty much limited and lack some of main features like dynamic routing that some radius servers can provide. Integrating FreeSWITCH with such radius server which can do routing and billing logic will allow us to deploy FreeSWITCH on a large scale, ideal for whole sale carriers kind of thing.


This integration will give us a luxury if not having to configure any endpoint details that FreeSWITCH has to send calls to. We will have one centralized billing server which talks radius protocol. And NAS (name is debatable ) talking to many FreeSWITCH instances. The following image makes it clear.


Now the challenge is to implement NAS that does the conversion of radius protocol to a language that FreeSWITCH understands. Luckily FreeSWITCH comes with numerous features and tools that offer hooks into every place of FreeSWTICH. I've implemented this NAS in python using Twisted's higly scalable network architecture. The major pain is understanding the cisco's radius dictionary attributes and how exactly they map to the FreeSWITCH variables. I've implemented all the important features of what VoIP radius protocol has to offer.

  • Endpioint Authorization (Digest and IP)
  • Route Autthorization (for Dynamic routing, limit call duration based on balance amount)
  • Accouting Requests (Radius CDR for billing )