Suggestions

close search

SIP account

Create a new SIP account

URL: https://icc-api.stringee.com/v1/ipphonecommon

HTTP method: POST

Content-Type: application/json

Custom HTTP header: Name: X-STRINGEE-AUTH Value: JSON web token (JWT), see PHP Sample Authentication

POST data (body):

{
    "user_name": "SIP_USERNAME",
    "password": "SIP_PASSWORD",
    "stringee_user_id": "AGENT_STRINGEE_USER_ID",
    "extension": "EXTENSION_NUMBER",
}
Field Type Require Description
user_name String Yes SIP account
password String Yes Password
stringee_user_id String No Agent account ID
extension Int Yes Extension number

Response:

{
    "r": "RESULT_CODE",
    "res_create_subscriber": "RESULT_CREATE_SUBSCRIBER",
    "message": "RESULT_MESSAGE",
}
Field Type Require Description
r Int Yes Result code
msg String Yes Result message
res_create_subscriber Int No ID Subscriber if create successfully

Sample request

POST /v1/ipphonecommon HTTP/1.1
Host: https://icc-api.stringee.com
X-STRINGEE-AUTH: json_web_token
Accept: application/json

{
    "username": "common_25_777",
    "password": "123123",
    "stringee_user_id": "",
    "extension": "147741"
}

Sample response

{
    "res_create_subscriber": 121,
    "r": 0,
    "msg": "Create success"
}

List SIP account

URL: https://icc-api.stringee.com/v1/ipphonecommon

HTTP method: GET

Content-Type: application/json

Custom HTTP header: Name: X-STRINGEE-AUTH Value: JSON web token (JWT), see PHP Sample Authentication

GET parameters:

Field Type Require Description
username String No SIP username
stringee_user_id String No Agent account id
extension Int No Extension number

Response:

{
    "r": RESULT_CODE,
    "message": "RESULT_MESSAGE",
    "data": {SIP_DATA}
}
Field Type Require Description
r Int Yes Result code
message String Yes Result message
data JSON Yes List SIP account

Sample request

GET /v1/ipphonecommon HTTP/1.1
Host: https://icc-api.stringee.com
X-STRINGEE-AUTH: json_web_token
Accept: application/json

Sample response

{
    "r": 0,
    "data": {
        "rows": [
            {
                "username": "common_25_777",
                "project": 25,
                "password": "234234234123",
                "stringee_user_id": "",
                "extension": "147741"
            }
        ],
        "totalPages": 0,
        "totalCount": 0
    }
}

Delete a SIP account

URL: https://icc-api.stringee.com/v1/ipphonecommon/{sip_username}

HTTP method: DELETE

Content-Type: application/json

Custom HTTP header: Name: X-STRINGEE-AUTH Value: JSON web token (JWT), see PHP Sample Authentication

URI Parameters:

Field Type Require Description
{sip_username} String Yes The SIP username

Response:

{
    "r": "RESULT_CODE",
    "res_delete_subscriber": "RESULT_DELETE_SUBSCRIBER",
    "message": "RESULT_MESSAGE"
}
Field Type Require Description
r Int Yes Result code
res_delete_subscriber Bool No Result delete subscriber
message String No Result message

Sample request

DELETE /v1/ipphonecommon/common_25_777 HTTP/1.1
Host: https://icc-api.stringee.com
X-STRINGEE-AUTH: json_web_token
Accept: application/json

Sample response

{
    "res_delete_subscriber": true,
    "r": 0,
    "msg": "Delete success"
}

Update a SIP account

URL: https://icc-api.stringee.com/v1/ipphonecommon/{sip_username}

HTTP method: PUT

Content-Type: application/json

Custom HTTP header: Name: X-STRINGEE-AUTH Value: JSON web token (JWT), see PHP Sample Authentication

PUT data (body):

{
    "extension": "UPDATED_EXTENSION_NUMBER",
    "stringee_user_id": "UPDATED_STRINGEE_USER_ID",
    "password": "UPDATED_PASSWORD",
}
Field Type Require Description
extension Int Yes New extension number
stringee_user_id String No The stringee account ID of agent
password String Yes New password for sip phone

URI Parameters:

Field Type Require Description
{sip_username} String Yes The sip username

Response:

{
    "r": "RESULT_CODE",
    "res_update_subscriber": "RESULT_UPDATE_SUBSCRIBER",
    "message": "RESULT_MESSAGE"
}
Field Type Require Description
r Int Yes Result code
res_update_subscriber Bool No Result update subscriber
message String Yes Result message

Sample request

PUT /v1/ipphonecommon/common_25_777 HTTP/1.1
Host: https://icc-api.stringee.com
X-STRINGEE-AUTH: json_web_token
Accept: application/json

{
    "password": "234234234123",
    "stringee_user_id": "",
    "extension": "789789"
}

Sample response

{
    "res_update_subscriber": true,
    "r": 0,
    "msg": "Update success"
}