-
Notifications
You must be signed in to change notification settings - Fork 6
话单CDR查询接口
jiang.tao edited this page May 6, 2023
·
12 revisions
简要描述:
- 通过调用API接口获取呼叫记录,分页查询。
- 每个IP地址2秒钟内只限拉取一次cdr
- 只允许,查询最近15天内的cdr;请及时查询,并自行落库
请求方式:
- URL:
https://api.nxcloud.com/api/voiceSms/getSipCdr - Method:
POST参数不要传body,用form表单方式提交 - Content-Type:
application/x-www-form-urlencoded
请求参数说明:
| 参数名 | 必选 | 类型 | 说明 |
|---|---|---|---|
| appkey | 是 | string | 审批单appkey,可以在审批单列表中获取 |
| secretkey | 是 | string | 审批单secretkey,可以在审批单列表中获取 |
| username | 否 | string | 话机用户名 |
| start_time | 是 | string | 呼叫起始时间 区间开始,格式为yyyy-MM-dd HH:mm:ss 2018-12-10 10:00:00 |
| end_time | 是 | string | 呼叫起始时间 区间结束,格式为yyyy-MM-dd HH:mm:ss 2018-12-10 20:00:00 最多查询15天内的通话记录 |
| direction | 否 | string | 呼叫方向,0为呼入,1为呼出 |
| page_size | 是 | string | 每页数据量,范围:1<=x<=1000 |
| page | 是 | string | 查询第几页,从1开始 |
注意:username 如果为空,就查询当前注册用户下的所有通话记录,如果需要查询某个话机的通话记录,就填入该话机的用户名。
查询的起始时间和结束时间,跨度不允许超过24小时。
请求示例:
curl --location --request POST 'https://api.nxcloud.com/api/voiceSms/getSipCdr' \
--data-urlencode 'appkey=asdf' \
--data-urlencode 'secretkey=qwer' \
--data-urlencode 'username=asdf' \
--data-urlencode 'start_time=2018-12-10 10:00:00' \
--data-urlencode 'end_time=2018-12-10 10:00:01' \
--data-urlencode 'direction=1' \
--data-urlencode 'page_size=10' \
--data-urlencode 'page=1'返回结果示例:
**成功返回**
{
"code": "1",
"info": {
"total": 5,
"page": 1,
"pageSize": 2,
"rows": [
{
"phone": "81314382782",
"direction": "0",
"hangup_cause": "NORMAL_CLEARING",
"answer_time": "2019-01-25 12:41:57",
"country_code": "62",
"id": 636597,
"sipid": 1055014,
"duration": 0,
"username": "6282215699804",
"mobile_name": "name",
"end_time": "2019-01-25 12:42:26",
"effective_called_number": "626281314382782",
"start_time": "2019-01-25 12:42:26",
"orderid": "FLNK-FLNK-maqKSi_IDW0hXGl-FO0xjE_FLNK-1548391358819-QgNuzM",
"record_url": null,
"show_phone": "6282215699804"
},
{
"phone": "878828666",
"direction": "0",
"hangup_cause": "NORMAL_CLEARING",
"answer_time": "2019-01-25 12:40:42",
"country_code": "62",
"id": 636600,
"sipid": 1055015,
"duration": 0,
"username": "6282215699803",
"mobile_name": "name",
"end_time": "2019-01-25 12:42:29",
"effective_called_number": "626287882866266",
"start_time": "2019-01-25 12:42:29",
"orderid": "FLNK-FLNK-vpHnoi_ID2l3NgE-YPsthe_FLNK-1548391367271-RPC1U0",
"record_url": null,
"show_phone": "6282215699803"
}
]
}
}
**失败返回**
{
"code": "0",
"info": "appkey or secretkey invalid"
}
返回参数说明
| 参数名 | 必选 | 类型 | 说明 |
|---|---|---|---|
| total | 是 | string | 此次查询总记录数 |
| page | 是 | string | 查询的第几页数据 |
| pageSize | 是 | string | 每页数据量 |
| sipid | 是 | string | sipid,可忽略 |
| id | 是 | string | 通话记录ID,保证唯一,可用来对比数据是否重复获取 |
| username | 是 | string | 话机用户名 |
| mobile_name | 是 | string | 话机昵称 |
| duration | 是 | string | 通话时长(秒) |
| phone | 是 | string | 原始被叫号码 |
| start_time | 是 | string | 通话开始时间 |
| end_time | 是 | string | 通话结束时间 |
| orderid | 是 | string | orderid |
| show_phone | 是 | string | 呼叫显示号码 |
| record_url | 是 | number | 录音文件,通话时长等于0的,没有录音文件 |
| answer_time | 是 | string | 呼叫接通时间 |
| direction | 是 | string | 呼叫方向,0为呼入,1为呼出 |
| effective_called_number | 是 | string | 规整后的被叫号码 |
| hangup_cause | 是 | string | 呼叫挂断原因 |
失败原因说明
| info | 说明 |
|---|---|
| appkey or secretkey invalid | 注册账号或密码错误 |
| mobile no exist | 话机不存在 |
| page_size or page_index invalid | 分页参数错误 |
| time invalid | 时间跨度错误 |
呼叫挂断原因
| 挂断原因返回 | 详细描述 |
|---|---|
| UNSPECIFIED | This is usually given by the router when none of the other codes apply. This cause usually occurs in the same type of situations as cause 1, cause 88, and cause 100. |
| UNALLOCATED_NUMBER | This cause indicates that the called party cannot be reached because, although the called party number is in a valid format, it is not currently allocated (assigned). |
| NO_ROUTE_TRANSIT_NET | This cause indicates that the equipment sending this cause has received a request to route the call through a particular transit network, which it does not recognize. The equipment sending this cause does not recognize the transit network either because the transit network does not exist or because that particular transit network, while it does exist, does not serve the equipment which is sending this cause. |
| NO_ROUTE_DESTINATION | This cause indicates that the called party cannot be reached because the network through which the call has been routed does not serve the destination desired. This cause is supported on a network dependent basis. |
| CHANNEL_UNACCEPTABLE | This cause indicates that the channel most recently identified is not acceptable to the sending entity for use in this call. |
| CALL_AWARDED_DELIVERED | This cause indicates that the user has been awarded the incoming call, and that the incoming call is being connected to a channel already established to that user for similar calls (e.g. packet-mode x.25 virtual calls). |
| NORMAL_CLEARING | This cause indicates that the call is being cleared because one of the users involved in the call has requested that the call be cleared. Under normal situations, the source of this cause is not the network. |
| USER_BUSY | This cause is used to indicate that the called party is unable to accept another call because the user busy condition has been encountered. This cause value may be generated by the called user or by the network. In the case of user determined user busy it is noted that the user equipment is compatible with the call. |
| NO_USER_RESPONSE | This cause is used when a called party does not respond to a call establishment message with either an alerting or connect indication within the prescribed period of time allocated. |
| NO_ANSWER | This cause is used when the called party has been alerted but does not respond with a connect indication within a prescribed period of time. Note - This cause is not necessarily generated by Q.931 procedures but may be generated by internal network timers. |
| SUBSCRIBER_ABSENT | This cause value is used when a mobile station has logged off, radio contact is not obtained with a mobile station or if a personal telecommunication user is temporarily not addressable at any user-network interface. Sofia SIP will normally raise USER_NOT_REGISTERED in such situations. |
| CALL_REJECTED | This cause indicates that the equipment sending this cause does not wish to accept this call, although it could have accepted the call because the equipment sending this cause is neither busy nor incompatible. The network may also generate this cause, indicating that the call was cleared due to a supplementary service constraint. The diagnostic field may contain additional information about the supplementary service and reason for rejection. |
| NUMBER_CHANGED | This cause is returned to a calling party when the called party number indicated by the calling party is no longer assigned, The new called party number may optionally be included in the diagnostic field. If a network does not support this cause, cause no: 1, unallocated (unassigned) number shall be used. |
| REDIRECTION_TO_NEW_DESTINATION | This cause is used by a general ISUP protocol mechanism that can be invoked by an exchange that decides that the call should be set-up to a different called number. Such an exchange can invoke a redirection mechanism, by use of this cause value, to request a preceding exchange involved in the call to route the call to the new number. |
| EXCHANGE_ROUTING_ERROR | This cause indicates that the destination indicated by the user cannot be reached, because an intermediate exchange has released the call due to reaching a limit in executing the hop counter procedure. This cause is generated by an intermediate node, which when decrementing the hop counter value, gives the result 0. |
| DESTINATION_OUT_OF_ORDER | This cause indicates that the destination indicated by the user cannot be reached because the interface to the destination is not functioning correctly. The term "not functioning correctly" indicates that a signal message was unable to be delivered to the remote party; e.g. a physical layer or data link layer failure at the remote party, or user equipment off-line. |
| INVALID_NUMBER_FORMAT | This cause indicates that the called party cannot be reached because the called party number is not in a valid format or is not complete. |
| FACILITY_REJECTED | This cause is returned when a supplementary service requested by the user cannot be provide by the network. |
| RESPONSE_TO_STATUS_ENQUIRY | This cause is included in the STATUS message when the reason for generating the STATUS message was the prior receipt of a STATUS INQUIRY. |
| NORMAL_UNSPECIFIED | This cause is used to report a normal event only when no other cause in the normal class applies. |
| NORMAL_CIRCUIT_CONGESTION | This cause indicates that there is no appropriate circuit/channel presently available to handle the call. |
| NETWORK_OUT_OF_ORDER | This cause indicates that the network is not functioning correctly and that the condition is likely to last a relatively long period of time e.g. immediately re-attempting the call is not likely to be successful. |
| NORMAL_TEMPORARY_FAILURE | This cause indicates that the network is not functioning correctly and that the condition is not likely to last a long period of time; e.g. the user may wish to try another call attempt almost immediately. |
| SWITCH_CONGESTION | This cause indicates that the switching equipment generating this cause is experiencing a period of high traffic. |
| ACCESS_INFO_DISCARDED | This cause indicates that the network could not deliver access information to the remote user as requested, i.e. user-to-user information, low layer compatibility, high layer compatibility or sub-address as indicated in the diagnostic. It is noted that the particular type of access information discarded is optionally included in the diagnostic. |
| REQUESTED_CHAN_UNAVAIL | This cause is returned when the other side of the interface cannot provide the circuit or channel indicated by the requesting entity. |
| FACILITY_NOT_SUBSCRIBED | This cause indicates that the user has requested a supplementary service, which is available, but the user is not authorized to use. |
| OUTGOING_CALL_BARRED | This cause indicates that although the calling party is a member of the CUG for the outgoing CUG call, outgoing calls are not allowed for this member of the CUG. |
| INCOMING_CALL_BARRED | This cause indicates that although the called party is a member of the CUG for the incoming CUG call, incoming calls are not allowed to this member of the CUG. |
| BEARERCAPABILITY_NOTAUTH | This cause indicates that the user has requested a bearer capability that is implemented by the equipment which generated this cause but the user is not authorized to use. |
| BEARERCAPABILITY_NOTAVAIL | This cause indicates that the user has requested a bearer capability which is implemented by the equipment which generated this cause but which is not available at this time. |
| SERVICE_UNAVAILABLE | This cause is used to report a service or option not available event only when no other cause in the service or option not available class applies. |
| BEARERCAPABILITY_NOTIMPL | This cause indicates that the equipment sending this cause does not support the bearer capability requested. |
| CHAN_NOT_IMPLEMENTED | This cause indicates that the equipment sending this cause does not support the channel type requested |
| FACILITY_NOT_IMPLEMENTED | This cause indicates that the equipment sending this cause does not support the requested supplementary services. |
| SERVICE_NOT_IMPLEMENTED | This cause is used to report a service or option not implemented event only when no other cause in the service or option not implemented class applies. |
| INVALID_CALL_REFERENCE | This cause indicates that the equipment sending this cause has received a message with a call reference which is not currently in use on the user-network interface. |
| INCOMPATIBLE_DESTINATION | This cause indicates that the equipment sending this cause has received a request to establish a call which has low layer compatibility, high layer compatibility or other compatibility attributes (e.g. data rate) which cannot be accommodated. |
| INVALID_MSG_UNSPECIFIED | This cause is used to report an invalid message event only when no other cause in the invalid message class applies. |
| MANDATORY_IE_MISSING | This cause indicates that the equipment sending this cause has received a message which is missing an information element which must be present in the message before that message can be processed. |
| MESSAGE_TYPE_NONEXIST | This cause indicates that the equipment sending this cause has received a message with a message type it does not recognize either because this is a message not defined of defined but not implemented by the equipment sending this cause. |
| WRONG_MESSAGE | This cause indicates that the equipment sending this cause has received a message such that the procedures do not indicate that this is a permissible message to receive while in the call state, or a STATUS message was received indicating an incompatible call state. |
| IE_NONEXIST | This cause indicates that the equipment sending this cause has received a message which includes information element(s)/parameter(s) not recognized because the information element(s)/parameter name(s) are not defined or are defined but not implemented by the equipment sending the cause. This cause indicates that the information element(s)/parameter(s) were discarded. However, the information element is not required to be present in the message in order for the equipment sending the cause to process the message. |
| INVALID_IE_CONTENTS | This cause indicates that the equipment sending this cause has received and information element which it has implemented; however, one or more fields in the I.E. are coded in such a way which has not been implemented by the equipment sending this cause. |
| WRONG_CALL_STATE | This cause indicates that a message has been received which is incompatible with the call state. |
| RECOVERY_ON_TIMER_EXPIRE | This cause indicates that a procedure has been initiated by the expiration of a timer in association with error handling procedures. This is often associated with NAT problems. Ensure that "NAT Mapping Enable" is turned on in your ATA. If it is not NAT related it can sometimes be provider related, make sure to ensure another outbound provider does not solve the problem.FreeSWITCH also returns this when the remote party sends a 408 for call expired. |
| MANDATORY_IE_LENGTH_ERROR | This cause indicates that the equipment sending this cause has received a message which includes parameters not recognized because the parameters are not defined or are defined but not implemented by the equipment sending this cause. The cause indicates that the parameter(s) were ignored. In addition, if the equipment sending this cause is an intermediate point, then this cause indicates that the parameter(s) were passed unchanged. |
| PROTOCOL_ERROR | This cause is used to report a protocol error event only when no other cause in the protocol error class applies. |
| INTERWORKING | This cause indicates that an interworking call (usually a call to SW56 service) has ended. |
| ORIGINATOR_CANCEL | |
| CRASH | |
| SYSTEM_SHUTDOWN | |
| LOSE_RACE | |
| MANAGER_REQUEST | This cause is used when you send an api command to make it hangup. For example uuid_kill |
| BLIND_TRANSFER | |
| ATTENDED_TRANSFER | |
| ALLOTTED_TIMEOUT | This cause means that the server canceled the call because the destination channel took too long to answer. |
| USER_CHALLENGE | |
| MEDIA_TIMEOUT | |
| PICKED_OFF | This cause means the call was picked up by intercepting it from another extension (i.e. dialing **ext_number from another extension). |
| USER_NOT_REGISTERED | This means you tried to originate a call to a SIP user who forgot to register. |
| GATEWAY_DOWN | Gateway is down (not answering on OPTIONS or SUBSCRIBE) |
简介
短信
语音
- 上传语音录音文件
- 上传语音录音文件_v1
- 已上传录音文件查询
- 发送语音群呼
- 发送语音通知
- 发送语音验证码
- 语音验证码回填上报
- 语音回执回调
- 语音记录查询
- 上传语音录音文件-旧版本已废弃
- 发送语音群呼‐旧版已废弃
- 发送语音通知‐旧版已废弃
- 发送语音验证码‐旧版已废弃
- 语音回执回调‐旧版已废弃
云呼叫中心(NXLink)
- Web SDK
- Iframe集成
- 手动拨号通话记录查询
- 通过orderId查询
- 手动拨号记录回调
- 坐席信息查询
- 坐席状态查询
- 坐席状态信息查询
- 坐席组查询
- 坐席可用主叫查询
- 坐席组成员查询
- 坐席组更新成员
- 坐席效率统计
- 创建AICC外呼任务
- Webhook-手动外呼
云呼叫中心(AI自动外呼)
- Callbot API概述
- Callbot API鉴权
- Callbot 接口探活
- 创建自动拨号任务
- 批量添加拨打名单
- 创建自动拨号任务并添加拨打名单
- 任务控制(启动/暂停)
- 更新任务
- 获取通话列表
- 获取任务列表
- 获取拨打订单列表
- 停止订单拨打
- 查询订单维度拨打详情
- 通话维度回调
- 订单维度拨打回调
- 任务状态回调
- 批次-导出最新批次数据
- 批次-导入最新批次数据
Flash Call
短链
邮件验证码
DID号码
- DID号码进行短信下行V2
- DID短信结果回调(加签)
- DID短信结果回调(无加签)
- DID号码短信记录查询(新接口,未启用)
- DID号码通话记录查询
- DID呼出并转接到Amazon坐席
- DID呼出前与Connect号码绑定
通用
号码检测
- 发送消息
- 发送otp消息
- webhook
- 标记入站消息已读
- 上传媒体文件
- 获取媒体文件
- 删除媒体文件
- 查询号码信息
- 查询消息模板
- 创建消息模板
- 异步创建消息模板
- 编辑消息模板
- 删除消息模板
- 上传模板示例文件
- 嵌入式页面登录
- 创建客户应用
- 客户应用的号码列表
- 获取验证码
- 核验验证码
- flows-创建流
- flows-更新流
- flows-根据流ID查询流信息
- flows-根据whatsapp号码查询流列表
- flows-根据流ID查询流预览地址
- flows-查询流JSON
- flows-发布流
- flows-删除流草稿
- flows-废弃已发布的流
- flows-更新流JSON
- flows-上传业务公钥
- ads-根据公共主页ID查询绑定的数据集列表
- ads-根据数据集ID上报CAPI广告数据
- 封锁用户
- 业务主页
- 查询消息记录
- 查询calling配置
- 查询calling通话记录
- 禁用calling配置
- 启用calling配置
Viber
Zalo ZNS
Super Message API
隐私号(旧)
PNS
坐席(旧版)
- NXphone PC 使用说明
- NXphone Android 使用说明
- NXphone Android SDK 接入文档
- 呼叫挂断原因解释
- 话单CDR查询接口
- 话单CDR回调接口说明(V1.0)
- 坐席API调用接口说明(V1.0)
- 根据orderid查询话单CDR接口
- 坐席系统sip链接调用方式(推荐)
- 号码脱敏处理
- 修改话机密码接口
- 查询审批单
- 查询话机
- WebRTC SDK使用说明
AI Agent