def register(self, message, host, port):
        name, toURL, params = parseAddress(message.headers["to"][0], clean=1)
        contact = None
        if message.headers.has_key("contact"):
            contact = message.headers["contact"][0]

        if message.headers.get("expires", [None])[0] == "0":
            self.unregister(message, toURL, contact)
        else:
            # XXX Check expires on appropriate URL, and pass it to registry
            # instead of having registry hardcode it.
            if contact is not None:
                name, contactURL, params = parseAddress(contact, host=host, port=port)
                d = self.registry.registerAddress(message.uri, toURL, contactURL)
            else:
                d = self.registry.getRegistrationInfo(toURL)
            d.addCallbacks(self._cbRegister, self._ebRegister,
                callbackArgs=(message,),
                errbackArgs=(message,)
            )
Tests if an endpoint name (not path) belongs to this Api.  Takes
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/protocols/sip.py/RegisterProxy.register--crossover with--dataset/ETHPy150Open flask-restful/flask-restful/flask_restful/__init__.py/Api.owns_endpoint