> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mycentralino.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Dettaglio Interno

> Ottieni i dettagli e la configurazione SIP di un interno

# GET /v1/extensions/{number}

Restituisce i dettagli di un interno specifico, inclusa la configurazione SIP per la registrazione.

## Parametri URL

| Parametro | Tipo   | Descrizione                |
| --------- | ------ | -------------------------- |
| `number`  | string | Extension o numero interno |

## Richiesta

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET https://api.mycentralino.com/v1/extensions/101 \
    -H "X-API-KEY: sk_mycentralino_your_api_key"
  ```

  ```php PHP theme={null}
  <?php
  $extension = '101';
  $ch = curl_init("https://api.mycentralino.com/v1/extensions/{$extension}");
  curl_setopt_array($ch, [
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_HTTPHEADER => [
          'X-API-KEY: sk_mycentralino_your_api_key'
      ]
  ]);

  $response = curl_exec($ch);
  curl_close($ch);

  $data = json_decode($response, true);
  print_r($data);
  ```

  ```python Python theme={null}
  import requests

  headers = {'X-API-KEY': 'sk_mycentralino_your_api_key'}
  extension = '201'

  response = requests.get(
      f'https://api.mycentralino.com/v1/extensions/{extension}',
      headers=headers
  )
  print(response.json())
  ```
</CodeGroup>

## Risposta

```json theme={null}
{
  "success": true,
  "data": {
    "id": 1234,
    "extension": "22123",
    "internal_number": "201",
    "description": "Mario Rossi",
    "outbound_provider": "PRINCIPALE",
    "sip_config": {
      "server": "sip.mycentralino.com",
      "stun_server": "stun.mycentralino.com",
      "username": "101",
      "port": 5060
    }
  }
}
```

## Campi sip\_config

| Campo         | Tipo   | Descrizione                       |
| ------------- | ------ | --------------------------------- |
| `server`      | string | Server SIP per la registrazione   |
| `stun_server` | string | Server STUN per NAT traversal     |
| `username`    | string | Username SIP (uguale a extension) |
| `port`        | int    | Porta SIP (5060)                  |

## Errori

### 404 - Interno non trovato

```json theme={null}
{
  "success": false,
  "error": "Interno non trovato"
}
```
