Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import {
- Readable,
- Writeable
- } from 'stream';
- export interface IOptions {
- host: string;
- port?: number;
- username: string;
- password: string;
- }
- export type DialHandler = (
- // stream to hear interlocutor
- input: Readable,
- // stream to play sounds
- output: Writeable,
- // function to finish the call
- finishCall: () => void
- ) => void;
- export default class SipDialer {
- constructor(options: IOptions);
- dial(
- // phone number to dial
- phoneNumber: string,
- // `dialHandler` should be called after beeps
- dialHandler: DialHandler
- );
- }
Add Comment
Please, Sign In to add comment