{{protocol}}://{{host}}:{{port}}/apiNote: Parameters
protocol,host,portwill be provided by Alohub. Contact to register for integration .
Every request requires a header Authorizationcontaining the API Key provided by Alohub ( contact to receive the key ):
Authorization: {{api-key}}Header | Value | Description |
|---|---|---|
|
| API Key provided by Alohub. Contact Alohub to receive the API Key |
|
| Request body format (applies to POST) |
Security: Do not share the API Key externally. Do not commit the API Key into source code. Always store it in an environment variable.
/v1.0/base/makeCallMake an outbound call (click-to-call). The system will first call the agent's IP Phone, and after the agent picks up, it will automatically call the customer's number.
Parameters | Required | Type | Description |
|---|---|---|---|
| Yes | string | The customer's phone number to call |
| Yes | string | The IP Phone code (extension) of the agent making the call |
| No | string | Transaction ID for tracking — useful for reconciliation or lookup later |
{
"phoneNumber": "0123456789",
"ipPhone": "6688",
"transactionId": "ALOHUB_3432323435545"
}curl -X POST "{{protocol}}://{{host}}:{{port}}/api/v1.0/base/makeCall" \
-H "Authorization: {{api-key}}" \
-H "Content-Type: application/json" \
-d '{
"phoneNumber": "0123456789",
"ipPhone": "6688",
"transactionId": "ALOHUB_3432323435545"
}'Suggestion: It is recommended to pass
transactionIda unique ID for each call to facilitate lookup and reconciliation with your internal system.
Lookup call history by various criteria.
/v1.0/base/searchCallV2Lookup call history version V2. Lookup detailed call information with complete details.
Recommendation: Use V2 for new integrations to receive complete call information.
{
"call_id": "20210222084953-NSOJCGOO-49278",
"source": "ipcc",
"direction": "OUTBOUND",
"call_status": "answered",
"starttime": "2024-01-13 15:00:30",
"answertime": "2024-01-13 15:00:35",
"endtime": "2024-01-13 15:05:30",
"total_duration": "300",
"holding_duration": "0",
"hangup_by": "customer",
"recording_url": "url_file.mp3",
"caller_number": "0389900xxx",
"destination_number": "888",
"transactionId": "TRANSID_1111",
"agent": "userName66"
}Field | Type | Description |
|---|---|---|
| string | Unique identifier of the call |
| string | Call source |
| string | Call direction: |
| string | Call status (see status code table) |
| string | Call start time |
| string | Call answered time |
| string | Call end time |
| string | Total call duration (seconds) |
| string | Hold time (seconds) |
| string | Party that hung up: |
| string | URL of the call recording file |
| string | Caller phone number |
| string | Receiver phone number |
| string | Transaction ID (if passed when makeCall) |
| string | User agent name handling the call |
/IPCCMedia/MP3Export.doPlay or download the call recording file. The full URL is returned in the recording_urlfield of the call lookup response.
Parameters | Required | Type | Description |
|---|---|---|---|
| Yes | string | MP3 file name (taken from |
| Yes | string | Data source, default |
# Phát trực tiếp (stream)
curl "https://{{domain}}:{{port}}/IPCCMedia/MP3Export.do?url=recording_url.mp3&source=ipcc" \
-H "Authorization: {{api-key}}"# Tải xuống file
curl -o recording.mp3 \
"https://{{domain}}:{{port}}/IPCCMedia/MP3Export.do?url=recording_url.mp3&source=ipcc" \
-H "Authorization: {{api-key}}"Note: The recording file has a storage duration depending on the service package. If long-term storage is needed, please download the file to your system.
/setting/agent/updateQueueUpdate the configuration of incoming (CALLIN) and outgoing (CALLOUT) queues for agents. Used to distribute calls to the correct group of agents.
Query Parameters:
Parameter | Required | Description |
|---|---|---|
| Yes | The agent account name that needs to update the queue |
Body Parameters:
Parameter | Required | Type | Description |
|---|---|---|---|
| Yes | string | Action: |
| Yes | array | List of incoming Queue IDs (callin). E.g.: |
| No | number | Outgoing Queue ID (callout) |
| No | array | List of extensions (IP Phones) associated with the agent |
{
"action": "EDIT",
"callinId": [1, 2],
"calloutId": 99999,
"lstExtension": ["6688"]
}curl -X POST "{{protocol}}://{{host}}:{{port}}/api/setting/agent/updateQueue?userName=userName66" \
-H "Authorization: {{api-key}}" \
-H "Content-Type: application/json" \
-d '{
"action": "EDIT",
"callinId": [1, 2],
"calloutId": 99999,
"lstExtension": ["6688"]
}'Webhook: Alohub sends real-time call events via webhook. See detailed payload, status codes, and handling methods in the Call event webhook .