> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voxeme.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Call - Live Call Control

> This api allows you to manipulate a call that is in progress -- i.e., "Live Call Control".

The actions available are:
- hangup a call
- mute/unmute a party on a call
- pause/resume the real-time audio stream provided via the [listen](https://www.jambonz.org/docs/webhooks/listen/) command
- transfer one or both parties on a call to new application(s).  Note that you can provide a different application for each party (e.g. queue the called party while the calling party dials a new number)
- play a whisper prompt to a party.
- place or remove a party that is in conference on hold.
- mute/unmute all non-moderators in a conference.

Generally, a single API call can only do one of the above operations.

The JSON payload may contain the properties described in the table below.

| property      | description | when can this be used
| ------------- |-------------| ---------------------|
| call_hook | a new application to start executing on the call for the party associated with the call_sid | at any time a call is active |
| child_call_hook | a new application to start executing on the call for the party associated with the child_call_sid | at any time a call is active and in a [dial](https://www.jambonz.org/docs/webhooks/dial/) verb|
| call_status | Change the status of the call.  Possible values are 'completed' or 'no-answer' (the former terminates an answered call, the latter a call that is ringing) | at any time a call is in-progress or ringing |
| conf_hold_status |Possible values are 'hold' or 'unhold'.  When playing a party on hold, a wait_hook can optionally be provided to play music or a message to the party while on hold.|  Only valid when the party is in a conference. |
| conf_mute_status |Possible values are 'mute' or 'unmute'.  Note that this action applies to all non-morderators in the conference, not to a single member|  Only valid when the party is in a conference. |
| listen_status | Change the status of a listen stream.  Possible values are 'pause' or 'resume'.  Pausing a stream maintains the websocket connection but will discontinue sending audio over the connection.  Resuming will start sending audio again.  This may be useful, for example, when a caller is providing confidential information that you do not want to appear in a recording. | only when a listen command is active on the call (may be nested in an active dial command) | 
| mute_status | Mute or unmute a call that is currently in a Dial verb.  Possible values are 'mute' or 'unmute'. Either party in a call may be modified, depending on the call_sid provided in the path of the request-uri. | only when a dial command is currently active on a call |
| whisper | Play a mid-call whisper prompt to one of the parties on a call in progress.  The whisper prompt is provided in a play or say verb, as shown in the examples below.  The whisper may be played to either party on the call, depending on the call_sid provided in the path of the request-uri. The other party is briefly placed on hold while the prompt is played, and then reconnected to the other party afterwards.| only when a dial command is currently active on the call |
| wait_hook | A relative or absolute url that can be supplied when placing a party that is in conference on hold.| Only when putting a party on conference hold |

The call_status, listen_status, and mute_status properties are mutually exclusive -- only one may be provided in the same request.

The whisper property may be provided alone, or together with a listen_status or mute_status property, in which case the whisper prompt is played after the listen_status or mute_status operation is complete.

Finally, if call_hook is provided, then call_status_hook may also optionally be included.  This is used to specify a new callback to receive call status events.

Success is indicated by a 204 response



## OpenAPI

````yaml put /v1/Accounts/{account_sid}/Calls/{call_sid}
openapi: 3.0.3
info:
  title: Voxeme API
  description: >-
    The Voxeme account-level REST API allows a user to create and manage calls,
    applications, speech credentials, carriers, and other resources that are
    associated with their account.


    ## Authentication


    The API uses Bearer authentication; i.e., a bearer token that must be
    provided in the Authorization header, e.g.


    `Authorization: Bearer 'your-api-token'`


    You can generate an api token for your account in the hosted portal.


    ## HTTP response codes


    - POST requests will return a 201 status on success and a JSON payload that
    includes a `sid` property referencing the unique identifier of the resource
    that has been created.
        
    - UPDATE and DELETE requests will return a 204 status on success with no
    body
        
    - GET requests will return a 200 response with a JSON payload
        

    ## API version


    The current version of the api is v1.
  version: 1.0.0
  contact: {}
servers:
  - url: ''
security: []
tags:
  - name: v1
    description: The current API version is v1.
  - name: Alerts
    description: >-
      Alerts are generated when some element of your configuration is not
      working properly; for instance, if you have configured a webhook that is
      unreachable, or you try to use a speech service without having configured
      speech credentials.
  - name: Applications
    description: >-
      Applications represent the call handling rules to be applied to voice
      calls either made or received by the platform. Applications can be
      created, queried, updated, and destroyed via the API.


      Applications have the following properties:


      |property|description|

      |--------|-----------|

      |account_sid|identifies the Account this application belongs to|

      |application_sid|unique identifier for the application|

      |name|user-specified name of application|

      |call_hook|web callback to invoke for new calls|

      |call_status_hook|web callback to invoke for call status notifications|

      |speech_recognizer_vendor|vendor to use for speech recognition. Default:
      google|

      |speech_recognizer_language|default language to use for speech
      recognition, if not specified in the 'gather' or 'transcribe' verbs.
      Default: en-US|

      |speech_synthesis_vendor|vendor to use for text to speech. Default:
      google|

      |speech_synthesis_voice|default voice to use for text to speech, if not
      specified in the 'say' verb. Default: en-US-Wavenet-C|
  - name: Calls
    description: >-
      Calls that are active or recently ended (within 10 minutes) can be
      retrieved and managed via the api.  


      > Note: this api should not be used to retrieve call detail records.  For
      that, please use the /RecentCalls api
  - name: RecentCalls
    description: >-
      RecentCalls represent call detail records (CDRs) that are kept in the
      database.  Currently, 30 days of CDRs are retained in the time-series
      database.
  - name: SpeechCredentials
    description: >-
      SpeechCredentials represent AWS or Google tokens that are associated with
      your account for use in speech synthesis and recognition operations.


      > Note: you are currently restricted to a max of two SpeechCredentials -
      one for AWS and one for Google
  - name: VoipCarriers
    description: >-
      VoipCarriers represent SIP trunking providers that are associated with
      your account for use in placing and receiving PSTN calls.
  - name: SipGateways
    description: >-
      A SipGateway represents a single IP address or range of IPs that are
      associated with a VoipCarrier (e.g. the VoipCarrier places and receives
      calls from these IPs).


      When you create a VoipProvider, you need to also add the SipGateways for
      that provider in order for incoming calls to be properly classified and
      for outbound calls to be properly routed.
paths:
  /v1/Accounts/{account_sid}/Calls/{call_sid}:
    parameters:
      - name: account_sid
        in: path
        required: true
        schema:
          type: string
          example: 5f8e8f60-4771-44cb-92a6-94ea66df0450
      - name: call_sid
        in: path
        required: true
        schema:
          type: string
          example: a4941f23-66b8-4b52-b495-94192adee7ec
    put:
      tags:
        - v1
        - Calls
      summary: Update Call - Live Call Control
      description: >-
        This api allows you to manipulate a call that is in progress -- i.e.,
        "Live Call Control".


        The actions available are:

        - hangup a call

        - mute/unmute a party on a call

        - pause/resume the real-time audio stream provided via the
        [listen](https://www.jambonz.org/docs/webhooks/listen/) command

        - transfer one or both parties on a call to new application(s).  Note
        that you can provide a different application for each party (e.g. queue
        the called party while the calling party dials a new number)

        - play a whisper prompt to a party.

        - place or remove a party that is in conference on hold.

        - mute/unmute all non-moderators in a conference.


        Generally, a single API call can only do one of the above operations.


        The JSON payload may contain the properties described in the table
        below.


        | property      | description | when can this be used

        | ------------- |-------------| ---------------------|

        | call_hook | a new application to start executing on the call for the
        party associated with the call_sid | at any time a call is active |

        | child_call_hook | a new application to start executing on the call for
        the party associated with the child_call_sid | at any time a call is
        active and in a [dial](https://www.jambonz.org/docs/webhooks/dial/)
        verb|

        | call_status | Change the status of the call.  Possible values are
        'completed' or 'no-answer' (the former terminates an answered call, the
        latter a call that is ringing) | at any time a call is in-progress or
        ringing |

        | conf_hold_status |Possible values are 'hold' or 'unhold'.  When
        playing a party on hold, a wait_hook can optionally be provided to play
        music or a message to the party while on hold.|  Only valid when the
        party is in a conference. |

        | conf_mute_status |Possible values are 'mute' or 'unmute'.  Note that
        this action applies to all non-morderators in the conference, not to a
        single member|  Only valid when the party is in a conference. |

        | listen_status | Change the status of a listen stream.  Possible values
        are 'pause' or 'resume'.  Pausing a stream maintains the websocket
        connection but will discontinue sending audio over the connection. 
        Resuming will start sending audio again.  This may be useful, for
        example, when a caller is providing confidential information that you do
        not want to appear in a recording. | only when a listen command is
        active on the call (may be nested in an active dial command) | 

        | mute_status | Mute or unmute a call that is currently in a Dial verb. 
        Possible values are 'mute' or 'unmute'. Either party in a call may be
        modified, depending on the call_sid provided in the path of the
        request-uri. | only when a dial command is currently active on a call |

        | whisper | Play a mid-call whisper prompt to one of the parties on a
        call in progress.  The whisper prompt is provided in a play or say verb,
        as shown in the examples below.  The whisper may be played to either
        party on the call, depending on the call_sid provided in the path of the
        request-uri. The other party is briefly placed on hold while the prompt
        is played, and then reconnected to the other party afterwards.| only
        when a dial command is currently active on the call |

        | wait_hook | A relative or absolute url that can be supplied when
        placing a party that is in conference on hold.| Only when putting a
        party on conference hold |


        The call_status, listen_status, and mute_status properties are mutually
        exclusive -- only one may be provided in the same request.


        The whisper property may be provided alone, or together with a
        listen_status or mute_status property, in which case the whisper prompt
        is played after the listen_status or mute_status operation is complete.


        Finally, if call_hook is provided, then call_status_hook may also
        optionally be included.  This is used to specify a new callback to
        receive call status events.


        Success is indicated by a 204 response
      operationId: updateCallLiveCallControl
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                record:
                  type: object
                  properties:
                    action:
                      type: string
                      example: stopCallRecording
                    recordingID:
                      type: string
                      example: my-recording-id
                    siprecServerURL:
                      type: string
                      example: sip:srs@52.52.132.163
            example:
              record:
                action: stopCallRecording
                recordingID: my-recording-id
                siprecServerURL: sip:srs@52.52.132.163
      responses:
        '202':
          description: Transfer party to new application
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
                example: '*'
            Connection:
              schema:
                type: string
                example: keep-alive
            Content-Length:
              schema:
                type: string
                example: '8'
            Date:
              schema:
                type: string
                example: Sun, 30 May 2021 12:38:54 GMT
            Server:
              schema:
                type: string
                example: nginx/1.14.2
            etag:
              schema:
                type: string
                example: W/"8-YaBXLEiT7zQxEyDYTILfiL6oPhE"
            x-powered-by:
              schema:
                type: string
                example: Express
          content:
            text/plain:
              examples:
                Transfer party to new application:
                  value: Accepted

````