SIP-users (sipusers)
Overview
Manages telephony provider accounts.
The account password (the 'pwd' field) is only given to administrators when reading and is not given to other users with roles that authorize them to read 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 be issued. |
|
|
The maximum number of resources in the list. |
|
|
The sort order of the resources in the list. |
|
|
Conversion to flat form of composite fields. |
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"
}
}
]
Obtaining SIP user data
Request
Name | Type | Description |
---|---|---|
|
|
A list of fields to output. |
|
|
Conversion to flat form of composite fields. |
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"
}
}
Changing 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"
}
}
Searching for SIP user ID
Searches the resource for the specified key, returns the identifier(s) to build the endpoint.
Key fields to search for: id, login, phonenumber
Request
LOOKUP /rest/v1/uc/sipusers HTTP/1.1
Content-Type: application/json; charset=utf-8
"11"
Response
HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
[
"b6edc9b1-016c-b372-63a5-50e54938780c"
]
HTTP/1.1 404 Not Found
Content-Type: application/json; charset=utf-8
{
"error_code": 1404,
"error_message": "Lookup failed"
}