Updated on 2023-09-27 GMT+08:00

Querying Allocated Softphone Numbers (V2.0.0) (queryPhone)

Scenario

This interface is invoked to query allocated softphone numbers.

Method

POST

URI

https://Domain name/apiaccess/CC-Management/v2/mobileAgent/queryPhone (For example, the domain name is service.besclouds.com.)

Request Description

Table 1 Request header parameters

No.

Parameter

Type

Mandatory or Not

Description

1

X-APP-Key

String

No

App key, which is the user ID.

2

Authorization

String

Yes

Authentication field. The format is Bearer {Value of AccessToken returned by the tokenByAkSk interface}. (A space is required after Bearer.)

Table 2 Request body parameters

No.

Parameter

Type

Mandatory or Not

Description

1

limit

String

No

Page size for pagination query. The default value is 100, indicating that 100 records are displayed on each page. This parameter is optional.

1

offset

String

No

Pagination query offset. The default value is 0, indicating no offset. This parameter is optional.

Response Description

  • Status code: 200
Table 3 Response body parameters

No.

Parameter

Type

Mandatory or Not

Description

1.1

retCode

String

Yes

Return code. The value 0 indicates success, and other values indicate failure.

1: Query failed.

2: The mobile agent information is empty.

3: The registered service address or port number is empty.

4: The limit or offset pagination data is empty.

5: The virtual call center information is empty.

1.2

retMsg

String

No

Failure cause.

1.3

result

Object

No

Result content.

1.3.1

total

Number

No

Total number of records.

1.3.2

singleRegServ

Array [Object]

No

Single mode.

1.3.2.1

regIPAddress

String

No

Registered address.

Length limit: string (50)

1.3.2.2

regPort

String

No

Registered port.

Length limit: number (5)

1.3.2.3

sipServicePort

String

No

Softphone registration port.

Length limit: number (5)

1.3.2.4

sipServiceIp

String

No

Softphone registration address.

Length limit: string (50)

1.3.3

poolRegServ

Object

No

Pool mode.

1.3.3.1

node1

Array [Object]

No

Node 1.

1.3.3.1.1

regIPAddress

String

No

Registered address.

Length limit: string (50)

1.3.3.1.2

regPort

String

No

Registered port.

Length limit: number (5)

1.3.3.1.3

sipServicePort

String

No

Softphone registration port.

Length limit: number (5)

1.3.3.1.4

sipServiceIp

String

No

Softphone registration address.

Length limit: string (50)

1.3.3.2

node2

Array [Object]

No

Node 2.

1.3.3.2.1

regIPAddress

String

No

Registered address.

Length limit: string (50)

1.3.3.2.2

regPort

String

No

Registered port.

Length limit: number (5)

1.3.3.2.3

sipServicePort

String

No

Softphone registration port.

Length limit: number (5)

1.3.3.2.4

sipServiceIp

String

No

Softphone registration address.

Length limit: string (50)

1.3.4

phone

Array [Object]

No

Softphone information list.

1.3.4.1

phoneNum

String

No

Softphone number.

Length limit: string (32)

1.3.4.2

password

String

No

Softphone password.

Length limit: string (50)

1.3.4.3

id

Number

No

Configuration ID.

1.3.4.4

status

Number

No

Registration status. 0 indicates registered and 1 indicates suspended.

1.3.4.5

remark

String

No

Remarks.

1.3.4.6

tenantId

String

No

Tenant space ID.

1.3.4.7

partdbId

String

No

Partition ID.

  • Status code: 400

    Incorrect request. Check the request path and parameters.

  • Status code: 401

    Unauthorized operation. 1. Check whether you have purchased related services. 2. Contact customer service to check the status of your account.

  • Status code: 404

    The requested content is not found. Check the request path.

  • Status code: 500

    Business failure. Check the values of parameters in the request.

Error Codes

None

Example

  • Scenario: example message

    Request header:

    x-app-key:2******************************8  
    Authorization:Bearer e******************************5  
    Content-Type:application/json

    Request parameters:

    {
    	"offset": 0,
    	"limit": 3
    }

    Response parameters:

    {
    	"retMsg": "successfully",
    	"retCode": "0",
    	"result": {
    		"total": 2,
    		"regPort": "5060",
    		"phone": [{
    			"phoneNum": "88881196",
    			"password": "****"
    		}, {
    			"phoneNum": "88881197",
    			"password": "****"
    		}],
    		"regIPAddress": "10.162.98.43"
    	}
    }