This tool provides comprehensive functionality for working with Zyxel router configuration backups. It can download, decrypt, encrypt, and restore configuration files, as well as extract and analyze firmware images.
Use your Airtel landline VoIP on any device (PC, Android, iPhone) using the Zoiper softphone app. This works alongside the physical landline phone — both will function simultaneously.
- Zyxel AOT5221ZY router (Airtel fiber broadband with VoIP landline)
- The zyxel_backup_restore.py tool (GitHub Gist)
- Python 3.x and OpenSSL installed
- Your router admin credentials (usually on a sticker on the router)
python zyxel_backup_restore.py full-backup -u admin -p "YOUR_PASSWORD" -o backup_original.xmlKeep backup_original.xml safe — this is your rollback.
Open the decrypted backup_original.xml and search for these values:
| What to find | Where to look | Example |
|---|---|---|
| SIP URI / Auth Username | VoiceService > i1 > Line > i1 > SIP > AuthUserName |
+91XXXXXXXXXX@ne.ims.airtel.in |
| Auth Password | VoiceService > i1 > Line > i1 > SIP > AuthPassword |
Nokia@1 |
| Outbound Proxy | VoiceService > i1 > SIP > OutboundProxy |
10.2.9.115 |
| Standby Proxy | VoiceService > i1 > SIP > StandbyOutboundProxy |
10.2.9.131 |
| VoIP WAN Gateway | WANConnectionDevice > i2 > WANIPConnection > i1 > DefaultGateway |
10.216.122.129 |
| VoIP VLAN ID | Same section → X_5067F0_VLANID |
660 |
Note: Your VoIP WAN interface is the one with
X_5067F0_SERVICELIST=VOIP(usuallyWANConnectionDevice.2).
Make a copy of the backup for editing:
cp backup_original.xml config.xmlFind the VoIP WAN connection (the one with VLAN 660 and SERVICELIST=VOIP) and change:
- <NATEnabled PARAMETER="configured" TYPE="boolean">0</NATEnabled>
+ <NATEnabled PARAMETER="configured" TYPE="boolean">1</NATEnabled>Why: Your PC/phone is on the LAN (192.168.1.x). The VoIP servers are on the VoIP VLAN (10.x.x.x). NAT allows your LAN devices to send traffic through the VoIP VLAN.
Find the <Layer3Forwarding> section and add a <Forwarding> block before the closing </Layer3Forwarding> tag:
<Forwarding>
<i1>
<Enable PARAMETER="configured" TYPE="boolean">1</Enable>
<Status PARAMETER="configured" TYPE="string" LENGTH="16">Enabled</Status>
<Type PARAMETER="configured" TYPE="string" LENGTH="16">Network</Type>
<DestIPAddress PARAMETER="configured" TYPE="string" LENGTH="16">10.2.0.0</DestIPAddress>
<DestSubnetMask PARAMETER="configured" TYPE="string" LENGTH="16">255.255.0.0</DestSubnetMask>
<GatewayIPAddress PARAMETER="configured" TYPE="string" LENGTH="16">YOUR_VOIP_GATEWAY</GatewayIPAddress>
<Interface PARAMETER="configured" TYPE="string" LENGTH="256">InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANIPConnection.1</Interface>
<ForwardingMetric PARAMETER="configured" TYPE="sint31" MAX="2147483647" MIN="-1">1</ForwardingMetric>
</i1>
</Forwarding>Replace
YOUR_VOIP_GATEWAYwith the VoIP WAN gateway IP you found in Step 2 (e.g.,10.216.122.129).
Why: The SIP/RTP servers (10.2.x.x) are only reachable via the VoIP VLAN. Without this route, your traffic goes out the internet WAN and can't reach them.
- Do NOT disable SIP ALG (
SIPALGEnable) — the landline phone depends on it - Do NOT add port forwarding for SIP/RTP on the VoIP WAN — it conflicts with the router's built-in VoIP and breaks the landline
python zyxel_backup_restore.py full-restore -i config.xml -u admin -p "YOUR_PASSWORD"The router will reboot (~2 minutes). Wait for all lights to stabilize.
Install Zoiper on your PC, Android, or iPhone and create a SIP account with these settings:
| Setting | Value |
|---|---|
| Account Name | Airtel Landline (or anything) |
| Username | +91XXXXXXXXXX@ne.ims.airtel.in (your SIP URI from Step 2) |
| Password | Your Auth Password from Step 2 |
| Domain | ne.ims.airtel.in |
| Outbound Proxy | 10.2.9.115:5060 (your Outbound Proxy from Step 2) |
| Transport | UDP |
| STUN | Disabled |
| Use rport | Yes |
| Audio Codecs | Enable: G.711 μ-law, G.711 A-law, G.729. Disable others. |
| RTP Port Range | 10000–20000 |
Change Zoiper's local SIP port from 5060 to 5062 in advanced settings. This bypasses the ALG (which only inspects port 5060) while keeping it active for the landline.
- Ping test — From your PC, run
ping 10.2.9.115. If it replies, routing works. - Zoiper status — Should show "Registered" or "Ready" in green.
- Test call — Call a non-Airtel mobile number and verify two-way audio.
| Problem | Cause | Fix |
|---|---|---|
| Zoiper says "Forbidden" or won't register | Wrong credentials | Double-check SIP URI and password from config.xml |
| Zoiper registers but no audio | Static route too narrow | Make sure route is 10.2.0.0/255.255.0.0 (not just 10.2.9.0/24) |
| Landline phone stopped working | Port forwarding on VoIP WAN or SIP ALG disabled | Remove any port forwarding on VoIP WAN, keep SIP ALG enabled |
| Can't call Airtel numbers | ISP restriction | Known Airtel limitation — calls to other operators work fine |
| Incoming calls don't work | ISP-side provisioning | Contact Airtel support to verify PSTN→IMS routing for your number |
ping 10.2.9.115 fails |
Static route missing or wrong gateway | Verify the route gateway matches your VoIP WAN's DefaultGateway |
┌─────────────┐ ┌──────────────────────────────┐ ┌─────────────────┐
│ Your Phone │ │ Zyxel AOT5221ZY │ │ Airtel IMS │
│ / Zoiper │────▶│ │ │ VoIP Platform │
│ 192.168.1.x │ LAN │ Internet WAN (VLAN 100) ──────▶ Public Internet │
│ │ │ VoIP WAN (VLAN 660) ───────▶ 10.2.9.115 SIP │
│ │ │ NAT: ON (we enabled) │ │ 10.2.x.x RTP │
│ │ │ Route: 10.2.0.0/16 ──▶ │ │ │
│ │ │ │ │ │
│ Landline │ │ FXS Port ──▶ Built-in SIP ─────▶ Same servers │
│ Phone │ │ (uses SIP ALG internally) │ │ │
└─────────────┘ └──────────────────────────────┘ └─────────────────┘
- Zoiper connects through the VoIP VLAN via NAT + static route
- Landline connects directly from the router's built-in SIP client
- Both use the same Airtel IMS servers but don't conflict
An index.html GUI tool is included in the same folder. Open it in any browser to visually edit config.xml instead of editing raw XML. It supports all the settings above plus users, firewall, port forwarding, and more.
Tested on Zyxel AOT5221ZY (PMG5705-T10A) with Airtel Fiber broadband, February 2026.