From 32be028a3a4ec0d5466757a7f106443550cae41c Mon Sep 17 00:00:00 2001 From: jinfengli Date: Mon, 31 Oct 2022 16:18:22 +0800 Subject: [PATCH] update --- callmanage2/数据推送和回调接口.md | 261 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- callmanage2/运营-数据推送和回调接口.md | 263 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ outboundcall/外呼-外部服务调用文档.md | 127 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ outboundcall/外部服务调用文档.md | 73 ------------------------------------------------------------------------- 4 files changed, 390 insertions(+), 334 deletions(-) delete mode 100644 callmanage2/数据推送和回调接口.md create mode 100644 callmanage2/运营-数据推送和回调接口.md create mode 100644 outboundcall/外呼-外部服务调用文档.md delete mode 100644 outboundcall/外部服务调用文档.md diff --git "a/callmanage2/\346\225\260\346\215\256\346\216\250\351\200\201\345\222\214\345\233\236\350\260\203\346\216\245\345\217\243.md" "b/callmanage2/\346\225\260\346\215\256\346\216\250\351\200\201\345\222\214\345\233\236\350\260\203\346\216\245\345\217\243.md" deleted file mode 100644 index 4f40a05..0000000 --- "a/callmanage2/\346\225\260\346\215\256\346\216\250\351\200\201\345\222\214\345\233\236\350\260\203\346\216\245\345\217\243.md" +++ /dev/null @@ -1,261 +0,0 @@ -- BaseUrl - - 生产环境: http://hw-gz26.heyqiwu.cn:60013 - -#### 推送外呼数据 - -URL: {BaseUrl}/out/push/call - -METHOD: POST - -RequestHeaders: - -| key | description | -| :----------- | :------------ | -| Content-Type | application/json;charset=utf-8 | -| Timestamp | 请求时的时间戳,毫秒级 | -| Authorization | 签名, 将 appSecret+":"+timestamp 字符串md5提取摘要 | -| App-Channel-Id | 渠道ID | - -RequestBody: - -```json -{ - "username":"admin", // 运营平台任务创建者的用户名 - "outputCallTaskName":"进峰测试催收推送任务", // 任务名 - "outputCallCallbackUrl":"http://hw-gz59.heyqiwu.cn:60013/test/callback", // 回调地址 - "teleInfos":[ // 电话信息 - { - "nickname":"未知", // 电话人姓名 - "sex":"未知", // 电话人性别 - "job":"未知", // 电话人职位 - "location":"未知", // 电话人地点 - - "number":"", // 电话人号码 - "encodeNumber": "simo_test_20221009142217_7", // 加密后的号码 - "serviceName": "默认", // 业务名 - - "customSessionId":"121231", // 第三方会话ID - } - ] -} - -``` - -ResponseBody: - -```json -{ - "code": 1, // 1:表示成功, 其他表示失败 - "msg": "成功", // 提示信息 - "data": null -} -``` - -Example - -``` -curl --location --request POST 'http://hw-gz26.heyqiwu.cn:60013/out/push/call' \ ---header 'Timestamp: 1665296802212' \ ---header 'Authorization: 6c4a7fef4710e2caea0a32900a19862f' \ ---header 'App-Channel-Id: simo-test' \ ---header 'Content-Type: application/json' \ ---data-raw '{ - "username":"admin", - "outputCallTaskName":"吉仕线路任务测试", - "outputCallCallbackUrl":"http://hw-gz26.heyqiwu.cn:60013/test/callback", - "teleInfos":[ - { - "nickname":"未知", - "sex":"未知", - "job":"未知", - "location":"未知", - - "number":"", - "encodeNumber": "simo_test_20221009142217_7", - "serviceName": "默认", - - "customSessionId":"12123111" - } - ] -}' -``` - -#### 客户回调接口 - -URL: {BaseUrl}/out/custom/callback - -METHOD: POST - -RequestHeaders: - -| key | description | -| :----------- | :------------ | -| Content-Type | application/json;charset=utf-8 | -| Timestamp | 请求时的时间戳,毫秒级 | -| Authorization | 签名, 将 appSecret+":"+timestamp 字符串md5提取摘要 | -| App-Channel-Id | 渠道ID | - -RequestBody: - -```json -{ - "username":"boluobao0001", // 用户名 - "outputCallTaskName":"菠萝包召回", // 任务名 - - "teleNumber":"", // 回调的电话号码 - "tele_encode_number":"simo_test_20221009142217_7", // 加密后的号码 - "serviceName": "默认", // 业务名 - - "customSessionId":"18059821525", // 回调的客户自定义sessionId - "status":2 // 客户回调状态: 0: 初始状态 1: 短信发送失败 2: 短信发送成功 3: 用户已接收短信 4: 用户进入宣传页面 5: 用户召回成功 6:接收短信失败 -} -``` - -ResponseBody: - -```json -{ - "code": 1, // 1:表示成功, 其他表示失败 - "msg": "成功", // 提示信息 - "data": null -} -``` - -Example - -``` -curl --location --request POST 'http://hw-gz26.heyqiwu.cn:60013/out/custom/callback' \ ---header 'App-Channel-Id: boluobao-pro' \ ---header 'Timestamp: 1656397270262' \ ---header 'Authorization: 8a969f6dbac5d09660c19c2a686cac0a' \ ---header 'Content-Type: application/json' \ ---data-raw '{ - "username":"boluobao0001", - "outputCallTaskName":"菠萝包召回", - "teleNumber":"", - "tele_encode_number":"simo_test_20221009142217_7", - "serviceName": "默认", - "customSessionId":"18059821525", - "status":2 -} -' -``` - -#### 任务执行状态更新-暂停-启动 - -URL: {BaseUrl}/out/task/status/update - -METHOD: POST - -RequestHeaders: - -| key | description | -| :----------- | :------------ | -| Content-Type | application/json;charset=utf-8 | -| Timestamp | 请求时的时间戳,毫秒级 | -| Authorization | 签名, 将 appSecret+":"+timestamp 字符串md5提取摘要 | -| App-Channel-Id | 渠道ID | - -RequestBody: - -```json -{ - "username":"admin", // 用户名 - "outputCallTaskName":"进峰测试sip方式留创网关", // 任务名 - "status": 2 // 0:立即执行; 2:停止 -} -``` - -ResponseBody: - -```json -{ - "code": 1, // 1:表示成功, 其他表示失败 - "msg": "成功", // 提示信息 - "data": null -} -``` - -Example - -``` -curl --location --request POST 'http://hw-gz59.heyqiwu.cn:60011/out/task/status/update' \ ---header 'Timestamp: 1663914548839' \ ---header 'Authorization: e02f9d3ddcc99acb54e9c581ce280f7d' \ ---header 'App-Channel-Id: qiwu-monitor-pro' \ ---header 'Content-Type: application/json' \ ---data-raw '{ - "username":"admin", - "outputCallTaskName":"进峰测试sip方式留创网关", - "status": 2 -}' -``` - -#### 回调标签 - -URL: 推送外呼数据接口传的outputCallCallbackUrl字段链接 - -METHOD: POST - -RequestHeaders: - -| key | description | -| :----------- | :------------ | -| Content-Type | application/json;charset=utf-8 | -| Timestamp | 请求时的时间戳,毫秒级 | -| Authorization | 签名, 将 appSecret+":"+timestamp 字符串md5提取摘要 | -| App-Channel-Id | 渠道ID | - -RequestBody: - -```json -{ - "username":"admin", - "outputCallTaskName":"进峰测试sip方式留创网关", - "teleNumber":"", // 用户电话 - "teleEncodeNumber": "simo_test_20221009142217_7", // 加密后的号码 - "teleServiceName": "默认", // 业务名称 - "customSessionId":"121231", - "tags":"还款意愿:拒绝还款,逾期原因:忘记有借款,通话状态:本人接通", // BOT打的标签 - "callStatus": 1, // 1: 未接通, 4: 通话完成, 0: 已接通 - "callbackType": 1 // 1: 正常完成回调; 2: 短信通知 - -} -``` - -ResponseBody: - -```json -{ - "code": 1, // 1:表示成功, 其他表示失败 - "msg": "成功", // 提示信息 - "data": null -} -``` - -Example - -``` -curl --location --request POST 'http://hw-gz26.heyqiwu.cn:60013/test/callback' \ ---header 'App-Channel-Id: cuishou' \ ---header 'Timestamp: 1651919109374' \ ---header 'Authorization: 591a889c55e958cd59a05a596d5f5c8d' \ ---header 'Content-Type: application/json' \ ---data-raw '{ - "teleNumber":"", - "teleEncodeNumber": "simo_test_20221009142217_7", - "teleServiceName": "默认", - "tags":"还款意愿:拒绝还款,逾期原因:忘记有借款,通话状态:本人接通", - "customSessionId":"121231", - "callStatus": 1, -}' -``` - -#### 外呼对话系统uid生成规则 - -``` -{服务名称}_{毫秒级时间戳}_{customSessionId} -{服务名称}_{毫秒级时间戳}_{电话号码} -{服务名称}_{毫秒级时间戳}_{随机串} -``` - diff --git "a/callmanage2/\350\277\220\350\220\245-\346\225\260\346\215\256\346\216\250\351\200\201\345\222\214\345\233\236\350\260\203\346\216\245\345\217\243.md" "b/callmanage2/\350\277\220\350\220\245-\346\225\260\346\215\256\346\216\250\351\200\201\345\222\214\345\233\236\350\260\203\346\216\245\345\217\243.md" new file mode 100644 index 0000000..fb3d23d --- /dev/null +++ "b/callmanage2/\350\277\220\350\220\245-\346\225\260\346\215\256\346\216\250\351\200\201\345\222\214\345\233\236\350\260\203\346\216\245\345\217\243.md" @@ -0,0 +1,263 @@ +- BaseUrl + - 生产环境: http://hw-gz26.heyqiwu.cn:60013 + +#### 推送外呼数据 + +URL: {BaseUrl}/out/push/call + +METHOD: POST + +RequestHeaders: + +| key | description | +| :----------- | :------------ | +| Content-Type | application/json;charset=utf-8 | +| Timestamp | 请求时的时间戳,毫秒级 | +| Authorization | 签名, 将 appSecret+":"+timestamp 字符串md5提取摘要 | +| App-Channel-Id | 渠道ID | + +RequestBody: + +```json +{ + "username":"admin", // 运营平台任务创建者的用户名 + "outputCallTaskName":"进峰测试催收推送任务", // 任务名 + "outputCallCallbackUrl":"http://hw-gz59.heyqiwu.cn:60013/test/callback", // 回调地址 + "teleInfos":[ // 电话信息 + { + "nickname":"未知", // 电话人姓名 + "sex":"未知", // 电话人性别 + "job":"未知", // 电话人职位 + "location":"未知", // 电话人地点 + + "number":"", // 电话人号码 + "encodeNumber": "simo_test_20221009142217_7", // 加密后的号码(ID) + "serviceName": "默认", // 业务名 + + "customSessionId":"121231", // 第三方会话ID + } + ] +} + +``` + +ResponseBody: + +```json +{ + "code": 1, // 1:表示成功, 其他表示失败 + "msg": "成功", // 提示信息 + "data": null +} +``` + +Example + +``` +curl --location --request POST 'http://hw-gz26.heyqiwu.cn:60013/out/push/call' \ +--header 'Timestamp: 1665296802212' \ +--header 'Authorization: 6c4a7fef4710e2caea0a32900a19862f' \ +--header 'App-Channel-Id: simo-test' \ +--header 'Content-Type: application/json' \ +--data-raw '{ + "username":"admin", + "outputCallTaskName":"吉仕线路任务测试", + "outputCallCallbackUrl":"http://hw-gz26.heyqiwu.cn:60013/test/callback", + "teleInfos":[ + { + "nickname":"未知", + "sex":"未知", + "job":"未知", + "location":"未知", + + "number":"", + "encodeNumber": "simo_test_20221009142217_7", + "serviceName": "默认", + + "customSessionId":"12123111" + } + ] +}' +``` + +#### 客户回调接口 + +URL: {BaseUrl}/out/custom/callback + +METHOD: POST + +RequestHeaders: + +| key | description | +| :----------- | :------------ | +| Content-Type | application/json;charset=utf-8 | +| Timestamp | 请求时的时间戳,毫秒级 | +| Authorization | 签名, 将 appSecret+":"+timestamp 字符串md5提取摘要 | +| App-Channel-Id | 渠道ID | + +RequestBody: + +```json +{ + "username":"boluobao0001", // 用户名 + "outputCallTaskName":"菠萝包召回", // 任务名 + + "teleNumber":"", // 回调的电话号码 + "tele_encode_number":"simo_test_20221009142217_7", // 加密后的号码(ID) + "serviceName": "默认", // 业务名 + + "customSessionId":"18059821525", // 回调的客户自定义sessionId + "status":2, // 客户回调状态: 0: 初始状态 1: 短信发送失败 2: 短信发送成功 3: 用户已接收短信 4: 用户进入宣传页面 5: 用户召回成功 6:接收短信失败 可不传 + "callbackType": 1, // 1: 点击 2: 下载 3: 激活 4: 充值 可不传 + "cash": -100.0, // 如果是充值类型,会有金额参数 可不传 +} +``` + +ResponseBody: + +```json +{ + "code": 1, // 1:表示成功, 其他表示失败 + "msg": "成功", // 提示信息 + "data": null +} +``` + +Example + +``` +curl --location --request POST 'http://hw-gz26.heyqiwu.cn:60013/out/custom/callback' \ +--header 'App-Channel-Id: boluobao-pro' \ +--header 'Timestamp: 1656397270262' \ +--header 'Authorization: 8a969f6dbac5d09660c19c2a686cac0a' \ +--header 'Content-Type: application/json' \ +--data-raw '{ + "username":"boluobao0001", + "outputCallTaskName":"菠萝包召回", + "teleNumber":"", + "tele_encode_number":"simo_test_20221009142217_7", + "serviceName": "默认", + "customSessionId":"18059821525", + "status":2 +} +' +``` + +#### 任务执行状态更新-暂停-启动 + +URL: {BaseUrl}/out/task/status/update + +METHOD: POST + +RequestHeaders: + +| key | description | +| :----------- | :------------ | +| Content-Type | application/json;charset=utf-8 | +| Timestamp | 请求时的时间戳,毫秒级 | +| Authorization | 签名, 将 appSecret+":"+timestamp 字符串md5提取摘要 | +| App-Channel-Id | 渠道ID | + +RequestBody: + +```json +{ + "username":"admin", // 用户名 + "outputCallTaskName":"进峰测试sip方式留创网关", // 任务名 + "status": 2 // 0:立即执行; 2:停止 +} +``` + +ResponseBody: + +```json +{ + "code": 1, // 1:表示成功, 其他表示失败 + "msg": "成功", // 提示信息 + "data": null +} +``` + +Example + +``` +curl --location --request POST 'http://hw-gz59.heyqiwu.cn:60011/out/task/status/update' \ +--header 'Timestamp: 1663914548839' \ +--header 'Authorization: e02f9d3ddcc99acb54e9c581ce280f7d' \ +--header 'App-Channel-Id: qiwu-monitor-pro' \ +--header 'Content-Type: application/json' \ +--data-raw '{ + "username":"admin", + "outputCallTaskName":"进峰测试sip方式留创网关", + "status": 2 +}' +``` + +#### 回调标签 + +URL: 推送外呼数据接口传的outputCallCallbackUrl字段链接 + +METHOD: POST + +RequestHeaders: + +| key | description | +| :----------- | :------------ | +| Content-Type | application/json;charset=utf-8 | +| Timestamp | 请求时的时间戳,毫秒级 | +| Authorization | 签名, 将 appSecret+":"+timestamp 字符串md5提取摘要 | +| App-Channel-Id | 渠道ID | + +RequestBody: + +```json +{ + "username":"admin", + "outputCallTaskName":"进峰测试sip方式留创网关", + "teleNumber":"", // 用户电话 + "teleEncodeNumber": "simo_test_20221009142217_7", // 加密后的号码 + "teleServiceName": "默认", // 业务名称 + "customSessionId":"121231", + "tags":"还款意愿:拒绝还款,逾期原因:忘记有借款,通话状态:本人接通", // BOT打的标签 + "callStatus": 1, // 1: 未接通, 4: 通话完成, 0: 已接通 + "callbackType": 1 // 1: 正常完成回调; 2: 短信通知 + +} +``` + +ResponseBody: + +```json +{ + "code": 1, // 1:表示成功, 其他表示失败 + "msg": "成功", // 提示信息 + "data": null +} +``` + +Example + +``` +curl --location --request POST 'http://hw-gz26.heyqiwu.cn:60013/test/callback' \ +--header 'App-Channel-Id: cuishou' \ +--header 'Timestamp: 1651919109374' \ +--header 'Authorization: 591a889c55e958cd59a05a596d5f5c8d' \ +--header 'Content-Type: application/json' \ +--data-raw '{ + "teleNumber":"", + "teleEncodeNumber": "simo_test_20221009142217_7", + "teleServiceName": "默认", + "tags":"还款意愿:拒绝还款,逾期原因:忘记有借款,通话状态:本人接通", + "customSessionId":"121231", + "callStatus": 1, +}' +``` + +#### 外呼对话系统uid生成规则 + +``` +{服务名称}_{毫秒级时间戳}_{customSessionId} +{服务名称}_{毫秒级时间戳}_{电话号码} +{服务名称}_{毫秒级时间戳}_{随机串} +``` + diff --git "a/outboundcall/\345\244\226\345\221\274-\345\244\226\351\203\250\346\234\215\345\212\241\350\260\203\347\224\250\346\226\207\346\241\243.md" "b/outboundcall/\345\244\226\345\221\274-\345\244\226\351\203\250\346\234\215\345\212\241\350\260\203\347\224\250\346\226\207\346\241\243.md" new file mode 100644 index 0000000..fba7459 --- /dev/null +++ "b/outboundcall/\345\244\226\345\221\274-\345\244\226\351\203\250\346\234\215\345\212\241\350\260\203\347\224\250\346\226\207\346\241\243.md" @@ -0,0 +1,127 @@ +#### 号码导入-JSON方式 + +URL: {基本地址}/out/import/phone/number + +METHOD: POST + +RequestHeaders: + +| key | description | +| :----------- | :------------ | +| Content-Type | application/json;charset=utf-8 | +| Timestamp | 请求时的时间戳,毫秒级 | +| Authorization | 签名, 将 appSecret + ":" + timestamp 字符串md5提取摘要 | +| App-Channel-Id | 渠道ID | + +RequestBody: + +```json +{ + "teleServiceName":"默认", // 业务名称 + "importType":2, // 导入类型-> 0: 根据业务名累加覆盖的导入; 1: 根据业务名累加不覆盖的导入; 2: 根据业务名整体覆盖; + "teleNumberInfos":[ // 号码信息列表 + { + "teleNumber":"19925432904", // 电话号码 + "name":"未知", // 名称 + "post":"未知", // 职位 + "gender":"未知", // 性别 + "extraInfo":{ // 额外信息 + "age":"28" + } + } + ] +} +``` + + +ResponseBody: + +```json +{ + "code": 1, + "msg": "成功", + "data": { + "importFailureList": [] // 导入失败的列表 + } +} +``` + +Example: + +``` +curl --location --request POST 'http://47.111.189.55:60012/out/import/phone/number' \ +--header 'Authorization: 005222656aae8adbcb8781e5e3f93268' \ +--header 'App-Channel-Id: simo-test' \ +--header 'Timestamp: 1666839544503' \ +--header 'Content-Type: application/json' \ +--data-raw '{ + "teleServiceName":"默认", + "importType":2, + "teleNumberInfos":[ + { + "teleNumber":"19925432904", + "location":"未知", + "name":"未知", + "post":"未知", + "gender":"男士", + "extraInfo":{ + "age":"28" + } + } + ] +}' +``` + + +#### 号码转ID + +URL: {基本地址}/out/tele/number/to/id + +METHOD: POST + +RequestHeaders: + +| key | description | +| :----------- | :------------ | +| Content-Type | application/json;charset=utf-8 | +| Timestamp | 请求时的时间戳,毫秒级 | +| Authorization | 签名, 将 appSecret + ":" + timestamp 字符串md5提取摘要 | +| App-Channel-Id | 渠道ID | + +RequestBody: + +```json +{ + "teleNumber":"19925432904", + "teleServiceName":"默认" +} +``` + + +ResponseBody: + +```json +{ + "code": 1, + "msg": "成功", + "data": { + "teleEncodeNumber": "simo_test_20221027105913_1", // 加密后的ID + "teleServiceName": "默认", // 业务名称 + "teleNumber": "19925432904" // 电话号码 + } +} +``` + +Example: + +``` +curl --location --request POST 'http://47.111.189.55:60012/out/tele/number/to/id' \ +--header 'Authorization: 863500f4657f35e263e8762f6a6f00e8' \ +--header 'App-Channel-Id: simo-test' \ +--header 'Timestamp: 1667201714032' \ +--header 'Content-Type: application/json' \ +--data-raw '{ + "teleNumber":"19925432904", + "teleServiceName":"默认" +}' +``` \ No newline at end of file diff --git "a/outboundcall/\345\244\226\351\203\250\346\234\215\345\212\241\350\260\203\347\224\250\346\226\207\346\241\243.md" "b/outboundcall/\345\244\226\351\203\250\346\234\215\345\212\241\350\260\203\347\224\250\346\226\207\346\241\243.md" deleted file mode 100644 index df04297..0000000 --- "a/outboundcall/\345\244\226\351\203\250\346\234\215\345\212\241\350\260\203\347\224\250\346\226\207\346\241\243.md" +++ /dev/null @@ -1,73 +0,0 @@ -#### 号码导入-JSON方式 - -URL: {基本地址}/out/import/phone/number - -METHOD: POST - -RequestHeaders: - -| key | description | -| :----------- | :------------ | -| Content-Type | application/json;charset=utf-8 | -| Timestamp | 请求时的时间戳,毫秒级 | -| Authorization | 签名, 将 appSecret + ":" + timestamp 字符串md5提取摘要 | -| App-Channel-Id | 渠道ID | - -RequestBody: - -```json -{ - "teleServiceName":"默认", // 业务名称 - "importType":2, // 导入类型-> 0: 根据业务名累加覆盖的导入; 1: 根据业务名累加不覆盖的导入; 2: 根据业务名整体覆盖; - "teleNumberInfos":[ // 号码信息列表 - { - "teleNumber":"19925432904", // 电话号码 - "name":"未知", // 名称 - "post":"未知", // 职位 - "gender":"未知", // 性别 - "extraInfo":{ // 额外信息 - "age":"28" - } - } - ] -} -``` - - -ResponseBody: - -```json -{ - "code": 1, - "msg": "成功", - "data": { - "importFailureList": [] // 导入失败的列表 - } -} -``` - -Example: - -``` -curl --location --request POST 'http://47.111.189.55:60012/out/import/phone/number' \ ---header 'Authorization: 005222656aae8adbcb8781e5e3f93268' \ ---header 'App-Channel-Id: simo-test' \ ---header 'Timestamp: 1666839544503' \ ---header 'Content-Type: application/json' \ ---data-raw '{ - "teleServiceName":"默认", - "importType":2, - "teleNumberInfos":[ - { - "teleNumber":"19925432904", - "location":"未知", - "name":"未知", - "post":"未知", - "gender":"男士", - "extraInfo":{ - "age":"28" - } - } - ] -}' -``` \ No newline at end of file -- libgit2 0.27.1