Rate this page:

forwardCallToPSTN

Copy URL
forwardCallToPSTN(numberTransform: 

Function

,
onEstablishedCallback:

Function

,
options:

{callerid: string}

):

void

Helper function to forward an incoming call to PSTN. The method handles numbers only in the E.164 format by default. If you need to handle a number in another format, pass an additional function (as a parameter) to the method. For more details see the GitHub repo.

Parameters

  • numberTransform:

    Function

    Optional

    Optional function used to transform dialed number to international format. This function accepts dialed number and returns phone number in E.164 format

  • onEstablishedCallback:

    Function

    Optional

    Optional function that is invoked after a call is established. Both calls (incoming and outgoing) are passed to this function

  • options:

    {callerid: string}

    Optional

    An object with a number used as the callerid that is displayed to the callee. Whitespaces are not allowed. A valid phone number that can be used to call back if required.

Returns

  • type:

    void