This snippet sends a ContactMe
DLS provisioning request to an OpenStage 40 phone at IP 192.168.178.245
using Python. The phone will then contact 192.168.178.10
on port 18443
using HTTPS. By default (i.e. if the OpenStage 40 is not in Secure Mode, the certificate is not verified – any certificate will do!)
import requests response = requests.post("http://192.168.178.245:8085/contact_dls.html/ContactDLS", data={ "ContactMe": True, "dls_ip_addr": "192.168.178.10", "dls_ip_port": 18443 }) # Response will be <Response [204]> i.e. no content
Note that dls_ip_addr
may also be a hostname!