Constructors

Methods

  • Initiate an outbound phone call.

    Creates a CallRecord in 'initiated' state, delegates to the provider to place the call, and returns the internal call ID.

    Parameters

    • params: {
          toNumber: string;
          fromNumber?: string;
          mode?: CallMode;
          message?: string;
          seedId?: string;
          providerName?: VoiceProviderName;
      }
      • toNumber: string
      • Optional fromNumber?: string
      • Optional mode?: CallMode
      • Optional message?: string
      • Optional seedId?: string
      • Optional providerName?: VoiceProviderName

    Returns Promise<CallRecord>

  • Handle an inbound call based on the configured policy. Creates a CallRecord if the call is accepted.

    Parameters

    • params: {
          providerCallId: string;
          provider: VoiceProviderName;
          fromNumber: string;
          toNumber: string;
          seedId?: string;
      }
      • providerCallId: string
      • provider: VoiceProviderName
      • fromNumber: string
      • toNumber: string
      • Optional seedId?: string

    Returns null | CallRecord