This request will return the specified SIP account as a standalone trunk.
For standalone accounts (pbx is null or 0) the response is identical to the Get request. For hosted PBX accounts (pbx > 0) the credentials, provisioning and live registration state of the physical device connected to the account are resolved and returned, so the account can be consumed as if it were a standalone SIP trunk.
| URL | https://api.telecomx.dk/sip/ACCOUNT_ID/trunk | |
|---|---|---|
| Method | GET | |
| Access level | VIEWER, MANAGER or OWNER if user belongs to the customer. RESELLER if customer belongs to the reseller. ADMIN. |
|
| Param | ACCOUNT_ID | Id of the SIP account (24 hex-char string). |
| Query | expand | True to expand numbers with additional details. See description below. |
https://api.telecomx.dk/sip/1234567890ABCDEF12345678/trunk
| Json object | ||
|---|---|---|
| _id | Id | Unique SIP account id. |
| customer | Id | Id of customer the SIP account belongs to. |
| active | Boolean | True if the account is active and can handle calls. |
| name | String | Human readable name of the SIP account, or the first number of the account. |
| type | String | Type of account - always 'SIP'. |
| numbers | Array | Array of numbers that the account handles in E.164 format. |
| highRate | Boolean | True if account can be used for calling high rated numbers. |
| international | Boolean | True if account can be used for calling outside Denmark. |
| address | Id | Address the SIP account belongs to (for 112/114 emergency routing) and public phonebooks. |
| ratePlan | Id | Id of the SIP rate plan product this account should be invoiced by. |
| newRatePlan | Id | If a new rateplan should be applied at end of month, this is the plan (cannot change in mid-month). |
| parentSipAccount | Id | Id of another SIP account. If set, rating calls made on this account is made as if the calls were made on the other account. |
| pbx | Number | Id of hosted PBX cluster to use, null or 0 if not part of hosted PBX. |
| notes | String | Notes about the SIP account, only visible to RESELLER and ADMIN. |
| custom | Object | Custom data that 3rd parties may append, max. 4Kb. |
| status | String | 'ON' if the SIP client is connected/reachable, 'OFF' if unreachable. For hosted PBX accounts this reflects the connected device's registration. |
| sipServer | String | IP address of the SIP server currently handling this SIP account. Only visible for ADMIN. Standalone only - omitted for hosted PBX accounts. |
| userAgent | String | The latest user agent string received from the SIP client. For hosted PBX accounts, from the connected device. |
| contact | String | The latest registration contact string as received from the SIP client. For hosted PBX accounts, from the connected device. |
| connection | String | Method for the SIP client to connect: IP_AUTH - Calls are sent to the fixed IP address and port, client must use authentication to initiate outbound calls, and can only do so from the fixed IP address. IP_AUTH_REG - Client must be at the fixed IP address, must register to receive calls and must use authentication to initiate outbound calls. IP - Calls are sent to the fixed IP address and port, and outbound calls must be made from the fixed IP address - no authentication is required (Lync mode). COUNTRY_AUTH_REG - client must register to make and receive calls, and client must come from an IP address in one of the selected countries. Standalone only - omitted for hosted PBX accounts. |
| username | String | Standalone: 16 character auto-generated string (change with the resetCredentials API call). Hosted PBX: 32 character SIP username of the connected device. |
| password | String | Standalone: 16 character auto-generated string (change with the resetCredentials API call). Hosted PBX: 32 character SIP password of the connected device. |
| ipAddress | String | Standalone: IP address the SIP client must originate from and calls are sent to if connection is not COUNTRY_AUTH_REG. Hosted PBX: the connected device's public IP address (may be null). |
| localIpAddress | String | Hosted PBX only. The connected device's local/LAN IP address (may be null). |
| port | Integer | Port that calls are sent to if connection is IP or IP_AUTH, default 5060. Standalone only - omitted for hosted PBX accounts. |
| countries | String | Comma list of ISO3166 2 char country codes from where the SIP client may register, if connection is COUNTRY_AUTH_REG. Standalone only - omitted for hosted PBX accounts. |
| clipSA | Boolean | True if SIP client may present any phone number, false if SIP client may only present the numbers in numbers. Standalone only - omitted for hosted PBX accounts. |
| stripDkCountryCode | Boolean | True if +45 should be stripped before sending calls to the SIP client. Standalone only - omitted for hosted PBX accounts. |
| prefixMobileOriginated | Boolean | True if calls from mobile device should be prefixed with 03 before sending it to the SIP client. Standalone only - omitted for hosted PBX accounts. |
| failover | String | E.164 number or IP address or E.164@IP to redirect to when calls cannot be delivered to the sip client. Standalone only - omitted for hosted PBX accounts. |
| alwaysFailover | Boolean | True to always use the failover. Standalone only - omitted for hosted PBX accounts. |
| registerExpire | Integer | If registration is required and the client is registered, the time in seconds until next register request must be sent. -1 if not registered, omitted if registration not required. For hosted PBX accounts, the connected device's registration expiry. |
| lastRegister | Date | Date and time of the last successful registration, kept while offline. Standalone: the SIP client's (see Get). Hosted PBX: the connected device's. Null if unknown. |
| lastRegisterIp | String | Public IP address the last successful registration came from. Null if unknown. |
| lastRegisterPort | Integer | Source port of the last successful registration. Null if unknown. |
| lastSeen | Date | Date and time (to the minute) the client/device last answered the platform's ping, from its newest 7 days of round trip time statistics. Null if it has not answered a ping in that period, always null for a Mitel DECT base. |
| invoicedUntil | Date | The date the account has been invoiced until. On or after this date the account should be invoiced again for the next period, starting on this date. |
| usageBlock | Boolean | True if highRate and international has been blocked due to high usage. Can only be unset by RESELLER or ADMIN users. |
| defaultNumber | String | Default number to present when a client presents an invalid a-number on an outbound call. Standalone only - omitted for hosted PBX accounts. |
| alwaysDefaultNumber | Boolean | If the default number must always be presented on outbound calls. |
| alwaysSecretNumber | Boolean | If outbound calls must always be presented with secret number. |
| billingCustomer | ObjectID | Alternate customer to bill this SIP account to. |
| provisioning | Object | Provisioning settings. For standalone accounts, the account's own ATA adapter settings; for hosted PBX accounts, built from the connected device. null if not set or no device is connected. |
| provisioning.macAddress | String | 12-char MAC address of the device (may be null). |
| provisioning.model | ObjectID | The model of the device (from SipPhoneModels). |
| provisioning.serial | String | Serial number - required for Grandstream devices (may be null). |
| provisioning.customConfig | String | Custom configuration data. For insertion into the generated configuration file for the device. Do not use unless absolutely needed. |
| provisioning.status.configSaved | Date | When the device configuration was last saved. |
| provisioning.status.configLoaded | Date | When the device last fetched its configuration (may be null). |
Note that properties holding no value may be omitted from the object.
For hosted PBX accounts the device is resolved by matching the account's numbers to a PBX extension and the SIP phone on that extension. If the account has no connected device yet, the credentials, provisioning and live registration fields (also lastRegister* and lastSeen) are omitted and provisioning is null. If more than one device is connected, a 409 conflict is returned (see Errors).
If expand=true, then the numbers property is modified to be an array of object with the following properties:
| number | String | The phone number in E.164 format. |
| status | String | The current status of the number: IN_USE_THIS_ACCOUNT - The number is in use IN_PORTING_THIS_ACCOUNT - The number is being ported in |
| employee | Id | Id of the employee the number is used by, if linked to an employee. |
| employeeName | String | Name of the employee or function using the number. |
| addressOverride | Id | Optional address the phone number belongs to (for 112/114 emergency routing) and public phonebooks. This overrides the address on the SIP account. |
| range | String | The number series the number belongs to, e.g. +4570305000-+4570305099. Null or omitted if the number is not part of a series. A series always moves and is removed as a whole. |
{ _id: '1234567890ABCDEF12345678', customer: '1234567890ABCDEF12345678', active: true, name: 'Hovedkonto', type: 'SIP', numbers: ['+4532444011','+4546920000','+4546925820'], highRate: true, international: true, address: '1234567890ABCDEF12345678', ratePlan: '1234567890ABCDEF12345678', newRatePlan: null, parentSipAccount: null, pbx: 1, notes: '', custom: null, invoicedUntil: '2026-09-30T22:00:00.000Z', usageBlock: false, alwaysDefaultNumber: false, alwaysSecretNumber: false, billingCustomer: null, provisioning: { model: '1234567890ABCDEF12345678', macAddress: null, serial: null, customConfig: null, voicemail: null, status: { configSaved: '2026-02-04T07:14:04.136Z', configLoaded: null } }, username: 'aS5kDfX7zReNo0FD1raJPUxGOULWuf58', password: '1DykcrAdMH9XnnUJdX4NV5skXQBMn1xm', status: 'ON', registerExpire: 220, ipAddress: null, localIpAddress: '192.168.18.8', userAgent: 'C530 IP/42.245.00.000.000', contact: 'sip:aS5kDfX7...@212.104.184.235:12647;tcxgw=62.192.160.160', lastRegister: '2026-10-13T08:15:00.123Z', lastRegisterIp: '212.104.184.235', lastRegisterPort: 12647, lastSeen: '2026-10-13T08:41:00.000Z' }
For a standalone account the response is identical to the Get request - see the example there.
| Error code | Message | Description |
|---|---|---|
| 404 | not_found | SIP account not found |
| 403 | access_denied | Insufficient access level |
| 409 | device | Account is connected to more than one device; the trunk view is only available for single-device accounts |