Complex Engineering Problem (CEP)
TC -485
Telecommunication Switching Network
Design and Implementation of a Secure SoftSwitch-Based VoIP
System
Presenters:
Group members:
TC-22002
TC-22003
TC-22004
TC-22015
TC-22020
Instructor: MS. Ghulam Fiza
Problem Statement
Challenges in Traditional Networks and Project Objectives
Legacy PSTN/TDM Limitations: Traditional circuit-switched networks are expensive, less flexible, and
difficult to scale. They require significant capital investment in hardware infrastructure .
Need for Secure VoIP: Implement a software-driven SoftSwitch to deliver secure, high-quality Voice over
IP communication that can adapt to evolving business requirements.
Enterprise PBX Features: Must support advanced features including Interactive Voice Response (IVR),
call forwarding, voicemail-to-email integration, and real-time call management capabilities.
Security and Performance: Must mitigate SIP-based threats and optimize Quality of Service (QoS)
parameters including delay, jitter, packet loss, and bandwidth utilization.
SoftSwitch Fundamentals: What & How
Software-Based Switching Architecture for Modern VoIP Networks
Definition
A SoftSwitch is a software-based system that controls call setup, routing, and Call Agent
teardown in VoIP networks. It replaces traditional hardware switches with flexible, (Asterisk Core)
scalable software running on standard servers
SIP Endpoints SIP Trunks
Core Roles Softphones ITSP/Carrier
• Call Control: Manages session establishment, modification, and
termination
SoftSwitch
• Policy Management: Enforces routing rules, QoS, and access control
• CDR & Billing: Call Detail Records for usage tracking and billing
Control Plane
• Protocol Interworking: Converts between SIP, SS7, H.323, and legacy
protocols.
Media Gateway PSTN/TDM
RTP/SRTP Legacy Network
Key Components
• Call Agent (Asterisk): Brain of the system - controls signaling logic Signaling GW
• Media Gateway: Converts media streams between IP and TDM Protocol
networks Conv.
• Signaling Gateway: Translates signaling protocols (SIP SS7)
VoIP Architecture & Protocols (SIP, RTP, SDP)
Protocol Stack and Call Setup Flow for Voice over IP Systems
SIP - Session Initiation Protocol:
Typical SIP Call Setup Flow
RFC 3261 | Ports 5060 (UDP/TCP) / 5061 (TLS)
Signaling protocol for session setup, modification, and tear-down. Controls call establishment,
routing, and termination in VoIP networks.
SDP - Session Description Protocol:
RFC 4566 | Embedded in SIP Messages
Media negotiation protocol that defines codecs, IP addresses, and port numbers for media
streams. Enables capability exchange between endpoints.
RTP/SRTP - Real-time Transport:
RFC 3550, RFC 3711 | Dynamic Ports
Media transport protocol for real-time audio and video delivery. SRTP adds encryption for secure
communication using AES and authentication.
NAT Traversal:
STUN / TURN / ICE
Mechanisms to enable VoIP through NAT/firewall: STUN discovers public IP, TURN relays media,
ICE combines bot
Proposed System Overview
Linux-Based SoftSwitch Architecture with Asterisk & FreePBX
Asterisk
Operating System & Core Core Engine
OS: Ubuntu Linux (LTS) - Stability, Security, LTS Support
SoftSwitch Engine: Asterisk (Open-Source PBX) Users
PBX Management GUI: FreePBX (Web-Based Interface) SIP Trunks
VoIP Clients ITSP / Carrierr
Database: MariaDB for CDR, user data, configurations
Protocols & Clients
IP PBX
Signaling Protocol: SIP (Session Initiation Protocol)
Call Control Routing
Media Protocol: RTP/SRTP (Real-time Transport Protocol)
Logic Media
SIP Clients: Zoiper, X-Lite, Linphone (Softphones) Gateway
Codecs: G.711 (quality), G.729, Opus (bandwidth efficient) Softphones
Zoiper / X-Lite PSTN
Security Mechanisms
Legacy Network
Encryption: TLS for SIP signaling, SRTP for media
Firewall: UFW/iptables with SIP-specific rules
Intrusion Prevention: Fail2Ban for brute-force protection FreePBX
Authentication: Strong passwords, PIN policies, ACLs Web GUI
VoIP System Architecture: Users IP PBX SIP Trunks
PSTN
Linux-Based Architecture & Components
Foundation for Secure, Stable, and Scalable VoIP Infrastructure
Why Linux for SoftSwitch Implementation?
Linux provides unparalleled stability, security hardening, resource efficiency, and long-term support (LTS) - making it the ideal
platform for mission-critical telecommunications infrastructure. Native compatibility with Asterisk and FreePBX ensures optimal
performance
Core Components
• Linux OS: Stable, secure, and reliable platform
• Asterisk: Call routing, switching, and SIP handling
• FreePBX: Easy PBX configuration and management
• MariaDB / MySQL: Stores users and Call Detail Records (CDR)
• Apache / Nginx: Web server for FreePBX
• Protocols: SIP (signaling), RTP / SRTP (media)
• Codecs: G.711, G.729, Opus for voice quality
Linux-Based Architecture & Components
Foundation for Secure, Stable, and Scalable VoIP Infrastructure
Security, Operations & Deployment
• Firewall (UFW / iptables) to secure SIP and RTP ports
• Fail2Ban for brute-force attack prevention
• TLS / SRTP encryption for secure calls
• Automated backups and system monitoring
• Virtualization: Vmware, KVM
• Containerization: Docker / Kubernetes
• Clustering: High availability and load balancing
Asterisk + FreePBX: Implementation Workflow
Step-by-Step Installation and Configuration Process
7-Phase Implementation Process
1. Install Ubuntu LTS & System Updates
• Deploy Ubuntu Server LTS, apply security patches, configure network
settings, and install base dependencies (build-essential, wget, git).
2. Install Asterisk with PJSIP
• Download and compile Asterisk from source, enable PJSIP channel driver
for SIP support, install DAHDI libraries if hardware interfaces are needed.
3. Deploy FreePBX & Configure Services
• Install FreePBX web GUI, configure MariaDB database, set up
Apache/Nginx web server, configure PHP settings and enable required
modules
4. Create SIP Extensions & Register Softphones
• Define SIP extensions via FreePBX, configure codecs (G.711, G.729, Opus),
register softphones (Zoiper/X-Lite) with authentication credentials.
Asterisk + FreePBX: Implementation Workflow
Step-by-Step Installation and Configuration Process
7-Phase Implementation Process
5. Configure SIP Trunks & Call Routes
• Set up SIP trunk providers, define outbound routes with dial patterns,
configure inbound routes with DID mapping to extensions or IVR.
6. Enable Advanced PBX Features
• Configure IVR menus with time conditions, set up voicemail-to-email
(SMTP), create ring groups and call queues, enable call recording policies.
7. Validate System & Backup Configurations
• Conduct test calls to verify routing and features, analyze SIP traces with
Wireshark, review CDR reports, implement automated backup
procedures.
Expected Outcomes & Benefits
Deliverables and Project Impact Assessment
Project Success: This CEP demonstrates a complete enterprise-grade VoIP solution bridging theoretical
knowledge with practical implementation of modern telecommunication systems.
1. Fully Functional SoftSwitch-Based IP PBX: Complete Linux-based VoIP system utilizing Asterisk and
FreePBX, demonstrating real-world telecommunication switching capabilities with enterprise-level
features.
2. Secure SIP Communications: Implementation of TLS/SRTP encryption, Fail2Ban intrusion prevention,
firewall hardening, and comprehensive security measures protecting against VoIP-specific threats.
3. Demonstrated Advanced PBX Features: Working implementations of IVR (Interactive Voice Response),
voicemail-to-email integration, call forwarding, call queues, ring groups, and call recording capabilities.
4. Performance Analysis Report: Comprehensive evaluation of call quality metrics including latency,
jitter, packet loss, bandwidth utilization, and QoS optimization results using Wireshark and monitoring
tools.