Pilot program Wivox 1.0 is piloting with Indian SMBs now. Book a demo →
Architecture Comparison

On-Premise vs. Cloud PBX

Architectural Sovereignty, Regulatory Compliance, and Hardware Autonomy.

Telecommunications Regulatory Frameworks and Toll Bypass

One of the most critical differentiators between a hybrid on-premise solution like Wivox and pure cloud telephony is the ability to strictly manage and localize VoIP-to-PSTN bridging. In jurisdictions with strict telecommunications laws, such as India, the Telecom Regulatory Authority of India (TRAI) and the Department of Telecommunications (DoT) enforce rigid Other Service Provider (OSP) guidelines. Historically and presently, these regulations strictly prohibit toll bypass, mandating that logical partitioning must exist between internal VoIP networks and the PSTN to prevent revenue loss for local telecom service providers.

Pure cloud PBX systems hosted in remote, centralized data centers often struggle with these regulations because routing an international or cross-border VoIP call into a cloud server, and then terminating it via a local PSTN gateway over a Wide Area Network (WAN), violates these toll bypass restrictions. Under the framework governing Voice based Business Process Outsourcing (BPO) services, TRAI mandates that calls originating from a VoIP phone to a PSTN gateway must occur within the same geographical location, essentially forbidding the merging of WAN-based IP calls with the local PSTN unless specific licensing conditions are met.

The Wivox architecture elegantly resolves this friction by deploying physical Dinstar VoIP GSM/FXO gateways at the local enterprise edge. The Asterisk PJSIP core connects to the Dinstar gateway via localized SIP trunking, tagging routes with X-Call-Type headers to ensure accurate routing. This localized hardware integration ensures that inbound calls (from a GSM SIM to the Dinstar gateway, and subsequently to local IP extensions) and outbound calls (from a local extension through Asterisk to the local GSM SIM) remain geographically compliant with TRAI mandates. By maintaining the physical PSTN interface on-premise while leveraging a modern Node.js web dashboard for centralized administration, Wivox satisfies local telecommunications regulations without sacrificing the agility of cloud-managed software.

Gateway Integration, SIM Rotation, and Anti-Blocking

Beyond mere compliance, the integration of physical edge hardware provides massive operational advantages. Generic cloud PBX providers almost exclusively rely on centralized SIP trunks, which often suffer from poor localized caller ID matching, leading to low answer rates. Wivox leverages Dinstar UC2000 series GSM/VoLTE gateways, which can house multiple SIM cards ranging from 1 to 64 channels.

This deep integration allows Wivox to utilize advanced multi-SIM technologies. For example, a Dinstar gateway configured with 4 SIM slots per GSM channel allows for sophisticated SIM bank rotation algorithms based on working time, working day, or SIM balance. This acts as a powerful anti-blocking mechanism for call centers, ensuring that outbound calls present localized mobile Caller IDs to end-users, thereby drastically improving answer rates compared to anonymous or out-of-region SIP numbers. Furthermore, the Dinstar gateways support Voice over LTE (VoLTE) and advanced AMR-WB (Adaptive Multi-Rate Wideband) audio coding, ensuring that the transition between the SIP network and the mobile carrier maintains high-definition audio quality. Wivox's ability to map specific Dinstar port groups to distinct PBX extensions (e.g., routing SIM 1 exclusively to Extension 103 via hotline routing) provides a level of granular, hardware-level PSTN manipulation that is mathematically impossible in a pure cloud telephony environment.

High Availability and Active-Active Clustering

A frequent argument favoring multi-tenant cloud PBX is the inherent redundancy of provider data centers. However, mission-critical on-premise or private-cloud deployments can achieve identical, if not superior, failover parameters without relinquishing infrastructure control. The Wivox architectural roadmap includes Active-Active Twin Server Clustering, utilizing multi-node Asterisk clustering integrated with Corosync and Pacemaker.

In a Corosync and Pacemaker configuration, an active-passive or active-active failover cluster continuously monitors node health, service processes, and data replication states. The architecture relies on a floating Virtual IP (VIP) address configured via the ocf:heartbeat:IPaddr2 resource agent, which serves as the primary endpoint for all SIP registrations, media RTP streams, and WebRTC WebSocket connections.

If the primary Asterisk 16/20 server experiences a hardware failure, kernel panic, or severe service degradation, Corosync detects the loss of the node's heartbeat. Pacemaker then orchestrates a STONITH (Shoot The Other Node In The Head) fencing operation to forcefully isolate the failed node, preventing it from accessing shared resources, and instantly migrates the floating VIP to the standby server. This completely eliminates the risk of a "split-brain" scenario, where two servers attempt to process call routing and media bridging simultaneously, which would otherwise lead to massive port conflicts and database corruption. The failover process executes within seconds, ensuring that active SIP transport protocols, dynamic hunt groups, and call queues remain operational without requiring physical IP phones or mobile softphones to undergo DNS cache flushing or manual endpoint reconfiguration.

Network Security, Port Hardening, and Fail2Ban Integration

On-premise and self-hosted PBX deployments inherently expose SIP ports to localized, wide-area, or public networks. Because standard SIP operates over UDP port 5060, it represents one of the most frequently probed and attacked surfaces on the public internet. Automated botnets and tools like SIPVicious constantly scan IPv4 spaces, hunting for exposed port 5060 endpoints, guessing extension passwords, and seeking vulnerabilities to perpetrate toll fraud. Once an attacker successfully brute-forces an extension's SIP secret, they can register an unauthorized endpoint and place premium-rate international calls, generating massive financial losses within hours.

Wivox mitigates these extreme risks through a multi-layered architectural defense. First, Wivox utilizes the modern res_pjsip module, which offers vastly superior endpoint authentication mechanisms and strict SIP header parsing compared to the deprecated chan_sip driver. Second, the infrastructure deeply integrates robust Fail2Ban configurations tailored specifically for Asterisk. By dynamically monitoring the /var/log/asterisk/messages file for specific regular expression (regex) patterns matching PJSIP authentication failures, Fail2Ban instantly executes predefined actions. When an IP address exceeds the maxretry threshold within a specific findtime window, Fail2Ban utilizes iptables-allports to dynamically write a firewall rule dropping all traffic from the malicious IP address for a specified bantime. This dynamic, real-time threat mitigation requires zero manual intervention and stops brute-force attacks at the transport layer before they exhaust the Asterisk task processors.

Furthermore, Wivox's native integration of WebRTC abstracts traditional SIP signaling over Secure WebSockets (wss://), effectively shifting external softphone communications from vulnerable, easily spoofed UDP ports to encrypted, certificate-validated TCP port 443. This architectural choice allows administrators to limit traditional SIP port 5060 exposure exclusively to the internal local area network (LAN) for physical Grandstream desk phones and hardened Dinstar gateways, drastically reducing the external attack surface.

Typical Fail2Ban Regular Expression for res_pjsip
# Fail2Ban filter configuration for res_pjsip authentication failures
[Definition]
failregex = ^\[%(__date_pattern)s\] SECURITY\[\d+\] .* SecurityEvent="FailedACL".*RemoteAddress="IPV[46]/(?:<Host>|[0-9a-fA-F:.]+)/(?:[0-9]+)"
            ^\[%(__date_pattern)s\] SECURITY\[\d+\] .* SecurityEvent="InvalidAccountID".*RemoteAddress="IPV[46]/(?:<Host>|[0-9a-fA-F:.]+)/(?:[0-9]+)"
            ^\[%(__date_pattern)s\] SECURITY\[\d+\] .* SecurityEvent="ChallengeResponseFailed".*RemoteAddress="IPV[46]/(?:<Host>|[0-9a-fA-F:.]+)/(?:[0-9]+)"
            ^\[%(__date_pattern)s\] SECURITY\[\d+\] .* SecurityEvent="InvalidPassword".*RemoteAddress="IPV[46]/(?:<Host>|[0-9a-fA-F:.]+)/(?:[0-9]+)"
ignoreregex =