]> git.defcon.no Git - hermes/blobdiff - doc/api-nodes.txt
Ooops on last commit. forgot to include a majority of the changes...
[hermes] / doc / api-nodes.txt
index 9d0e347bf43ca577530cc9a1f778ecf5f763761b..19dfa06e18f6184c4e8561896a1bf6c6207c56d3 100644 (file)
@@ -231,6 +231,41 @@ alias/remove?alias=foo@bar.bz
 
        Returns 'invalid' with 'cause' = 'address' if the given alias is not a
        valid SIP adress.
+domain/list
+       Returns a list of configured and valid domains. May return an empty
+       list if no domains are configured for kamailio. No node is provided
+       to add domains, this is not a task for Hermes, but a kamailio
+       configuration task.
+
+       Returns 'failed' on database errors.
+
+domain/get_servers?domain=bar.bz
+       Provides the default registrar/proxy/provisioning server information
+       for the given domain.
+
+       Returns 'ok' with 'servers' set to a kvp-set on success, containing:
+       'registrar', 'r_port', 'proxy', 'p_port', 'prov_url'.
+
+       Returns 'failed' with 'cause' = 'nonexistant' if lookup of data for
+       given domain results in an empty set (not configured).
+
+domain/set_servers?domain=bar.bz&registrar=server.bar.bz&r_port=5060&proxy=proxy.bar.bz&p_port=5060&prov_url=http://server.bar.bz/hermes/prov
+       Sets the server data for the given domain. All of these parameters
+       are required: 'domain', 'registrar', 'r_port', 'proxy', 'p_port', 'prov_url'.
+       If no defaul server data is defined, the configuration is added.
+       If server configuration existed, the default data is updated.
+
+       Returns 'ok' with 'servers' set as domain/get_servers on success.
+
+       Returns 'failed' with 'cause' set to 'cause' set to 'parameters'
+       if one of these is true:
+               * Missing parameters
+               * One or more NULL/empty parameters
+               * Non-numeric values for port-numbers.
+       If you need to determine which of these triggered, the
+       'description' contains a text describing the actual fail.
+
+       Return 'failed' with 'cause' = 'error' on database failure.
 
 BUGS:
 ---------------------