kiwi_flutter_plugin 0.0.3 copy "kiwi_flutter_plugin: ^0.0.3" to clipboard
kiwi_flutter_plugin: ^0.0.3 copied to clipboard

retracted

Flutter Plugin for Manual Agent Single-Call Functionality (UI Included)

kiwi_flutter_plugin #

单呼Flutter插件

最新文档 #

使用方法 #

插件提供方法:

方法名 场景描述
call 发起呼叫
terminate 结束通话

发起呼叫:

发起呼叫后,插件会自动拉起UI界面,通话完成后通话UI界面会自动关闭。

KiwiFlutterPlugin.call(
    context: context,
    companyID: 'a63ce0d9a5f84cf0b6eb7441f236c359',
    employeeID: '7b047d69394e45a5b2c7663d2126f379',
    token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NDczMjQ3NzgsInVpZCI6ImI5YjJhYWI4MDE1MTRiZGQ5M2FiNjRlMGZkZjExYmY5In0.b4tNRBvQiEIzjkjqmt309d6MWVLcw6RwmVX64VeWItI',
    mobile: '186****1811', // 呼叫请传完整号码
    env: 'test');
参数说明
字段 类型 必填 说明
context BuildContext 事件类型标识符
companyID String 公司ID
employeeID String 员工ID
token String 通过开发者接口获取token
mobile String 呼叫手机号
lineListID String 使用哪条线路
env String 'test'或'prod',默认prod生产环境

数据回调 #

通过监听 signalStream 获得回调数据。

KiwiFlutterPlugin.signalStream.listen((data) {
    print("调用层收到信令回调: $data");
    // final response = PluginResponse.fromJson(data);
});

回调数据格式

{
  "type": "CallConnecting",
  "msg": "通话连接中",
  "data": {
    "PlanID": "string"  
  }
}
字段说明
字段 类型 说明
type string 事件类型标识符
msg string 描述信息
data object 附加的数据对象

data对象可能包含以下字段:

字段 类型 说明
PlanID string 当前通话关联的PlanID,长度32字符串

type可能包含以下字段(以下事件会触发回调):

类型名(type) 场景描述 附加数据
CallConnecting 通话连接中 {PlanID:string}
CallConnected 通话中 {PlanID:string}
SeatHangUp 坐席已挂机 {}
CustomerHangUp 客户已挂机 {}
CustomerRefuse 客户拒接 {}
SeatConflict 坐席在其他地方上线 {}
示例数据
  1. 带PlanID的情况:
{
  "type": "CallConnected",
  "msg": "通话连接中",
  "data": {
    "PlanID": "230e15bae95849ba9bc02c77b6dc451e"
  }
}
  1. 空data对象的情况:
{
  "type": "SeatHangUp",
  "msg": "坐席已挂机",
  "data": {}
}
0
likes
0
points
12
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter Plugin for Manual Agent Single-Call Functionality (UI Included)

Homepage

Documentation

Documentation

License

unknown (license)

Dependencies

flutter, logger, permission_handler, plugin_platform_interface, web_socket_channel

More

Packages that depend on kiwi_flutter_plugin

Packages that implement kiwi_flutter_plugin