Evo Voice

<back to all web services

NewOutgoingSession

Create a new outgoing call and process it with the specified flow. This can only be used for voice sessions. If no caller ID is specified, we will use a random one.

Requires Authentication
Requires any of the roles:Manager, SystemAdministrator
The following routes are available for this service:
POST/sessions/outgoing


export class NodeParameterMap
{
    [key:string] : NodeParameter;

    public constructor(init?: Partial<NodeParameterMap>) { (Object as any).assign(this, init); }
}


/**
* Create a new outgoing call and process it with the specified flow. This can only be used for voice sessions. If no caller ID is specified, we will use a random one.
*/
// @Api(Description="Create a new outgoing call and process it with the specified flow. This can only be used for voice sessions. If no caller ID is specified, we will use a random one.")
export class NewOutgoingSession implements IPost
{
    /**
    * The ID of the flow to use. This flow will be executed as soon as the call is answered.
    */
    // @ApiMember(Description="The ID of the flow to use. This flow will be executed as soon as the call is answered.")
    public flowId?: string;

    /**
    * The E164 number to dial, e.g. +18144043093
    */
    // @ApiMember(Description="The E164 number to dial, e.g. +18144043093")
    public numberToDial?: string;

    /**
    * The Caller ID to use. This must be the E164 number of an owned phone number
    */
    // @ApiMember(Description="The Caller ID to use. This must be the E164 number of an owned phone number")
    public callerId?: string;

    public constructor(init?: Partial<NewOutgoingSession>) { (Object as any).assign(this, init); }
}

TypeScript NewOutgoingSession 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 /sessions/outgoing HTTP/1.1 
Host: evovoice.io 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<NewOutgoingSession xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Voice.Api.Sessions">
  <CallerId>String</CallerId>
  <FlowId>String</FlowId>
  <NumberToDial>String</NumberToDial>
</NewOutgoingSession>