Evo Voice

<back to all web services

LiveAnswerCallback

The following routes are available for this service:
All Verbs/nodes/live-answer/callback
"use strict";
export class LiveAnswerCallbackTranscriptMessage {
    /** @param {{date?:string,role?:string,senderName?:string,targetName?:string,functionName?:string,functionArgs?:string,content?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    date;
    /** @type {string} */
    role;
    /** @type {string} */
    senderName;
    /** @type {string} */
    targetName;
    /** @type {string} */
    functionName;
    /** @type {string} */
    functionArgs;
    /** @type {string} */
    content;
}
export class LiveAnswerCallbackAttachment {
    /** @param {{fileName?:string,contentType?:string,uri?:string,data?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    fileName;
    /** @type {string} */
    contentType;
    /** @type {string} */
    uri;
    /** @type {string} */
    data;
}
export class LiveAnswerCallback {
    /** @param {{sessionId?:string,flowId?:string,nodeId?:string,clientId?:string,conversationId?:string,aiMinutes?:number,from?:string,to?:string,transcript?:LiveAnswerCallbackTranscriptMessage[],startDate?:string,endDate?:string,attachments?:LiveAnswerCallbackAttachment[],completed?:string,callRecordingUrl?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    sessionId;
    /** @type {string} */
    flowId;
    /** @type {string} */
    nodeId;
    /** @type {string} */
    clientId;
    /** @type {string} */
    conversationId;
    /** @type {number} */
    aiMinutes;
    /** @type {string} */
    from;
    /** @type {string} */
    to;
    /** @type {LiveAnswerCallbackTranscriptMessage[]} */
    transcript;
    /** @type {string} */
    startDate;
    /** @type {string} */
    endDate;
    /** @type {LiveAnswerCallbackAttachment[]} */
    attachments;
    /** @type {string} */
    completed;
    /** @type {string} */
    callRecordingUrl;
}
/** @typedef {number} */
export var CacheControl;
(function (CacheControl) {
    CacheControl[CacheControl["None"] = 0] = "None"
    CacheControl[CacheControl["Public"] = 1] = "Public"
    CacheControl[CacheControl["Private"] = 2] = "Private"
    CacheControl[CacheControl["MustRevalidate"] = 4] = "MustRevalidate"
    CacheControl[CacheControl["NoCache"] = 8] = "NoCache"
    CacheControl[CacheControl["NoStore"] = 16] = "NoStore"
    CacheControl[CacheControl["NoTransform"] = 32] = "NoTransform"
    CacheControl[CacheControl["ProxyRevalidate"] = 64] = "ProxyRevalidate"
})(CacheControl || (CacheControl = {}));
/** @typedef {number} */
export var RequestAttributes;
(function (RequestAttributes) {
    RequestAttributes[RequestAttributes["None"] = 0] = "None"
    RequestAttributes[RequestAttributes["Localhost"] = 1] = "Localhost"
    RequestAttributes[RequestAttributes["LocalSubnet"] = 2] = "LocalSubnet"
    RequestAttributes[RequestAttributes["External"] = 4] = "External"
    RequestAttributes[RequestAttributes["Secure"] = 8] = "Secure"
    RequestAttributes[RequestAttributes["InSecure"] = 16] = "InSecure"
    RequestAttributes[RequestAttributes["AnySecurityMode"] = 24] = "AnySecurityMode"
    RequestAttributes[RequestAttributes["HttpHead"] = 32] = "HttpHead"
    RequestAttributes[RequestAttributes["HttpGet"] = 64] = "HttpGet"
    RequestAttributes[RequestAttributes["HttpPost"] = 128] = "HttpPost"
    RequestAttributes[RequestAttributes["HttpPut"] = 256] = "HttpPut"
    RequestAttributes[RequestAttributes["HttpDelete"] = 512] = "HttpDelete"
    RequestAttributes[RequestAttributes["HttpPatch"] = 1024] = "HttpPatch"
    RequestAttributes[RequestAttributes["HttpOptions"] = 2048] = "HttpOptions"
    RequestAttributes[RequestAttributes["HttpOther"] = 4096] = "HttpOther"
    RequestAttributes[RequestAttributes["AnyHttpMethod"] = 8160] = "AnyHttpMethod"
    RequestAttributes[RequestAttributes["OneWay"] = 8192] = "OneWay"
    RequestAttributes[RequestAttributes["Reply"] = 16384] = "Reply"
    RequestAttributes[RequestAttributes["AnyCallStyle"] = 24576] = "AnyCallStyle"
    RequestAttributes[RequestAttributes["Soap11"] = 32768] = "Soap11"
    RequestAttributes[RequestAttributes["Soap12"] = 65536] = "Soap12"
    RequestAttributes[RequestAttributes["Xml"] = 131072] = "Xml"
    RequestAttributes[RequestAttributes["Json"] = 262144] = "Json"
    RequestAttributes[RequestAttributes["Jsv"] = 524288] = "Jsv"
    RequestAttributes[RequestAttributes["ProtoBuf"] = 1048576] = "ProtoBuf"
    RequestAttributes[RequestAttributes["Csv"] = 2097152] = "Csv"
    RequestAttributes[RequestAttributes["Html"] = 4194304] = "Html"
    RequestAttributes[RequestAttributes["Jsonl"] = 8388608] = "Jsonl"
    RequestAttributes[RequestAttributes["MsgPack"] = 16777216] = "MsgPack"
    RequestAttributes[RequestAttributes["FormatOther"] = 33554432] = "FormatOther"
    RequestAttributes[RequestAttributes["AnyFormat"] = 67076096] = "AnyFormat"
    RequestAttributes[RequestAttributes["Http"] = 67108864] = "Http"
    RequestAttributes[RequestAttributes["MessageQueue"] = 134217728] = "MessageQueue"
    RequestAttributes[RequestAttributes["Tcp"] = 268435456] = "Tcp"
    RequestAttributes[RequestAttributes["Grpc"] = 536870912] = "Grpc"
    RequestAttributes[RequestAttributes["EndpointOther"] = 1073741824] = "EndpointOther"
    RequestAttributes[RequestAttributes["AnyEndpoint"] = 2080374784] = "AnyEndpoint"
    RequestAttributes[RequestAttributes["InProcess"] = -2147483648] = "InProcess"
    RequestAttributes[RequestAttributes["InternalNetworkAccess"] = -2147483645] = "InternalNetworkAccess"
    RequestAttributes[RequestAttributes["AnyNetworkAccessType"] = -2147483641] = "AnyNetworkAccessType"
    RequestAttributes[RequestAttributes["Any"] = -1] = "Any"
})(RequestAttributes || (RequestAttributes = {}));
export class HttpResult {
    /** @param {{responseText?:string,responseStream?:string,fileInfo?:FileInfo,virtualFile?:IVirtualFile,contentType?:string,headers?:{ [index:string]: string; },cookies?:Cookie[],eTag?:string,age?:string,maxAge?:string,expires?:string,lastModified?:string,cacheControl?:CacheControl,resultScope?:Func<IDisposable>,allowsPartialResponse?:boolean,options?:{ [index:string]: string; },status?:number,statusCode?:HttpStatusCode,statusDescription?:string,response?:Object,responseFilter?:IContentTypeWriter,requestContext?:IRequest,view?:string,template?:string,paddingLength?:number,isPartialRequest?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    responseText;
    /** @type {string} */
    responseStream;
    /** @type {FileInfo} */
    fileInfo;
    /** @type {IVirtualFile} */
    virtualFile;
    /** @type {string} */
    contentType;
    /** @type {{ [index:string]: string; }} */
    headers;
    /** @type {Cookie[]} */
    cookies;
    /** @type {string} */
    eTag;
    /** @type {?string} */
    age;
    /** @type {?string} */
    maxAge;
    /** @type {?string} */
    expires;
    /** @type {?string} */
    lastModified;
    /** @type {CacheControl} */
    cacheControl;
    /** @type {Func<IDisposable>} */
    resultScope;
    /** @type {boolean} */
    allowsPartialResponse;
    /** @type {{ [index:string]: string; }} */
    options;
    /** @type {number} */
    status;
    /** @type {HttpStatusCode} */
    statusCode;
    /** @type {string} */
    statusDescription;
    /** @type {Object} */
    response;
    /** @type {IContentTypeWriter} */
    responseFilter;
    /** @type {IRequest} */
    requestContext;
    /** @type {string} */
    view;
    /** @type {string} */
    template;
    /** @type {number} */
    paddingLength;
    /** @type {boolean} */
    isPartialRequest;
}

JavaScript LiveAnswerCallback DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /nodes/live-answer/callback HTTP/1.1 
Host: team.evovoice.io 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<LiveAnswerCallback xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Voice.Api.Nodes.AI">
  <AIMinutes>0</AIMinutes>
  <Attachments>
    <LiveAnswerCallbackAttachment>
      <ContentType>String</ContentType>
      <Data>String</Data>
      <FileName>String</FileName>
      <Uri>String</Uri>
    </LiveAnswerCallbackAttachment>
  </Attachments>
  <CallRecordingUrl>String</CallRecordingUrl>
  <ClientId>String</ClientId>
  <Completed>String</Completed>
  <ConversationId>String</ConversationId>
  <EndDate>0001-01-01T00:00:00</EndDate>
  <FlowId>String</FlowId>
  <From>String</From>
  <NodeId>String</NodeId>
  <SessionId>String</SessionId>
  <StartDate>0001-01-01T00:00:00</StartDate>
  <To>String</To>
  <Transcript>
    <LiveAnswerCallbackTranscriptMessage>
      <Content>String</Content>
      <Date>0001-01-01T00:00:00</Date>
      <FunctionArgs>String</FunctionArgs>
      <FunctionName>String</FunctionName>
      <Role>String</Role>
      <SenderName>String</SenderName>
      <TargetName>String</TargetName>
    </LiveAnswerCallbackTranscriptMessage>
  </Transcript>
</LiveAnswerCallback>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CustomHttpResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types" />