Version: 1.1.0
KGZCAPS is a robust zero-configuration provisioning server for Grandstream IP phones. It provides seamless automatic configuration, supports both DHCP and static IP modes, and dynamically generates configuration files tailored to each device.
-
Zero Configuration Provisioning:
- Automatically provisions Grandstream IP phones using SIP SUBSCRIBE and NOTIFY messages.
- Supports both dynamic (DHCP) and static IP address assignment.
-
Dynamic Configuration File Generation:
- Generates XML configuration files for Grandstream IP phones.
- Configurations are customized per device based on MAC address.
-
Site-Based Organization:
- Stores configuration files and logs in site-specific directories under the
kgzcaps
folder. - Example folder structure:
/kgzcaps ├── SiteA/ ├── cfgEC74D7427228.xml ├── cfgEC74D7427229.xml └── assignment-details.csv ├── SiteB/ └── cfgEC74D7427230.xml
- Stores configuration files and logs in site-specific directories under the
-
SIP Multicast Listener:
- Listens for SIP
SUBSCRIBE
packets on multicast IP224.0.1.75
and port5060
.
- Listens for SIP
-
Secure HTTPS Configuration Delivery:
- Delivers configuration files over HTTPS (TLS 1.2).
-
Interactive and Command-Line Options:
- Interactive prompts for IP addresses, site names, and other parameters.
- Command-line arguments for automation:
-u
: IPPBX IP Address-p
: SIP Authentication Password-s
: Starting IP Address-n
: Subnet Mask-g
: Gateway IP Address-a
: Starting SIP User ID-d
: DNS IP Address-i
: IP Phone Mode (1: DHCP, 2: Static)-V
: Enable Verbose Mode
- Python 3.7 or Higher
- Dependencies:
ssl
,socket
,struct
(for network communication and HTTPS server)argparse
,ipaddress
(for input validation)
- TLS Certificates:
- Place your
tls_cert.pem
andtls_key.pem
files in the script "kgzcaps" directory.
- Place your
- Clone or download this repository.
- Place the required TLS certificate (
tls_cert.pem
) and key (tls_key.pem
) in the script directory. - Run the script:
python zero_config_provider.py
Run the script and follow the prompts to provide configuration details:
- Choose a network interface.
- Enter the site name.
- Provide the IPPBX IP, SIP user ID, authentication password, and other required parameters.
Pass arguments to automate the setup:
python zero_config_provider.py -u 192.168.1.1 -p secret -s 192.168.1.100 -a 400 -i 2 -n 255.255.255.0 -g 192.168.1.1 -d 8.8.8.8
- Start the Script:
python zero_config_provider.py
- Reboot an IP Phone:
- The phone sends a
SUBSCRIBE
request to224.0.1.75
.
- The phone sends a
- Provisioning:
- KGZCAPS assigns an extension or static IP to the phone.
- The phone fetches its configuration file via HTTPS.
-
File Not Found (404):
- Ensure the MAC address in the requested URL matches the configuration file name.
- Verify the file exists in the correct site folder.
-
Certificate Errors:
- Confirm
TLS_CERT
andTLS_KEY
paths are correct and files are present.
- Confirm
-
SIP Server Not Responding:
- Ensure the interface IP is set correctly.
- Verify multicast support on your network.