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

# Get SIP Registration Status

> Check the current SIP registration status of an agent in OpenSIPS

## Path Parameters

<ParamField path="agentId" type="string" required>
  The unique identifier of the agent (UUID format)
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET https://api.telzino.com/v1/agents/123e4567-e89b-12d3-a456-426614174000/sip/registration/status \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
  ```

  ```javascript JavaScript theme={null}
  const agentId = '123e4567-e89b-12d3-a456-426614174000';

  const response = await fetch(
    `https://api.telzino.com/v1/agents/${agentId}/sip/registration/status`,
    {
      headers: {
        'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
      }
    }
  );

  const result = await response.json();
  ```

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

  agent_id = '123e4567-e89b-12d3-a456-426614174000'

  response = requests.get(
      f'https://api.telzino.com/v1/agents/{agent_id}/sip/registration/status',
      headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'}
  )

  result = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "data": {
      "state": "REGISTERED_STATE",
      "stateCode": 3,
      "enabled": "yes",
      "expires": 1771788661,
      "lastRegisterSent": "2026-02-22T12:00:00Z",
      "registrationTimeout": "3600",
      "isRegistered": true,
      "errorMessage": "Successfully registered"
    }
  }
  ```

  ```json 404 theme={null}
  {
    "error": "not_found",
    "error_description": "No SIP registration configured for this agent"
  }
  ```
</ResponseExample>

## Response Fields

| Field                 | Type    | Description                                                     |
| --------------------- | ------- | --------------------------------------------------------------- |
| `state`               | string  | OpenSIPS registration state name (see table below)              |
| `stateCode`           | integer | Numeric state code (0-9)                                        |
| `enabled`             | string  | Whether the registration is enabled (`"yes"` or `"no"`)         |
| `expires`             | integer | Registration expiration timestamp                               |
| `lastRegisterSent`    | string  | Timestamp of the last REGISTER request sent                     |
| `registrationTimeout` | string  | Registration timeout value in seconds                           |
| `isRegistered`        | boolean | `true` if the agent is currently registered and receiving calls |
| `errorMessage`        | string  | Human-readable description of the current state                 |

## Registration States

| State                     | Code | Description                        |
| ------------------------- | ---- | ---------------------------------- |
| `NOT_REGISTERED_STATE`    | 0    | No REGISTER has been sent yet      |
| `REGISTERING_STATE`       | 1    | Waiting for reply (no auth)        |
| `AUTHENTICATING_STATE`    | 2    | Waiting for reply (with auth)      |
| `REGISTERED_STATE`        | 3    | Successfully registered            |
| `REGISTER_TIMEOUT_STATE`  | 4    | No reply received (timeout)        |
| `INTERNAL_ERROR_STATE`    | 5    | Error during processing            |
| `WRONG_CREDENTIALS_STATE` | 6    | Credentials rejected               |
| `REGISTRAR_ERROR_STATE`   | 7    | Error reply from registrar         |
| `NOT_FOUND`               | 0    | Registration not found in OpenSIPS |

<Info>
  A `state` of `REGISTERED_STATE` (code 3) means the agent is successfully registered and ready to receive calls. Any other state indicates an issue that may need attention.
</Info>

## Common Issues

| State                     | Likely Cause                 | Solution                                                            |
| ------------------------- | ---------------------------- | ------------------------------------------------------------------- |
| `WRONG_CREDENTIALS_STATE` | Invalid username or password | Verify SIP credentials with your provider                           |
| `REGISTER_TIMEOUT_STATE`  | Network or firewall issue    | Check that the proxy/domain is reachable, try a different transport |
| `NOT_FOUND`               | Registration not yet synced  | Wait a few seconds for the sync service to process                  |
| `INTERNAL_ERROR_STATE`    | Server-side error            | Check SIP domain and proxy configuration                            |
