Interface CallsService


public interface CallsService
Calls Service
  • Method Details

    • get

      CallInformation get(String callId) throws ApiException
      Get information about a call

      You can retrieve information about an ongoing or completed call using a call ID. You can find the call ID of an ongoing call by viewing the response object from a callout request. You can find the call ID of a completed call by looking at your call logs in your Sinch [Dashboard](https://dashboard.sinch.com/voice/logs). Note: You can only use this method for calls that terminate to PSTN or SIP networks from an In-app call.

      Parameters:
      callId - The unique identifier of the call. This value is generated by the system. (required)
      Returns:
      CallInformation
      Throws:
      ApiException - if fails to make API call
    • manageWithCallLeg

      void manageWithCallLeg(String callId, CallLeg callLeg, CallUpdateRequest callUpdateRequest) throws ApiException
      Manage Call with `callLeg`

      This method is used to manage ongoing, connected calls. This method is only used when using the `PlayFiles` and `Say` instructions in the request body. This method uses SVAML in the request body to perform various tasks related to the call. For more information about SVAML, see the [Callback API](https://developers.sinch.com/docs/voice/api-reference/svaml/) documentation. Note: You can only use this method for calls that originate from or terminate to PSTN or SIP networks.

      Parameters:
      callId - The unique identifier of the call. This value is generated by the system. (required)
      callLeg - Specifies which part of the call will be managed. This option is used only by the `PlayFiles` and `Say` instructions to indicate which channel the sound will be played on. Valid options are `caller`, `callee` or `both`. If not specified, the default value is `caller`.<br><Warning>The `callLeg` identifier is ignored for calls that are part of a conference and calls initiated using the Callout API.</Warning> (required)
      callUpdateRequest - (optional)
      Throws:
      ApiException - if fails to make API call
    • update

      void update(String callId, CallUpdateRequest callUpdateRequest) throws ApiException
      Update a call in progress

      This method is used to manage ongoing, connected calls. This method uses SVAML in the request body to perform various tasks related to the call. For more information about SVAML, see the [Callback API](https://developers.sinch.com/docs/voice/api-reference/svaml/) documentation. This method can only be used for calls that originate from or terminate to PSTN or SIP networks.

      Parameters:
      callId - The unique identifier of the call. This value is generated by the system. (required)
      callUpdateRequest - (optional)
      Throws:
      ApiException - if fails to make API call
    • manageWithCallLeg

      void manageWithCallLeg(String callId, CallLeg callLeg, SvamlControl svamlControl) throws ApiException
      Deprecated.
      Manage Call with `callLeg`

      This method is deprecated replaced by manageWithCallLeg(String, CallLeg, CallUpdateRequest)

      Parameters:
      callId - The unique identifier of the call. This value is generated by the system. (required)
      callLeg - Specifies which part of the call will be managed. This option is used only by the `PlayFiles` and `Say` instructions to indicate which channel the sound will be played on. Valid options are `caller`, `callee` or `both`. If not specified, the default value is `caller`.<br><Warning>The `callLeg` identifier is ignored for calls that are part of a conference and calls initiated using the Callout API.</Warning> (required)
      svamlControl - (optional)
      Throws:
      ApiException - if fails to make API call
    • update

      void update(String callId, SvamlControl svamlControl) throws ApiException
      Deprecated.
      Update a call in progress

      This method is deprecated replaced by update(String, CallUpdateRequest)

      Parameters:
      callId - The unique identifier of the call. This value is generated by the system. (required)
      svamlControl - (optional)
      Throws:
      ApiException - if fails to make API call