SIP users (sipusers)
Overview
Manages telephony provider accounts.
The account password (the 'pwd' field) is returned only to administrators and is not returned to other users with roles granting read access to the collection.
Requests
| HTTP verb | Endpoint | Description |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Creating a new SIP user
Request
Field description: sipuser entity
POST /rest/v1/uc/sipusers HTTP/1.1
Content-Type: application/json; charset=utf-8
sipuser entity
Response
Field description: sipuser entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "0007f945-016c-b373-2772-50e54938780c",
"name": "sip4",
"login": "sip4",
"pwd": "pwd_sip4",
"phonenumber": "14",
"reg": 1,
"devices": [],
"iduser": "00000000-0000-0000-0000-000000000000",
"lic": {
"devices": 2
},
"timezone": "default",
"opts": {
"title": "",
"comment": "",
"ap_device_model": "Yealink SIP-T21P_E2",
"ap_mac_address": "805EC0D525CA",
"calltimesec": 30,
"dlgtimesec": 0,
"trunks": -1,
"maxexpires": 3600,
"minexpires": 30,
"modextin": "",
"modextout": "",
"parallel": ["898765432100"]
},
"ext": {
"ct": "2019-08-21T09:12:44.14Z",
"lwt": "2019-08-21T09:12:44.14Z"
}
}
Getting the list of SIP users
Request
| Name | Type | Description |
|---|---|---|
|
|
Filter by field values. |
|
|
List of fields to output. Available fields for output: id, name, login, phonenumber, reg, iduser, opts.modextin, opts.modextout, opts.trunks, ext.lwt, ext.ct. |
|
|
Offset in the list of resources to output. |
|
|
Maximum number of resources in the list. |
|
|
Sorting order of resources in the list. |
|
|
Transformation of composite fields to flat form. |
GET /rest/v1/uc/sipusers?offset=0&limit=2 HTTP/1.1
Response
Field description: sipuser entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
[
{
"id": "b6edc9b1-016c-b372-63a5-50e54938780c",
"name": "SIP1-{D}",
"login": "sip1",
"phonenumber": "11",
"reg": 1,
"iduser": "00000000-0000-0000-0000-000000000000",
"opts": {
"trunks": -1,
"modextin": "",
"modextout": "",
"parallel": ["89274137274","*9311"]
},
"ext": {
"ct": "2019-08-21T09:11:54.20Z",
"lwt": "2019-08-21T09:11:54.20Z"
}
},
{
"id": "610e09f3-016c-b372-b4da-50e54938780c",
"name": "sip2",
"login": "SIP2-{D}",
"phonenumber": "12",
"reg": 1,
"iduser": "00000000-0000-0000-0000-000000000000",
"opts": {
"ap_mac_address": "805EC0D524E1",
"trunks": -1,
"modextin": "",
"modextout": "",
"parallel": []
},
"ext": {
"ct": "2019-08-21T09:12:14.81Z",
"lwt": "2019-08-21T09:12:14.81Z"
}
}
]
Getting SIP user data
Request
| Name | Type | Description |
|---|---|---|
|
|
List of fields to output. |
|
|
Transformation of composite fields to flat form. |
GET /rest/v1/uc/sipusers/0007f945-016c-b373-2772-50e54938780c HTTP/1.1
Response
Field description: sipuser entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "0007f945-016c-b373-2772-50e54938780c",
"name": "sip4",
"login": "sip4",
"pwd": "pwd_sip4",
"phonenumber": "14",
"reg": 1,
"devices": [],
"iduser": "00000000-0000-0000-0000-000000000000",
"lic": {
"devices": 2
},
"timezone": "default",
"opts": {
"title": "",
"comment": "",
"ap_device_model": "Yealink SIP-T21P_E2",
"ap_mac_address": "805EC0D525CA",
"calltimesec": 30,
"dlgtimesec": 0,
"trunks": -1,
"maxexpires": 3600,
"minexpires": 30,
"modextin": "",
"modextout": "",
"parallel": ["898765432100"]
},
"ext": {
"ct": "2019-08-21T09:12:44.14Z",
"lwt": "2019-08-21T09:12:44.14Z"
}
}
Modifying SIP user data
Fields prohibited for modification: id
Request
Field description: sipuser entity
PATCH /rest/v1/uc/sipusers/0007f945-016c-b373-2772-50e54938780c HTTP/1.1
Content-Type: application/json; charset=utf-8
sipuser entity
Response
Field description: sipuser entity
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "0007f945-016c-b373-2772-50e54938780c",
"name": "sip4",
"login": "sip4",
"pwd": "pwd_sip4",
"phonenumber": "14",
"reg": 1,
"devices": [],
"iduser": "00000000-0000-0000-0000-000000000000",
"lic": {
"devices": 2
},
"timezone": "default",
"opts": {
"title": "",
"comment": "",
"ap_device_model": "Yealink SIP-T21P_E2",
"ap_mac_address": "805EC0D525CA",
"calltimesec": 30,
"dlgtimesec": 0,
"trunks": -1,
"maxexpires": 3600,
"minexpires": 30,
"modextin": "",
"modextout": "",
"parallel": ["898765432100"]
},
"ext": {
"ct": "2019-08-21T09:12:44.14Z",
"lwt": "2019-09-07T16:25:03.01Z"
}
}