> This page is for APIs.

> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes.

# calling.call.receive

GET /

Receive inbound calls on a subscribed context

Reference: https://signalwire.com/docs/apis/relay/server/calling/calling-call-receive

## AsyncAPI Specification

```yaml
asyncapi: 2.6.0
info:
  title: calling.call.receive
  version: subpackage_callingCallReceive.calling.call.receive
  description: Receive inbound calls on a subscribed context
channels:
  /:
    description: Receive inbound calls on a subscribed context
    publish:
      operationId: subpackage_callingCallReceive.calling.call.receive-publish
      summary: calling.call.receive
      message:
        name: onCallingCallReceiveCallReceiveEvent
        title: calling.call.receive
        payload:
          $ref: '#/components/schemas/calling.call.receive_callReceiveEvent'
servers:
  production:
    url: wss://relay.signalwire.com/
    protocol: wss
    x-default: true
components:
  schemas:
    ChannelsCallingCallReceiveMessagesCallReceiveEventJsonrpc:
      type: string
      enum:
        - '2.0'
      description: JSON-RPC version. Always `2.0`.
      title: ChannelsCallingCallReceiveMessagesCallReceiveEventJsonrpc
    ChannelsCallingCallReceiveMessagesCallReceiveEventMethod:
      type: string
      enum:
        - signalwire.event
      description: Always `signalwire.event`.
      title: ChannelsCallingCallReceiveMessagesCallReceiveEventMethod
    ChannelsCallingCallReceiveMessagesCallReceiveEventParamsEventType:
      type: string
      enum:
        - calling.call.receive
      description: The event type — identifies which event this is.
      title: ChannelsCallingCallReceiveMessagesCallReceiveEventParamsEventType
    Calling.CallState:
      type: string
      enum:
        - created
        - ringing
        - answered
        - ending
        - ended
      title: Calling.CallState
    Calling.CallDirection:
      type: string
      enum:
        - inbound
        - outbound
      title: Calling.CallDirection
    CallingCallDeviceType:
      type: string
      enum:
        - phone
        - sip
        - webrtc
      title: CallingCallDeviceType
    Calling.CallDevice:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/CallingCallDeviceType'
      required:
        - type
      description: >-
        The negotiated call leg reported in call events. Discriminated on
        `type`.
      title: Calling.CallDevice
    Calling.CallReceiveParams:
      type: object
      properties:
        node_id:
          type: string
          description: >-
            Opaque identifier that, paired with `call_id`, addresses this call.
            Echo back the value you received; treat it as opaque.
        call_id:
          type: string
          description: Unique identifier of the call.
        segment_id:
          type: string
          description: >-
            Identifier of the call segment this event belongs to, for
            correlating events within the same segment of a call.
        tag:
          type: string
          description: >-
            The `tag` you set when placing the call, echoed back so you can
            match the event to your request.
        call_state:
          $ref: '#/components/schemas/Calling.CallState'
          description: The current state of the inbound call.
        direction:
          $ref: '#/components/schemas/Calling.CallDirection'
          description: >-
            Whether the call is inbound or outbound. Always present on the
            receive event.
        context:
          type: string
          description: >-
            The context the call arrived on, such as `pbx`. Always present on
            the receive event. The same value is also set as `context` at the
            top level of the event envelope, so you can read it from either
            place.
        device:
          $ref: '#/components/schemas/Calling.CallDevice'
          description: The device the call is coming in on, including the caller's number.
      required:
        - node_id
        - call_id
        - call_state
        - direction
        - context
        - device
      description: >-
        Payload of the `calling.call.receive` event: who is calling and on which
        context.
      title: Calling.CallReceiveParams
    ChannelsCallingCallReceiveMessagesCallReceiveEventParams:
      type: object
      properties:
        event_type:
          $ref: >-
            #/components/schemas/ChannelsCallingCallReceiveMessagesCallReceiveEventParamsEventType
          description: The event type — identifies which event this is.
        context:
          type: string
          description: >-
            The context the event was routed to — one of the contexts you
            subscribed to.
        event_channel:
          type: string
          description: The channel the event was delivered on, when set.
        timestamp:
          type: number
          format: double
          description: When the event was emitted, as a Unix timestamp in seconds.
        project_id:
          type: string
          description: Your project ID.
        space_id:
          type: string
          description: Your space ID.
        params:
          $ref: '#/components/schemas/Calling.CallReceiveParams'
          description: The event-specific payload.
      required:
        - event_type
        - context
        - timestamp
        - project_id
        - space_id
        - params
      description: The event envelope.
      title: ChannelsCallingCallReceiveMessagesCallReceiveEventParams
    calling.call.receive_callReceiveEvent:
      type: object
      properties:
        jsonrpc:
          $ref: >-
            #/components/schemas/ChannelsCallingCallReceiveMessagesCallReceiveEventJsonrpc
          description: JSON-RPC version. Always `2.0`.
        id:
          type: string
          description: >-
            Event id — a unique UUID generated for each event. Events are
            notifications: you do not reply to them.
        method:
          $ref: >-
            #/components/schemas/ChannelsCallingCallReceiveMessagesCallReceiveEventMethod
          description: Always `signalwire.event`.
        params:
          $ref: >-
            #/components/schemas/ChannelsCallingCallReceiveMessagesCallReceiveEventParams
          description: The event envelope.
      required:
        - jsonrpc
        - id
        - method
        - params
      description: >-
        Fires when a new call comes in that your application can answer and
        control. The payload tells you who is calling and on which context.
      title: calling.call.receive_callReceiveEvent

```