💻 VirtualBox Lab Setup for py-phone-caller¶
This guide explains how to configure a two-virtual-machine lab environment in VirtualBox for testing py-phone-caller alongside Asterisk / FreePBX.
📑 Table of Contents¶
- Lab Topology & Network Architecture
- Configuring the VirtualBox Host-Only Network
- Configuring the VirtualBox NAT Network
- Configuring Network Adapters for py-phone-caller VM
- Configuring Network Adapters for FreePBX / Asterisk VM
- Connectivity Verification
1. Lab Topology & Network Architecture¶
The lab setup isolates telephony and inter-service communication inside a VirtualBox NAT Network, while providing management access from the virtualization host via a Host-Only Adapter:
- NAT Network (
10.22.22.0/24): Internal communication between py-phone-caller and the Asterisk PBX. - Host-Only Network (
192.168.56.0/24): Access from your physical workstation to the Web UI (http://192.168.56.102:5000) and FreePBX admin interface (http://192.168.56.101).
[ Physical Workstation / Browser ]
|
(Host-Only Network: 192.168.56.0/24)
|
+---> [ py-phone-caller VM ] (192.168.56.102 / 10.22.22.105)
| |
| (NAT Network: 10.22.22.0/24)
| |
+---> [ FreePBX / Asterisk VM ] (192.168.56.101 / 10.22.22.234)

2. Configuring the VirtualBox Host-Only Network¶
-
Open VirtualBox, click File in the top menu, and select Host Network Manager...

-
Select
vboxnet0(or create a new host-only adapter by clicking Create). - Under Properties, ensure the IPv4 configuration is set to:
- IPv4 Address:
192.168.56.1 - IPv4 Network Mask:
255.255.255.0
- IPv4 Address:
-
Click Apply.

3. Configuring the VirtualBox NAT Network¶
-
In the top menu, click File ➔ Preferences... (or Tools ➔ Network).

-
Select Network in the left sidebar.
- If
py-phone-callerdoes not exist, click the + button to add a new NAT Network. -
Click the gear icon (Edit) on the network.

-
Configure:
- Network Name:
py-phone-caller - IPv4 Prefix / CIDR:
10.22.22.0/24 - Enable DHCP: Checked (
Yes)
- Network Name:
-
Click OK.

4. Configuring Network Adapters for py-phone-caller VM¶
-
Select the
py-phone-callervirtual machine, right-click, and select Settings...
-
Click Network in the sidebar.
- Under Adapter 1:
- Attached to:
NAT Network - Name:
py-phone-caller - Cable Connected: Checked (
Yes)
- Attached to:

- Under Adapter 2:
- Check Enable Network Adapter
- Attached to:
Host-only Adapter - Name:
vboxnet0 - Cable Connected: Checked (
Yes)
-
Click OK.

5. Configuring Network Adapters for FreePBX / Asterisk VM¶
-
Select the
freepbxvirtual machine, right-click, and select Settings...

-
Under Adapter 1:
- Attached to:
NAT Network - Name:
py-phone-caller - Cable Connected: Checked (
Yes)
- Attached to:

- Under Adapter 2:
- Check Enable Network Adapter
- Attached to:
Host-only Adapter - Name:
vboxnet0 - Cable Connected: Checked (
Yes)
-
Click OK.

6. Connectivity Verification¶
Boot both virtual machines and test connectivity:
- From your host workstation:
- Ping FreePBX:
ping 192.168.56.101 - Ping py-phone-caller:
ping 192.168.56.102 - Open Web UI:
http://192.168.56.102:5000
- Ping FreePBX:
- From inside the
py-phone-callerVM:- Test Asterisk ARI:
curl -u py-phone-caller:password http://10.22.22.234:8088/ari/asterisk/info
- Test Asterisk ARI: