Resolve an inbound call to its run envelope
const url = 'https://example.com/v1/internal/communication/resolve?caller=example&callee=example';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/v1/internal/communication/resolve?caller=example&callee=example'Given the dialed identifier, resolves the owning agent globally, loads its scenario, creates an inbound communication, and returns the shared CommunicationEnvelope hermes runs the call off. A malformed identifier → 400; no agent or scenario → 404 (no communication is created). Called by hermes inbound wiring.
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”The external party that called us (the non-voicebot number); recorded as the communication recipient. Must start with a letter or digit.
Our dialed identifier (DID/number) the call came in on; resolves the owning agent. Must start with a letter or digit.
Responses
Section titled “Responses”Resolved run envelope.
The shared run envelope, identical for both directions: the inbound resolve response and the outbound originate request body [T4]. hermes runs inbound and outbound off this one contract.
object
object
Scenario the communication runs; empty on legacy rows created before the scenario binding was recorded.
Published scenario version; null when the run used a draft.
Draft scenario version; null when the run used a published version. Exactly one of version / draft_version is set.
object
object
object
object
Call duration in seconds, measured by the execution layer; 0 until the call completes.
Whether this is a test communication.
Whether personal-data recording consent was granted for the call.
Whether a stored call recording exists for this communication.
Whether a saved call execution history exists for this communication.
object
Selects the gateway kind; the matching sid (number_sid / number_pool_sid) must be set and the other empty (422 otherwise).
object
Schedule strategy
Strategy args (free-form)
object
object
object
object
object
Required when use_alpha is true; one of the provider’s alphas.
Required when use_alpha is false; one of the provider’s numbers.
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Message content only. Provider, credentials, and sender identity resolve from the agent’s SMS settings at send time.
object
Recipient override; empty means the communication recipient.
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
The classifier a question brick classifies against.
object
Classifier version this brick classifies against. Always written explicitly; 0 means the classifier as the unversioned surface serves it.
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Target variable, written as a placeholder. Returned unwrapped in variables.
Where the value is read from — body (JSONPath in path) or header (header name in path).
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
The classifier a question brick classifies against.
object
Classifier version this brick classifies against. Always written explicitly; 0 means the classifier as the unversioned surface serves it.
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
Shares the scenario for read and copy with other accounts of the owning tenant; the read capability is still required. Outside the owning tenant the scenario reads as absent (404). Never affects list surfaces or writes.
The trunk the call routes through — the first live trunk of the call’s tenant (resolved via the communication’s account). Null when the tenant has no trunk configured; the execution layer then falls back to its default trunk.
object
The SIP From party’s resolved gateway. Direction-relative: on outbound this is our number (the outbound from); on inbound the From is the external caller, so this is null and the caller is communication.recipient.
object
The SIP To party’s resolved gateway. Direction-relative: on inbound this is our number; on outbound the To is the external party, so this is null and the callee is communication.recipient.
object
Example
{ "communication": { "direction": "inbound", "communication_status": "new", "call_status": "busy" }, "agent": { "gateway_type": "number", "status": "active" }, "scenario": { "type": "constructor" }, "caller": { "status": "active" }, "callee": { "status": "active" }}Missing or malformed identifier (must start with a letter or digit).
No agent or scenario resolvable for the identifier — rejected, no row created.