Rate this page:

forwardCallToPSTN

Copy URL
forwardCallToPSTN(numberTransform: 

Function

,
onEstablishedCallback:

Function

,
options:

{callerid: string}

):

any

Helper function to forward incoming call to PSTN. The method handles numbers only in E.164 format by default. If you need to handle a number in another format, pass 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 must return phone number in E.164 format

  • onEstablishedCallback:

    Function

    Optional

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

  • options:

    {callerid: string}

    Optional

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

Returns

  • type:

    any