How to set DLS ContactMe request to OpenStage 40 phones using Python

This snippet sends a ContactMe DLS provisioning request to an OpenStage 40 phone at IP using Python. The phone will then contact 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 ="", data={
    "ContactMe": True,
    "dls_ip_addr": "",
    "dls_ip_port": 18443
# Response will be <Response [204]> i.e. no content

Note that dls_ip_addr may also be a hostname!