> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# answer

> Answer incoming call and set an optional maximum duration.

Answer incoming call and set an optional maximum duration.

## **Properties**

An object that accepts the following properties.

Maximum duration in seconds for the call.

Comma-separated string of codecs to offer. Valid codecs are: `PCMU`, `PCMA`, `G722`, `G729`, `AMR-WB`, `OPUS`, `VP8`, `H264`.

Username to use for SIP authentication.

Password to use for SIP authentication.

## **Examples**

### No parameters

```yaml
version: 1.0.0
sections:
  main:
    - answer: {}
```

```json
{
  "version": "1.0.0",
  "sections": {
    "main": [
      {
        "answer": {}
      }
    ]
  }
}
```

***

### Named parameter

```yaml
version: 1.0.0
sections:
  main:
    - answer:
        max_duration: 60
```

```json
{
  "version": "1.0.0",
  "sections": {
    "main": [
      {
        "answer": {
          "max_duration": 60
        }
      }
    ]
  }
}
```