Edit

Share via


CallConnector class

Connect a UniversalCallBot to the Skype calling service.

Constructors

CallConnector(ICallConnectorSettings)

Creates a new instnace of the ChatConnector.

Methods

getData(IBotStorageContext, (err: Error, data: IBotStorageData) => void)

Reads in data from the Bot Frameworks state service.

listen()

Registers an Express or Restify style hook to listen for new messages.

onEvent((event: IEvent, cb?: (err: Error) => void) => void)

Called by the UniversalCallBot at registration time to register a handler for receiving incoming events from the calling service.

saveData(IBotStorageContext, IBotStorageData, (err: Error) => void)

Writes out data to the Bot Frameworks state service.

send(IEvent, (err: Error) => void)

Called by the UniversalCallBot to deliver workflow actions to the service.

verifyBotFramework()

Express or Resitify style middleware that verifies recieved messages are from the Bot Framework.

Constructor Details

CallConnector(ICallConnectorSettings)

Creates a new instnace of the ChatConnector.

new CallConnector(settings?: ICallConnectorSettings)

Parameters

settings
ICallConnectorSettings

(Optional) config params that let you specify the bots App ID & Password you were assigned in the Bot Frameworks developer portal.

Method Details

getData(IBotStorageContext, (err: Error, data: IBotStorageData) => void)

Reads in data from the Bot Frameworks state service.

function getData(context: IBotStorageContext, callback: (err: Error, data: IBotStorageData) => void)

Parameters

callback

(err: Error, data: IBotStorageData) => void

listen()

Registers an Express or Restify style hook to listen for new messages.

function listen()

Returns

(req: any, res: any) => void

onEvent((event: IEvent, cb?: (err: Error) => void) => void)

Called by the UniversalCallBot at registration time to register a handler for receiving incoming events from the calling service.

function onEvent(handler: (event: IEvent, cb?: (err: Error) => void) => void)

Parameters

handler

(event: IEvent, cb?: (err: Error) => void) => void

saveData(IBotStorageContext, IBotStorageData, (err: Error) => void)

Writes out data to the Bot Frameworks state service.

function saveData(context: IBotStorageContext, data: IBotStorageData, callback?: (err: Error) => void)

Parameters

callback

(err: Error) => void

send(IEvent, (err: Error) => void)

Called by the UniversalCallBot to deliver workflow actions to the service.

function send(event: IEvent, done: (err: Error) => void)

Parameters

event
IEvent
done

(err: Error) => void

verifyBotFramework()

Express or Resitify style middleware that verifies recieved messages are from the Bot Framework.

function verifyBotFramework()

Returns

(req: any, res: any, next: any) => void