Set up a Phone Number

You can set up a phone number to place and receive phone calls. Phone numbers can be bought directly through Happyrobot.

Inbound Calls

After creating an assistant, and once you have bought a phone number, you can assign an assistant to a phone number.

Outbound Calls

You can use your assistants to perform outbound calls using the phone numbers you have purchased.

Webhooks

When setting up an assistant, you have the ability to configure a webhook that triggers during call initiation, termination, and failure events. The structure of the webhook payload is defined as:


{
  "type": "start" | "end",
  "call": {
    "id": "string",
    "organization_id": "string",
    "metadata": {
      "call_sid": "string" | null,
      "from": "string" | null,
      "to": "string" | null,
      "custom": "any" | null
    },
    "type": "Inbound" | "Outbound",
    "provider": "Twilio" | "Web",
    "assistant": {
      "id": "string",
      "organization_id": "string",
      "name": "string",
      "voice_id": "string",
      "extract_with_ai": [
        {
          "name": "string",
          "description": "string",
          "type": "string",
          "example": "string",
          "required": true | false
        }
      ],
      "classification_tags": [
        {
          "name": "string",
          "description": "string"
        }
      ],
      "keywords": ["string"],
      "language": "string",
      "model": "string",
      "hook": {
        "url": "string",
        "headers": [
          {
            "key": "string",
            "value": "string"
          }
        ]
      } | null,
      "work_start": "string",
      "work_end": "string",
      "timezone": "string",
      "amd": true | false,
      "amd_behavior": "Hangup" | "Continue"
    },
    "params": {
      "key": "value"
    },
    "extraction": {
      "key": "value"
    } | null,
    "classification": {
      "key": "value"
    } | null,
    "status": "Scheduled" | "Queued" | "Initiated" | "Ringing" | "In progress" | "Completed" | "Transferred" | "AMD Terminated" | "Busy" | "No answer" | "Canceled" | "Failed",
    "created": "string"
  },
  "content": "any"
}

Was this page helpful?