Represents an AGI server instance

Hierarchy

  • EventEmitter
    • AsteriskGatewayInterface

Constructors

Properties

Methods

Constructors

  • Constructs a new instance of the object

    Parameters

    • port: number = 3000
    • ip: string = '0.0.0.0'
    • maximumListeners: number = 20

    Returns AsteriskGatewayInterface

Properties

ip: string = '0.0.0.0'
port: number = 3000

Methods

  • Event that is emitted when a new AGI channel has been established and is ready for interaction

    Parameters

    • event: "channel"
    • listener: ((channel) => void)
        • (channel): void
        • Parameters

          Returns void

    Returns this

  • Event that is emitted when the server encounters and error

    Parameters

    • event: "error"
    • listener: ((error) => void)
        • (error): void
        • Parameters

          • error: any

          Returns void

    Returns this

  • Event that emitted when the server is closed and stopped

    Parameters

    • event: "close"
    • listener: (() => void)
        • (): void
        • Returns void

    Returns this

  • Starts the AGI server

    Returns Promise<void>

  • Stops the AGI server

    Returns Promise<void>