> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.jambonz.org/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.jambonz.org/_mcp/server.

# New Call

GET https://{yourserver}/webhooks/call

This webhook is sent when a new call is created on the platform, it is configured at the appplication level

Reference: https://docs.jambonz.org/reference/webhooks/call-hook-get

## Authentication

- `Authorization` header (basic auth, required) — Basic authentication of the form `Basic <base64(username:password)>`.

## Request

### Query parameters

- `call_sid` (string, required) — a unique identifier for the call.
- `application_sid` (string, required) — a unique identifier for the jambonz application controlling this call
- `account_sid` (string, required) — a unique identifier for the jambonz account associated with the application
- `direction` (enum, required) — the direction of the call: * `inbound` - The call was originated outside jambonz * `outbound` - The call was originated by jambonz
  - Allowed values: `inbound`, `outbound`
- `from` (string, required) — the calling party number
- `to` (string, required) — the called party number
- `caller_name` (string, required) — the caller name, if known
- `call_status` (enum, required) — current status of the call: * `trying` - a new incoming call has arrived or an outbound call has just been sent * `ringing` - a 180 Ringing response has been sent or received * `early-media` - an early media connection has been established prior to answering the call (183 Session Progress) * `in-progress` - call has been answered * `completed` - an answered call has ended * `failed` - a call attempt failed * `busy` - a call attempt failed because the called party returned a busy status * `no-answer` - a call attempt failed because it was not answered in time
  - Allowed values: `trying`, `ringing`, `early-media`, `in-progress`, `completed`, `failed`, `busy`, `no-answer`
- `sip_status` (double, required) — the most recent sip status code received or generated for the call

## Response

### 200

Return a 200 containing a JSON payload consisting of an array of verbs

## Examples

**Request**

```json
{}
```

**Response**

```json
{}
```

**SDK Code**

```python
import requests

url = "https://{yourserver}/webhooks/call"

querystring = {"call_sid":"CA1234567890abcdef1234567890abcdef","application_sid":"APabcdef1234567890abcdef1234567890","account_sid":"ACabcdef1234567890abcdef1234567890","direction":"inbound","from":"+14155551234","to":"+14155556789","caller_name":"John Doe","call_status":"ringing","sip_status":"100"}

payload = {}
headers = {
    "Content-Type": "application/json"
}

response = requests.get(url, json=payload, headers=headers, params=querystring, auth=("<username>", "<password>"))

print(response.json())
```

```javascript
const url = 'https://{yourserver}/webhooks/call?call_sid=CA1234567890abcdef1234567890abcdef&application_sid=APabcdef1234567890abcdef1234567890&account_sid=ACabcdef1234567890abcdef1234567890&direction=inbound&from=%2B14155551234&to=%2B14155556789&caller_name=John+Doe&call_status=ringing&sip_status=100';
const credentials = btoa("<username>:<password>");

const options = {
  method: 'GET',
  headers: {
    Authorization: `Basic ${credentials}`,
    'Content-Type': 'application/json'
  },
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://{yourserver}/webhooks/call?call_sid=CA1234567890abcdef1234567890abcdef&application_sid=APabcdef1234567890abcdef1234567890&account_sid=ACabcdef1234567890abcdef1234567890&direction=inbound&from=%2B14155551234&to=%2B14155556789&caller_name=John+Doe&call_status=ringing&sip_status=100"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("GET", url, payload)

	req.SetBasicAuth("<username>", "<password>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://{yourserver}/webhooks/call?call_sid=CA1234567890abcdef1234567890abcdef&application_sid=APabcdef1234567890abcdef1234567890&account_sid=ACabcdef1234567890abcdef1234567890&direction=inbound&from=%2B14155551234&to=%2B14155556789&caller_name=John+Doe&call_status=ringing&sip_status=100")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request.basic_auth("<username>", "<password>")
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://{yourserver}/webhooks/call?call_sid=CA1234567890abcdef1234567890abcdef&application_sid=APabcdef1234567890abcdef1234567890&account_sid=ACabcdef1234567890abcdef1234567890&direction=inbound&from=%2B14155551234&to=%2B14155556789&caller_name=John+Doe&call_status=ringing&sip_status=100")
  .basicAuth("<username>", "<password>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://{yourserver}/webhooks/call?call_sid=CA1234567890abcdef1234567890abcdef&application_sid=APabcdef1234567890abcdef1234567890&account_sid=ACabcdef1234567890abcdef1234567890&direction=inbound&from=%2B14155551234&to=%2B14155556789&caller_name=John+Doe&call_status=ringing&sip_status=100', [
  'body' => '{}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
    'auth' => ['<username>', '<password>'],
]);

echo $response->getBody();
```

```csharp
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://{yourserver}/webhooks/call?call_sid=CA1234567890abcdef1234567890abcdef&application_sid=APabcdef1234567890abcdef1234567890&account_sid=ACabcdef1234567890abcdef1234567890&direction=inbound&from=%2B14155551234&to=%2B14155556789&caller_name=John+Doe&call_status=ringing&sip_status=100");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.GET);

request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = [
  "Authorization": "Basic \(credentials)",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://{yourserver}/webhooks/call?call_sid=CA1234567890abcdef1234567890abcdef&application_sid=APabcdef1234567890abcdef1234567890&account_sid=ACabcdef1234567890abcdef1234567890&direction=inbound&from=%2B14155551234&to=%2B14155556789&caller_name=John+Doe&call_status=ringing&sip_status=100")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```