---
title: "Create call session directly"
method: GET
path: "/sessions/directly"
tags: ["Call Session"]
---

# Create call session directly

`GET /sessions/directly`

Create call session directly.

## Query parameters

- `extension_number` string, required — The extension number.
- `password` string, required — The extension password.
- `domain` string, required — The SIP domain of tenant. It is usually a fully qualified domain name (FQDN). If there is no FQDN, you can also use the IP address of the PBX server as the SIP domain. The SIP domain name is only used for SIP message authentication and does not require analysis.
- `caller` string, required — The caller number of the call.
- `caller_display_name` string — The caller display name of the call.
- `callee` string, required — The callee number of the call.
- `send_sdp` boolean, required — Whether to send sdp packets.
- `trunk` string — The name of the trunk.
- `rewrite_from` string — When call through the trunk specified by `trunk`, change the user part in the `FROM` header to specified value.
- `rewrite_pai` string — When call through the trunk specified by `trunk`, change the user part in the `P-Asserted-Identity` header to specified value.
- `rewrite_rpi` string — When call through the trunk specified by `trunk`, change the user part in the `Remote-Party-ID` header to specified value.
- `user_data` string — The user context of the call.
- `target` string — The target address.
- `target_instance_id` string — The target instance ID.
- `target_extension_number` string — The target extension number.
- `additional_header` 'ANSWER_MODE' | 'CALL_INFO' | 'ALERT_INFO_AUTO_ANSWER_DELAY0' | 'ALERT_INFO_AUTO_ANSWER' | 'ALERT_INFO_INTERCOM' — Specifies whether to add an additional SIP header (RFC 5373) to the INVITE SIP message. The possible values are: - `ANSWER_MODE`: Adds the `Answer-Mode` header to the INVITE SIP message. - `CALL_INFO`: Adds the `Call-Info` header with `answer-after=0` to the INVITE SIP message. - `ALERT_INFO_AUTO_ANSWER_DELAY0`: Adds the `Alert-Info` header with `info=alert-autoanswer;delay=0` to the INVITE SIP message. - `ALERT_INFO_AUTO_ANSWER`: Adds the `Alert-Info` header with `info=Auto Answer` to the INVITE SIP message. - `ALERT_INFO_INTERCOM`: Adds the `Alert-Info` header with `info=intercom` to the INVITE SIP message.
- `header_direction` 'CALLER' | 'CALLEE' | 'ALL' — Specifies which party of the call should receive the `additional_header`, if the `additional_header` is not specified, this parameter will be ignored. The possible values are: - `CALLER`: Adds the specified header in `additional_header` to the INVITE SIP message sent to the caller. - `CALLEE`: Adds the specified header in `additional_header` to the INVITE SIP message sent to the callee. - `ALL`: Adds the specified header in `additional_header` to the INVITE SIP messages sent to both the caller and callee.

## Response `201`

OK

- object
  - `id` string — The unique ID of the resource.

## Other responses

- `4XX` — Error

---

[API](https://skmtc.net/portsip/apis/portsip-pbx-rest-api.md) · [All operations](https://skmtc.net/portsip/apis/portsip-pbx-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/portsip/portsip-pbx-rest-api/revisions/577415d4a3d5/schema)
