For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inSign up
Support
ReferenceGuides
ReferenceGuides
  • Core
    • Introduction to SWML
    • Expressions
    • Template functions
    • Variables
    • Errors
  • Calling
    • Overview
    • ai
    • ai_sidecar
    • amazon_bedrock
    • answer
    • cond
    • connect
    • denoise
    • detect_machine
    • enter_queue
    • execute
    • goto
    • hangup
    • join_conference
    • join_room
    • label
    • live_transcribe
    • live_translate
    • pay
    • play
    • prompt
    • receive_fax
    • record
    • record_call
    • request
    • return
    • send_digits
    • send_fax
    • send_sms
    • set
    • sip_refer
    • sleep
    • stop_denoise
    • stop_record_call
    • stop_tap
    • switch
    • tap
    • transcribe
    • transcribe_stop
    • transfer
    • unset
    • user_event
  • Messaging
    • Overview
    • execute
    • goto
    • label
    • receive
    • reply
    • request
    • return
    • switch
    • transfer
LogoLogoSignalWire Docs
Log inSign up
Support
On this page
  • Properties
  • Examples
  • No parameters
  • Named parameter
Calling

answer

|View as Markdown|Open in Claude|
Was this page helpful?
Edit this page
Previous

cond

Next
Built with

Answer incoming call and set an optional maximum duration.

Properties

answer
object

An object that accepts the following properties.

answer.max_duration
integerDefaults to 14400 seconds (4 hours)

Maximum duration in seconds for the call.

answer.codecs
string

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

answer.username
string

Username to use for SIP authentication.

answer.password
string

Password to use for SIP authentication.

Examples

No parameters

1version: 1.0.0
2sections:
3 main:
4 - answer: {}

Named parameter

1version: 1.0.0
2sections:
3 main:
4 - answer:
5 max_duration: 60