IP telephony · Cloud
Asterisk VoIP infrastructure on AWS EC2
An Asterisk IPBX compiled from source on AWS: audio and video calls across NAT, voicemail, conferencing, a voice menu and a call queue, hardened against SIP scanners.
- Audio + video calls validated between Android and Windows, across NAT
- 4 services voicemail, conferencing, voice menu, call queue
- Fail2ban protection against SIP scanners
What this project shows
The project covers the full chain of cloud IP telephony: compilation, signalling, media, services and hardening. As soon as it is exposed to the Internet, the server receives SIP scanner attempts: security is not optional.
Context, approach and architecture
Context
Deploying IP telephony in the cloud raises concrete questions: NAT traversal, codec choice, exposure to SIP scanners. The project sets up a full IPBX on an AWS EC2 instance to address each of them.
Approach
-
Compiled Asterisk 20 from source on Ubuntu 24.04 (AWS EC2 t2.micro instance), with only the required SIP and RTP ports open in the Security Group.
-
PJSIP configuration with NAT traversal (rtp_symmetric, rewrite_contact, force_rport).
-
Audio (G.711, G.722, GSM) and video (H.264, VP8) codecs; services: French voicemail, ConfBridge conferencing, a voice menu (IVR) generated with Google Text-to-Speech, a round-robin call queue.
-
Analysed SIP exchanges and RTP streams with Wireshark; hardened with Fail2ban against SIP scanners and restricted SSH access.
Architecture
- Clients SIP
- Linphone (Android, Windows)
- AWS EC2
- Asterisk 20, Ubuntu 24.04
- PJSIP
- signalling and NAT
- Fail2ban
- anti-scan protection