# SIP Settings

The SIP (Session Initiation Protocol) settings control how Cloud Voice signals and exchanges media with every SIP extension and SIP trunk on the system. To reach them, go to **PBX Settings > SIP Settings**. The tables below describe each option for reference.

:::caution
These options assume a solid understanding of the SIP protocol. Incorrect values apply system-wide and can break calling on your SIP extensions and trunks.
:::

## General

### Basic

- **SIP UDP Port**: UDP (User Datagram Protocol) port used for SIP registration. Defaults to `5060`.
- **SIP TCP Port**: TCP (Transmission Control Protocol) port used for SIP registration. Defaults to `5060`.

### Endpoint registration timers

These values apply to registrations and subscriptions that devices send in to the system.

- **Max Registration Time (s)**: Longest duration, in seconds, allowed for an incoming registration or subscription.
- **Min Registration Time (s)**: Shortest duration, in seconds, allowed for an incoming registration or subscription.
- **Qualify Frequency (s)**: How often the system sends a SIP OPTIONS packet to a device to confirm it is still reachable.

### Outbound registration timers

These values apply when the system registers outward to another SIP service.

- **Registration Attempts**: Number of registration attempts before the system gives up. Set to `0` for unlimited attempts.
- **Default Registration Time (s)**: Default registration duration, in seconds. The effective duration is the value you enter minus 10 seconds.

### Endpoint subscription timers

- **Max Subscription Time (s)**: Longest duration, in seconds, allowed for an incoming subscription.
- **Min Subscription Time (s)**: Shortest duration, in seconds, allowed for an incoming subscription.

## Codecs

A codec is the compression and decompression algorithm applied to voice packets as they travel across the network.

- **iLBC Mode**: Frame length for the iLBC codec, either **20 ms** or **30 ms**. Match this to your SIP endpoints for the best voice quality.
- **Codec Selection**: Enable and order the codecs the system offers. Available values: u-law, a-law, GSM, H264, VP8, H263, H263P, iLBC, G722, G726, SPEEX, ADPCM, G729A, MPEG4, and Opus.

:::note
- For audio calls to work in the Cloud Voice App, enable at least one of **u-law**, **a-law**, or **G722**.
- For video calls in the Cloud Voice App (available with the Cloud Voice Ultimate Plan), enable **VP8** or **H264**. We recommend enabling **VP8**, or giving it the higher priority.
:::

## TLS

- **TLS**: Turns TLS (Transport Layer Security, which encrypts SIP signaling in transit) on or off.
- **SIP TLS Port**: TLS port used for SIP registration. Defaults to `5061`.

### When the phone system acts as a client

- **TLS Connection Method**: Protocol used for outbound client connections: **TLS V1.0**, **TLS V1.2**, or **TLS V1.3**.

## Session

Use these settings to manage SIP session lifetime with session timers and to supply session-level SDP (Session Description Protocol) metadata for media negotiation.

### Session timer

- **Session Timer**: Chooses how the "timer" value is advertised:
  - **No**: Omit the value from every header.
  - **Supported**: Include it in the Supported header.
  - **Required**: Include it in the Required header.
  - **Forced**: Include it in both the Supported and Required headers.
- **Session-Expires (s)**: Maximum session refresh interval, in seconds.
- **Min-SE (s)**: Minimum session refresh interval, in seconds. This value cannot be lower than 90.

### Session parameters

- **Session Name**: Value written to the SDP `s=` line. If left blank, the system uses `Session`.
- **Session Owner**: Username of the SDP session originator, used in the `<username>` portion of the SDP `o=` line. Spaces are not allowed. If left blank, the system uses `-`, which represents an anonymous originator.

## QoS

Quality of Service determines whether voice and media traffic gets priority over lower-priority traffic when network capacity is limited, helping to prevent delayed or dropped packets on your calls. Assign priority by setting the values below.

### Type of Service (ToS)

- **ToS SIP**: Type of Service for SIP packets.
- **ToS Audio**: Type of Service for RTP (Real-time Transport Protocol, the stream that carries the actual voice audio) audio packets.
- **ToS Video**: Type of Service for RTP video packets.

### Class of Service (CoS)

- **Cos SIP**: Class of Service for SIP packets.
- **Cos Audio**: Class of Service for RTP audio packets.
- **Cos Video**: Class of Service for RTP video packets.

## T.38

T.38 is the standard for carrying fax reliably over an IP network. Adjust these settings if T.38 fax is not working correctly.

- **T.38 Max BitRate**: Maximum bit rate for T.38 fax.
- **No T.38 Attributes in re-INVITE SDP**: When enabled, the SDP re-INVITE packet omits T.38 attributes.
- **Error Correction Mode**: Turns fax error correction on or off.

## Advanced

### Incoming Caller ID / DID retrieval

A DID (Direct Inward Dialing) number is the specific external phone number a caller dialed to reach your system. These two settings tell the system which SIP header to read each value from on incoming calls.

- **Get Caller ID From**: SIP header field the system reads the Caller ID from: **From**, **Contact**, **Remote-Party-ID**, **P-Asserted-Identity**, or **P-Preferred-Identity**.
- **Get DID From**: SIP header field the system reads the DID from: **To**, **Invite**, **Diversion**, **Remote-Party-ID**, **P-Asserted-Identity**, **P-Preferred-Identity**, or **P-Called-Party-ID**.

:::note
If you select **Remote-Party-ID** but the SIP trunk does not support it, the system falls back to reading the DID from the **Invite** header.
:::

### SIP request header

- **User Agent**: User agent string included on outbound SIP packets.
- **Internal Alert Info**: Alert info text added to the Alert-Info header of INVITE requests for internal calls. Receiving phones inspect this header to decide which ringtone to play.

### Other options

- **Support Message Request**: Controls whether the system supports the SIP MESSAGE request.
- **Inband Progress**: Applies to every extension. When enabled, the system sends a 183 Session Progress and immediately streams ringing as audio; when disabled, it sends a 180 Ringing without audio.
- **Enable uaCSTA Connection**: Allows a user agent Computer Supported Telecommunications Application (uaCSTA) to control an IP phone remotely through Cloud Voice App CTI (Computer Telephony Integration, which lets a computer application dial and control calls on a desk phone). The phone must support the uaCSTA standard.
- **Extension Forwarding with Diversion SIP Header**: When enabled, you choose which forwarding destination types (extension, queue, and ring group) cause the `Diversion` header to be added. If an extension forwards a call to one of the chosen destination types, the INVITE request carries the `Diversion` header to tell the destination which extension the call came from.
- **P Asserted Identity**: When enabled, transferred or forwarded calls carry a `P Asserted Identity` field in the SIP header to convey the identity of the call initiator.
- **Call Connection Assurance**: Choose the extensions that need call connection assurance to avoid a no-audio problem on the first Cloud Voice App call after a computer restart, which some browser or OS environments cause. When such an extension signs in to the Cloud Voice App, the system places a call that the client answers and hangs up automatically, priming audio for later calls.

:::note
- **Inband Progress** is a global setting; to change it, contact Cloud Voice support to apply a custom configuration file.
- **P Asserted Identity** applies to internal calls only. For external calls, see the [SIP header settings for the trunk](/pbx/administrator-guide/sip-trunk-settings/#topic_pyd_f3t_2fb__section_vzt_bgk_3mb).
- The **Call Connection Assurance** priming call leaves no record on the system or the client, and the extension user never notices it.
:::
