cometchat-calls

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Use this skill when

何时使用该技能

  • The top-level
    cometchat
    dispatcher's Step 3.0 routes here because
    product === "voice-video"
    or
    chat-messaging+voice-video
  • The user explicitly asks for calling: "add calls", "add video calling", "add voice calls", "set up call screen", "integrate calls SDK", "add CallKit"
  • The user is iterating on an existing chat integration and picks "Add calling" from the iteration menu (Step 7 of
    cometchat
    )
This is the entry point for every calls integration. Do NOT invoke per-family
cometchat-{family}-calls
skills directly — this dispatcher detects the family, picks the integration mode (standalone vs additive), and routes to the right skill with the right preconditions.
Supported families:
FamilyPer-family skillCalls SDK packageStable today?
Web (React / Next.js / React Router / Astro)
cometchat-react-calls
@cometchat/calls-sdk-javascript
Yes
React Native (Expo + bare)
cometchat-native-calls
@cometchat/calls-sdk-react-native
Yes
Angular (12–15)
cometchat-angular-calls
@cometchat/calls-sdk-javascript
Yes
Android (V5 stable)
cometchat-android-v5-calls
com.cometchat:calls-sdk-android:5.x
(Cloudsmith)
Yes — production-ready
Android (V6 beta)
cometchat-android-v6-calls
Calls fold into
chatuikit-{compose,kotlin}-android:6.x
for V6
Beta
iOS (V5 stable)
cometchat-ios-calls
CometChatCallsSDK
(SPM / CocoaPods)
Yes
Flutter (V5 stable)
cometchat-flutter-v5-calls
(already exists)
cometchat_calls_sdk
(Cloudsmith)
Yes
Flutter (V6 beta)
cometchat-flutter-v6-calls
(already exists)
Calls fold into
cometchat_chat_uikit:^6.0.0-beta2
Beta
Status: This dispatcher is the v4.1 entry point. Per-family skill stubs are scaffolded and being filled in. Flutter v5/v6 calls skills already exist from v4.0.0 and will be audited and brought into the same shape; the other six are being authored against
~/Downloads/calls-sdk/calls-sdk-{android,ios,javascript,react-native}-5/
as ground truth (Android ships 17 pre-authored sub-skills folded into
cometchat-android-v5-calls/references/
).
  • 顶级
    cometchat
    调度器的步骤3.0将请求路由至此,因为
    product === "voice-video"
    chat-messaging+voice-video
  • 用户明确要求添加通话功能:例如*"添加通话""添加视频通话""添加语音通话""设置通话界面""集成通话SDK""添加CallKit"*
  • 用户正在迭代现有聊天集成,并从迭代菜单中选择*"添加通话"*(
    cometchat
    的步骤7)
这是所有通话集成的入口。请勿直接调用各平台专属的
cometchat-{family}-calls
技能——该调度器会检测平台类型,选择集成模式(独立或附加),并携带正确前置条件路由至对应技能。
支持的平台类型:
Family平台专属技能Calls SDK 包当前是否稳定?
Web (React / Next.js / React Router / Astro)
cometchat-react-calls
@cometchat/calls-sdk-javascript
React Native (Expo + 原生)
cometchat-native-calls
@cometchat/calls-sdk-react-native
Angular (12–15)
cometchat-angular-calls
@cometchat/calls-sdk-javascript
Android (V5 稳定版)
cometchat-android-v5-calls
com.cometchat:calls-sdk-android:5.x
(Cloudsmith)
是——可用于生产环境
Android (V6 测试版)
cometchat-android-v6-calls
通话功能已整合至V6的
chatuikit-{compose,kotlin}-android:6.x
测试版
iOS (V5 稳定版)
cometchat-ios-calls
CometChatCallsSDK
(SPM / CocoaPods)
Flutter (V5 稳定版)
cometchat-flutter-v5-calls
(已存在)
cometchat_calls_sdk
(Cloudsmith)
Flutter (V6 测试版)
cometchat-flutter-v6-calls
(已存在)
通话功能已整合至
cometchat_chat_uikit:^6.0.0-beta2
测试版
状态说明: 该调度器是v4.1版本的入口。各平台专属技能的框架已搭建完成并正在填充内容。Flutter v5/v6通话技能自v4.0.0版本起已存在,将进行审核并统一格式;其余6项技能正基于
~/Downloads/calls-sdk/calls-sdk-{android,ios,javascript,react-native}-5/
作为基准进行编写(Android平台包含17个预编写的子技能,整合至
cometchat-android-v5-calls/references/
)。

Why a separate calls dispatcher

为何需要独立的通话调度器

The chat dispatcher (
cometchat/SKILL.md
) assumes the user is adding a chat surface — its placement vocabulary, component catalog, framework skills, and verification checklist are all chat-shaped. Calls is a different surface area:
ConcernChat dispatcherCalls dispatcher (this skill)
Packages
chat-uikit-*
+
chat-sdk-*
chat-sdk-*
+
calls-sdk-*
(no UI Kit in standalone mode)
InitChat SDK init + loginChat SDK init + login + Calls SDK
CallAppSettings
(the dual-SDK contract)
Placement question"Where does chat live?""Where does the call trigger live?" + "Where do call logs live?"
ComponentsConversations, MessageList, Composer, Users, GroupsCallButtons, IncomingCall, OutgoingCall, OngoingCall, CallLogs
IncomingCall
mount
At chat surface (rings while user is chatting)At app root — always-rendering, listens app-wide
VoIP push (mobile)Optional add-onMandatory in standalone mode — calls without ringing isn't a product
Background lifecycleN/A unless calls feature addedRequired — Android foreground service / iOS CallKit + PushKit
The two dispatchers share
cometchat-{family}-core
(init + login + env + theme tokens) but diverge on everything else.
聊天调度器(
cometchat/SKILL.md
)假设用户正在添加聊天界面——其布局术语、组件目录、框架技能和验证清单均围绕聊天场景设计。通话属于不同的场景范畴:
关注点聊天调度器通话调度器(本技能)
包依赖
chat-uikit-*
+
chat-sdk-*
chat-sdk-*
+
calls-sdk-*
(独立模式下无UI Kit)
初始化流程Chat SDK初始化 + 登录Chat SDK初始化 + 登录 + Calls SDK
CallAppSettings
(双SDK契约)
布局问题"聊天界面放置在哪里?""通话触发按钮放置在哪里?" + "通话记录放置在哪里?"
组件Conversations、MessageList、Composer、Users、GroupsCallButtons、IncomingCall、OutgoingCall、OngoingCall、CallLogs
IncomingCall
挂载位置
聊天界面内(用户聊天时响铃)应用根节点——始终渲染,全局监听
移动VoIP推送可选附加功能独立模式下为必填项——无响铃的通话不具备产品价值
后台生命周期除非添加通话功能,否则无需关注必填项——Android前台服务 / iOS CallKit + PushKit
两个调度器共享
cometchat-{family}-core
(初始化+登录+环境+主题令牌),但其余部分均不同。

How v4.1 calls integration works

v4.1版本通话集成流程

Same conversational model as the chat dispatcher — detect, gather, plan, write, verify — but with a calls lens.
采用与聊天调度器相同的对话模型——检测、收集信息、规划、编写代码、验证,但围绕通话场景展开。

Steps

步骤

Step 1 — Detect family + mode

步骤1 — 检测平台类型与集成模式

If the user came from the top-level
cometchat
dispatcher, framework + credentials are already in
.cometchat/config.json
. Skip detection and read:
bash
npx @cometchat/skills-cli config show --json
If invoked directly (e.g. user typed "add calls to my app"), run:
bash
npx @cometchat/skills-cli detect --json
Same family detection as the chat dispatcher (
reactjs
,
nextjs
,
react-router
,
astro
,
expo
,
react-native
,
angular
,
android
,
flutter
,
ios
).
Pick the integration mode by looking at the project state:
SignalModeWhat runs
.cometchat/state.json
exists with chat surfaces wired
Additive — calls layered onto existing chatPer-family
-calls
skill in additive section. Patches the existing provider to mount
IncomingCall
at root. Adds call buttons inline on chat surfaces. Optional VoIP push.
.cometchat/state.json
does NOT exist (or has no chat surfaces) AND
product === "voice-video"
Standalone — calls is the productPer-family
-calls
skill in standalone section. No chat UI Kit. CallButtons + IncomingCall + OngoingCall + CallLogs. VoIP push wired, not optional.
/calls
route or platform equivalent for call logs.
Neither — user wants calls but it's ambiguousAskAskUserQuestion: "Are you adding calling alongside an existing chat integration, or building a calling-first app?"
如果用户来自顶级
cometchat
调度器,框架信息和凭证已存储在
.cometchat/config.json
中。跳过检测步骤,直接读取:
bash
npx @cometchat/skills-cli config show --json
如果直接调用本技能(例如用户输入*"为我的应用添加通话功能"*),则运行:
bash
npx @cometchat/skills-cli detect --json
平台类型检测逻辑与聊天调度器相同(
reactjs
nextjs
react-router
astro
expo
react-native
angular
android
flutter
ios
)。
根据项目状态选择集成模式
信号模式执行操作
.cometchat/state.json
已存在且已配置聊天界面
附加模式——在现有聊天基础上添加通话功能调用平台专属
-calls
技能的附加模式部分。修改现有Provider以在根节点挂载
IncomingCall
。在聊天界面内添加内嵌通话按钮。可选VoIP推送。
.cometchat/state.json
不存在(或未配置聊天界面)且
product === "voice-video"
独立模式——通话为核心产品调用平台专属
-calls
技能的独立模式部分。无聊天UI Kit。包含CallButtons + IncomingCall + OngoingCall + CallLogs。VoIP推送已配置,为必填项。创建
/calls
路由或对应平台的等效页面用于展示通话记录。
以上均不满足——用户需要通话但场景模糊询问用户向用户提问:"您是要在现有聊天集成基础上添加通话功能,还是要构建以通话为核心的应用?"

Step 2 — Verify credentials

步骤2 — 验证凭证

Calls reuses Chat SDK credentials. If
.env
(web/RN),
local.properties
(Android),
Secrets.swift
(iOS),
lib/cometchat_config.dart
(Flutter), or
src/environments/environment.ts
(Angular) already has
appId
/
region
/
authKey
, skip credential setup.
If credentials are missing, hand back to
cometchat/SKILL.md
Step 2 — credential provisioning is the same regardless of product. Do not duplicate the auth flow here.
通话功能复用Chat SDK的凭证。如果
.env
(Web/RN)、
local.properties
(Android)、
Secrets.swift
(iOS)、
lib/cometchat_config.dart
(Flutter)或
src/environments/environment.ts
(Angular)中已包含
appId
/
region
/
authKey
跳过凭证设置步骤
如果缺少凭证,跳转至
cometchat/SKILL.md
的步骤2——凭证配置流程与产品类型无关,请勿在此处重复认证流程。

Step 3 — Gather calls-specific requirements

步骤3 — 收集通话专属需求

Step 3.0 — Calling mode (Ringing vs Session) ★
步骤3.0 — 通话模式(响铃式 vs 会话式)★
This is the first calls-specific question. The Calls SDK supports two fundamentally different UX shapes — pick before anything else, because the rest of Step 3 + the per-family scaffold differ.
Resolve in priority order:
1. Infer ONLY from explicit signals. Don't default to either mode. The user must clearly indicate one of the two flavors before you skip the prompt:
User said something like…Mode
"1:1 call", "user to user call", "phone call", "ring my friend", "call a contact", "FaceTime-like", "WhatsApp-style call"Ringing
"group call between friends", "conference call up to N people" (small group, one initiator who rings)Ringing
"meeting", "Google Meet", "Zoom-like", "scheduled meeting", "join with a link", "meeting room", "conference room", "webinar", "town hall", "virtual classroom"Session
"huddle" (Slack-style — instant join from a channel)Session
Just "calls", "calling", "integrate calls", "add calls", "set up calling", "voice/video calls" with NO further context about ringing-vs-meetingAMBIGUOUS — ASK (do NOT default)
Mixed signals ("calls and meetings", "phone calls or video conferencing")AMBIGUOUS — ASK
The bottom rows are the load-bearing ones. Generic phrases like "integrate calls" or "I want calling in my app" are NOT a signal for Ringing — they're a signal that the user hasn't told you yet. Ask.
If you DO have a clear signal, confirm with one line so the user can redirect:
"Got it — setting up Ringing (1:1 / group calls with an incoming-call screen). If you wanted meeting-room URLs instead, say so and I'll switch."
2. Use Tier 4 use-case context if available. Use-cases telegraph the mode:
Use caseMode
Telehealth provider/patient (1:1 visit)Ringing
Marketplace buyer ↔ sellerRinging
Customer support (agent ↔ customer)Ringing
Broadcast / webinar / town hallSession
Team huddle / standupSession
3. Only if you can't tell — ask. Use this prompt verbatim — do NOT rephrase, do NOT swap options. Option 1 is "Session"; option 2 is "Ringing":
  • question: "What kind of calling experience are you building?"
  • header: "Calling mode"
  • multiSelect: false
  • options (display in this exact order — Session FIRST, Ringing SECOND):
    1. label: "Session — meeting / conference room", description: "Multiple users join the same session by ID or link. No ringing. Like Google Meet, Zoom, or a Slack huddle. Examples: scheduled meetings, webinars, team huddles, classroom calls."
    2. label: "Ringing — 1:1 or group calls", description: "One user calls another (or a small group). Recipient's device rings; they accept or decline. Like a phone call. Examples: WhatsApp, FaceTime, in-app voice/video calls between contacts."
Strict-order rule: render option 1 above option 2. Do not reorder. Session-first is standardized across CometChat product surfaces.
Map to mode value:
  • "Ringing" →
    mode === "ringing"
  • "Session" →
    mode === "session"
This drives which per-family reference loads at Step 6:
ModeReference (per-family)Reference (Android V5)
ringing
cometchat-{family}-calls/references/ringing-integration.md
cometchat-android-v5-calls/references/ringing-integration.md
session
cometchat-{family}-calls/references/call-session.md
cometchat-android-v5-calls/references/join-session.md
Note on the kit's prebuilt UI ("Standard" mode in earlier docs): the UI Kit's
<CometChatCallButtons />
+
<CometChatIncomingCall />
+
<CometChatOngoingCall />
are a kit-provided implementation of Ringing, not a third mode. If the user picks Ringing AND wants the kit's prebuilt UI (most common), the per-family scaffold uses kit components and treats the ringing reference as the architectural ground-truth. If they want custom UI on top of the chat-SDK signaling, the ringing reference is the implementation guide.
⚠️ Group calls do NOT use the Ringing channel (validated 2026-05-15, applies to all kits). The kit's
<CometChatCallButtons group={g}>
sends a custom meeting message to the group via
CometChat.sendCustomMessage
with
type: "meeting"
, NOT
CometChat.initiateCall
. Other group members receive the meeting card in
<CometChatMessageList />
(kit-based receivers) OR a
MessageListener.onCustomMessageReceived
with
category: CATEGORY_CUSTOM
+
type: "meeting"
(custom-UI receivers). The
CallListener.onIncomingCallReceived
channel only fires for 1:1 user calls. If the user wants group calls, load
references/group-calls.md
IN ADDITION TO ringing-integration.md — group has its own architecture even though customers think of it as "ringing for groups."
这是第一个通话专属问题。Calls SDK支持两种完全不同的UX形态——需优先选择,因为步骤3的其余部分和平台专属框架均会受此影响。
按优先级判断:
1. 仅根据明确信号推断。请勿默认任何一种模式。用户必须明确指示其中一种类型,否则需提示用户:
用户表述类似…模式
"一对一通话"、"用户间通话"、"电话呼叫"、"呼叫我的好友"、"联系通话"、"类似FaceTime"、"WhatsApp风格通话"响铃式
"好友间群组通话"、"最多N人的会议通话"(小型群组,由一人发起并响铃)响铃式
"会议"、"类似Google Meet"、"类似Zoom"、"预定会议"、通过链接加入"、"会议室"、"研讨会"、"全体大会"、"虚拟课堂"会话式
"临时会议"(Slack风格——从频道即时加入)会话式
仅提及"通话"、"呼叫"、"集成通话"、"添加通话"、"设置通话"、"语音/视频通话",未进一步说明响铃式与会话式的区别场景模糊——询问用户(请勿默认)
混合信号("通话和会议"、"电话或视频会议")场景模糊——询问用户
最后两行是关键。诸如"集成通话"或"我想在应用中添加通话功能"之类的通用表述并非响铃式的信号——这表明用户尚未明确需求。请询问用户。
如果有明确信号,用一句话确认以便用户调整:
"已了解——将设置为响铃式(一对一/群组通话,带有来电界面)。如果您需要会议室链接模式,请告知我,我将切换。"
2. 如果有可用的Tier 4用例上下文,可参考。用例会暗示所需模式:
用例模式
远程医疗(医患一对一问诊)响铃式
电商平台(买家↔卖家)响铃式
客户支持(客服↔客户)响铃式
直播/研讨会/全体大会会话式
团队临时会议/站会会话式
3. 若无法判断——询问用户。请严格使用以下提示语——请勿改写,请勿调换选项顺序。选项1为"会话式";选项2为"响铃式":
  • 问题: "您要构建哪种通话体验?"
  • 标题: "通话模式"
  • 多选: false
  • 选项(严格按此顺序展示——会话式在前,响铃式在后):
    1. 标签:"会话式——会议/会议室",描述:"多个用户通过ID或链接加入同一会话。无响铃。类似Google Meet、Zoom或Slack临时会议。示例:预定会议、研讨会、团队临时会议、课堂通话。"
    2. 标签:"响铃式——一对一或群组通话",描述:"一个用户呼叫另一个用户(或小型群组)。接收方设备响铃;用户可接听或拒绝。类似电话呼叫。示例:WhatsApp、FaceTime、应用内联系人语音/视频通话。"
严格顺序规则: 选项1显示在选项2上方。请勿调整顺序。会话式优先是CometChat产品界面的标准设定。
映射至模式值:
  • "响铃式" →
    mode === "ringing"
  • "会话式" →
    mode === "session"
这将决定步骤6加载哪个平台专属参考文档:
模式平台专属参考文档Android V5参考文档
ringing
cometchat-{family}-calls/references/ringing-integration.md
cometchat-android-v5-calls/references/ringing-integration.md
session
cometchat-{family}-calls/references/call-session.md
cometchat-android-v5-calls/references/join-session.md
关于套件预构建UI(早期文档中的"Standard"模式)的说明: UI Kit的
<CometChatCallButtons />
+
<CometChatIncomingCall />
+
<CometChatOngoingCall />
响铃式的套件实现,并非第三种模式。如果用户选择响铃式且需要套件预构建UI(最常见场景),平台专属框架将使用套件组件,并将响铃式参考文档作为架构基准。如果用户需要在Chat SDK信令之上自定义UI,响铃式参考文档将作为实现指南。
⚠️ 群组通话不使用响铃通道(2026-05-15验证,适用于所有套件)。套件的
<CometChatCallButtons group={g}>
会通过
CometChat.sendCustomMessage
向群组发送自定义会议消息,类型为
"meeting"
,而非
CometChat.initiateCall
。其他群成员会在
<CometChatMessageList />
(基于套件的接收方)中收到会议卡片,或通过
MessageListener.onCustomMessageReceived
(自定义UI接收方)收到
category: CATEGORY_CUSTOM
+
type: "meeting"
的消息。
CallListener.onIncomingCallReceived
通道仅在一对一用户通话时触发。如果用户需要群组通话,除加载
ringing-integration.md
外,还需加载
references/group-calls.md
——群组通话有独立的架构,尽管客户认为它是"群组版响铃式通话"。
Step 3.1 — Call trigger placement (where the call starts from)
步骤3.1 — 通话触发按钮位置(通话发起入口)
Different from the chat dispatcher's Step 3a archetype question. Ask placement-intent on the calls surface:
Ask the user (preserve the structured shape —
question
/
header
/
multiSelect
/
options[].label
/
options[].description
):
  • question: "How should users start a call in your app?"
  • header: "Call trigger"
  • multiSelect: false
  • options (the option set differs by mode — show only the rows matching
    mode
    from Step 3.0):
    If
    mode === "ringing"
    — show these:
    1. label: "Call button on user/contact profile", description: "Voice + video buttons next to a user's name. Best for marketplaces, social, dating, healthcare."
    2. label: "Always-on '/calls' route", description: "Dedicated calls page with a 'Start a call' picker and call history. Best for telehealth, virtual events, contact centers."
    3. label: "Embedded in chat surface", description: "Call buttons in the chat header — voice + video next to message threads. Best for apps that already have chat. (Additive mode only.)"
    4. label: "Floating widget", description: "Always-visible call bubble — like Zoom's floating window. Best for support / sales tools."
    If
    mode === "session"
    — show these instead:
    1. label: "Meeting link route ('/meet/:sessionId')", description: "Shareable URLs that anyone with the link can join. Best for scheduled meetings, webinars, classrooms."
    2. label: "Channel-bound huddle", description: "Session keyed to a chat channel/group ID — anyone in the channel can join the active huddle. Best for team collab apps."
    3. label: "Lobby / waiting-room route", description: "User lands on a waiting screen, host admits. Best for telehealth, customer support."
    4. label: "Custom — I'll wire it myself", description: "Just give me the SDK glue. I'll decide the surface."
The chosen option drives which per-family
-calls
skill section to load and what to scaffold.
Then ask about call logs separately — call logs are usually a different surface from the trigger:
  • question: "Where should call history live?"
  • header: "Call logs"
  • options:
    1. label: "Dedicated /calls route (or screen)", description: "Recommended — full call history, filterable, jump to caller's profile."
    2. label: "Inside the call trigger surface", description: "Compact list under the call button. Best when call volume is low."
    3. label: "Don't show call history", description: "Skip — calls just happen, no log surface."
与聊天调度器的步骤3a原型问题不同。需询问通话界面的布局意图:
向用户提问(保留结构化格式——
question
/
header
/
multiSelect
/
options[].label
/
options[].description
):
  • 问题: "用户应如何在您的应用中发起通话?"
  • 标题: "通话触发入口"
  • 多选: false
  • 选项(选项集因模式而异——仅显示与步骤3.0中
    mode
    匹配的选项):
    如果
    mode === "ringing"
    ——显示以下选项:
    1. 标签:"用户/联系人资料页上的通话按钮",描述:"用户名称旁的语音+视频按钮。适用于电商平台、社交、交友、医疗健康场景。"
    2. 标签:"常驻'/calls'路由",描述:"专用通话页面,包含'发起通话'选择器和通话记录。适用于远程医疗、虚拟活动、客服中心场景。"
    3. 标签:"嵌入聊天界面",描述:"聊天头部的通话按钮——消息线程旁的语音+视频按钮。适用于已具备聊天功能的应用。(仅附加模式可用。)"
    4. 标签:"悬浮组件",描述:"始终可见的通话气泡——类似Zoom的悬浮窗口。适用于客服/销售工具场景。"
    如果
    mode === "session"
    ——改为显示以下选项:
    1. 标签:"会议链接路由('/meet/:sessionId')",描述:"可分享的URL,任何拥有链接的用户均可加入。适用于预定会议、研讨会、课堂场景。"
    2. 标签:"频道绑定临时会议",描述:会话与聊天频道/群组ID关联——频道内任何用户均可加入正在进行的临时会议。适用于团队协作应用场景。"
    3. 标签:"等候室路由",描述:用户进入等待界面,由主持人准入。适用于远程医疗、客户支持场景。"
    4. 标签:"自定义——我将自行配置",描述:"只需提供SDK关联代码。我将自行决定界面布局。"
所选选项将决定加载平台专属
-calls
技能的哪个部分以及框架内容。
随后单独询问通话记录位置——通话记录通常与触发入口位于不同界面:
  • 问题: "通话记录应放置在哪里?"
  • 标题: "通话记录"
  • 选项:
    1. 标签:"专用'/calls'路由(或页面)",描述:"推荐方案——完整通话记录,支持筛选,可跳转至呼叫方资料页。"
    2. 标签:"嵌入通话触发入口界面",描述:"通话按钮下方的紧凑列表。适用于通话量较低的场景。"
    3. 标签:"不显示通话记录",描述:"跳过——仅进行通话,无记录界面。"

Step 4 — Detect mandatory mobile prerequisites

步骤4 — 检测移动端必填前置条件

For mobile families (
android
,
ios
,
expo
,
react-native
,
flutter
), VoIP push is non-negotiable in standalone mode — without it, missed calls don't ring. Detect what's already wired so the per-family
-calls
skill knows what to add and what to skip:
Android:
  • Firebase Cloud Messaging — look for
    google-services.json
    in
    app/
    and
    id("com.google.gms.google-services")
    in
    app/build.gradle{.kts}
  • Service registration — look for
    <service android:name=".YourFirebaseMessagingService" ...>
    in
    AndroidManifest.xml
  • ConnectionService — look for
    android.permission.MANAGE_OWN_CALLS
    and
    BIND_TELECOM_CONNECTION_SERVICE
    in
    AndroidManifest.xml
  • Foreground service type — look for
    <service android:foregroundServiceType="phoneCall|microphone|camera">
    (Android 14+ silently crashes without
    phoneCall
    )
iOS:
  • CallKit — look for
    import CallKit
    and a
    CXProvider
    configured somewhere in source
  • PushKit — look for
    import PushKit
    and a
    PKPushRegistry
    listener (VoIP push token registration)
  • Capabilities — look for
    Background Modes
    with
    voip
    +
    audio
    +
    remote-notification
    in
    Info.plist
    and
    entitlements
  • Microphone + camera Info.plist usage strings
React Native:
  • react-native-callkeep
    (CallKit + ConnectionService bridge) in
    package.json
  • @react-native-firebase/messaging
    (Android) and a
    PushNotificationIOS
    setup
  • react-native-voip-push-notification
    for iOS VoIP push tokens
Flutter:
  • flutter_callkit_incoming
    in
    pubspec.yaml
    , OR a platform-channel bridge to native CallKit/ConnectionService
  • firebase_messaging
    for FCM
  • Native
    Info.plist
    and
    AndroidManifest.xml
    entries (Flutter doesn't auto-add these)
Surface what's wired and what's missing. The per-family
-calls
skill writes the missing pieces — it never assumes they're already there.
对于移动平台(
android
ios
expo
react-native
flutter
),独立模式下VoIP推送是不可协商的必填项——没有VoIP推送,未接来电无法响铃。检测已配置的内容,以便平台专属
-calls
技能了解需要添加和跳过的部分:
Android:
  • Firebase Cloud Messaging——检查
    app/
    目录下的
    google-services.json
    app/build.gradle{.kts}
    中的
    id("com.google.gms.google-services")
  • 服务注册——检查
    AndroidManifest.xml
    中的
    <service android:name=".YourFirebaseMessagingService" ...>
  • ConnectionService——检查
    AndroidManifest.xml
    中的
    android.permission.MANAGE_OWN_CALLS
    BIND_TELECOM_CONNECTION_SERVICE
    权限
  • 前台服务类型——检查
    <service android:foregroundServiceType="phoneCall|microphone|camera">
    (Android 14+若缺少
    phoneCall
    会静默崩溃)
iOS:
  • CallKit——检查源代码中是否有
    import CallKit
    和配置好的
    CXProvider
  • PushKit——检查源代码中是否有
    import PushKit
    PKPushRegistry
    监听器(VoIP推送令牌注册)
  • 权限——检查
    Info.plist
    entitlements
    中是否开启
    Background Modes
    并勾选
    voip
    +
    audio
    +
    remote-notification
  • 麦克风+相机权限的Info.plist使用说明字符串
React Native:
  • package.json
    中的
    react-native-callkeep
    (CallKit + ConnectionService桥接)
  • Android平台的
    @react-native-firebase/messaging
    和iOS平台的
    PushNotificationIOS
    配置
  • iOS平台的
    react-native-voip-push-notification
    用于VoIP推送令牌
Flutter:
  • pubspec.yaml
    中的
    flutter_callkit_incoming
    ,或与原生CallKit/ConnectionService的平台通道桥接
  • firebase_messaging
    用于FCM
  • 原生
    Info.plist
    AndroidManifest.xml
    配置项(Flutter不会自动添加这些)
展示已配置和缺失的内容。平台专属
-calls
技能会补充缺失部分——绝不假设这些内容已存在。

Step 5 — Show the plan and get approval

步骤5 — 展示规划并获取用户确认

Before writing anything, show the user exactly:
  • Which packages will be installed
  • Which files will be created vs modified vs left alone
  • Where the call trigger will land (with the file path)
  • Where call logs will land (or "skipped" if option 3 above)
  • For mobile: what VoIP push artifacts will be added (FCM service, CallKit provider, foreground service registration, manifest permissions, Info.plist entries)
  • What the user must do manually that the skill can't (Android: enable FCM in Firebase console; iOS: add VoIP Services certificate to App Store Connect; Flutter: bump
    minSdkVersion
    if below platform floor)
Wait for explicit approval. Then load the per-family
-calls
skill and run its scaffold.
在编写任何代码之前,向用户明确展示:
  • 将安装的包
  • 将创建、修改或保留的文件
  • 通话触发按钮的位置(含文件路径)
  • 通话记录的位置(若选择选项3则显示"跳过")
  • 移动端:将添加的VoIP推送相关内容(FCM服务、CallKit provider、前台服务注册、清单权限、Info.plist配置项)
  • 用户必须手动完成的操作(技能无法自动完成):Android:在Firebase控制台启用FCM;iOS:在App Store Connect添加VoIP服务证书;Flutter:若
    minSdkVersion
    低于平台要求则升级
等待用户明确确认。然后加载平台专属
-calls
技能并运行其框架。

Step 6 — Hand off to the per-family skill

步骤6 — 移交至平台专属技能

Load the matching skill from your context:
Detected familySkill to load
reactjs
/
nextjs
/
react-router
/
astro
cometchat-react-calls
expo
/
react-native
cometchat-native-calls
angular
cometchat-angular-calls
android
+
android_version === "v5"
cometchat-android-v5-calls
android
+
android_version === "v6"
cometchat-android-v6-calls
flutter
+
flutter_version === "v5"
cometchat-flutter-v5-calls
(existing)
flutter
+
flutter_version === "v6"
cometchat-flutter-v6-calls
(existing)
ios
cometchat-ios-calls
Pass the gathered context:
mode
(
ringing
|
session
from Step 3.0), standalone vs additive (Step 1), trigger placement (Step 3.1), log placement, mobile prereqs status.
The per-family skill loads the matching mode reference as its primary blueprint:
mode
Reference loaded inside the per-family skill
ringing
(1:1 user calls)
references/ringing-integration.md
(Android V5: same name)
session
(meeting-room URLs, no chat-side signaling)
references/call-session.md
(Android V5:
references/join-session.md
)
Additionally — if
groupCalls === true
in the gathered context (the user mentioned "group calls", "team meetings", "huddles", or selected
group
as a call target in Step 3.1), ALSO load
references/group-calls.md
from the per-family skill
. Group calls use a different signaling channel than 1:1 ringing — they broadcast a custom
"meeting"
message instead of
CometChat.initiateCall
. Loading only
ringing-integration.md
produces code that works for 1:1 but silently breaks for groups on custom-UI receivers. The
group-calls.md
reference exists for all 8 families. See the Step 3.0 disclosure above for the underlying semantic.
The per-family skill writes code; this dispatcher does not.
If the per-family skill isn't loaded into the agent's context (i.e. the user installed
@cometchat/skills
before v4.1 and never re-ran
npx @cometchat/skills add --family <family>
), tell the user once:
"I just installed the {family} calls skill into your workspace. Please re-run
/cometchat-calls
to continue — your config is saved in
.cometchat/config.json
, so the next run picks up at code generation without re-asking the placement questions."
Same hot-reload constraint as the chat dispatcher: agents snapshot the skill set at session start and don't reload mid-session. Continuing this session would mean writing calls code from training memory — which the per-family skill explicitly forbids.
从上下文加载匹配的技能:
检测到的平台类型加载的技能
reactjs
/
nextjs
/
react-router
/
astro
cometchat-react-calls
expo
/
react-native
cometchat-native-calls
angular
cometchat-angular-calls
android
+
android_version === "v5"
cometchat-android-v5-calls
android
+
android_version === "v6"
cometchat-android-v6-calls
flutter
+
flutter_version === "v5"
cometchat-flutter-v5-calls
(已存在)
flutter
+
flutter_version === "v6"
cometchat-flutter-v6-calls
(已存在)
ios
cometchat-ios-calls
传递收集到的上下文信息:
mode
(步骤3.0中的
ringing
|
session
)、独立/附加模式(步骤1)、触发按钮位置(步骤3.1)、通话记录位置、移动端前置条件状态。
平台专属技能会加载匹配模式的参考文档作为主要蓝图:
mode
平台专属技能内加载的参考文档
ringing
(一对一用户通话)
references/ringing-integration.md
(Android V5:同名文档)
session
(会议室URL,无聊天端信令)
references/call-session.md
(Android V5:
references/join-session.md
此外——如果收集到的上下文信息中
groupCalls === true
(用户提及"群组通话"、"团队会议"、"临时会议",或在步骤3.1中选择
group
作为通话目标),还需从平台专属技能中加载
references/group-calls.md
。群组通话使用的信令通道与一对一响铃式通话不同——它们会广播自定义
"meeting"
消息,而非
CometChat.initiateCall
。仅加载
ringing-integration.md
会生成仅适用于一对一通话但在自定义UI接收方的群组通话场景中静默失效的代码。所有8个平台均提供
group-calls.md
参考文档。请参阅步骤3.0中的披露了解底层逻辑。
平台专属技能负责编写代码;本调度器不编写代码。
如果平台专属技能未加载至Agent上下文(例如用户在v4.1版本前安装了
@cometchat/skills
且未重新运行
npx @cometchat/skills add --family <family>
),请告知用户一次:
"我已将{family}通话技能安装至您的工作区。请重新运行
/cometchat-calls
以继续——您的配置已保存至
.cometchat/config.json
,下次运行将直接进入代码生成步骤,无需再次询问布局问题。"
与聊天调度器相同的热重载限制:Agent在会话开始时会快照技能集,会话期间不会重新加载。继续当前会话意味着会根据训练记忆编写通话代码——这是平台专属技能明确禁止的。

Step 7 — Verify

步骤7 — 验证

After the per-family skill writes code, run:
bash
npx @cometchat/skills-cli verify --calls --json
(Verifier flag
--calls
is added in CLI 2.4.0 alongside this dispatcher; it checks for the dual-SDK init, IncomingCall root mount, VoIP push wiring on mobile, and the call trigger / logs placements the user picked.)
If verify passes, drop the user into the iteration menu — same shape as the chat dispatcher's Step 7, with calls-specific options:
  • Add a feature (recording, screen sharing, PiP, in-call chat, custom UI)
  • Customize call screen / participant list / control panel
  • Set up production auth (server-minted tokens, no Auth Key in calls flow)
  • Run diagnostics
平台专属技能编写代码完成后,运行:
bash
npx @cometchat/skills-cli verify --calls --json
(验证器标志
--calls
随本调度器一同在CLI 2.4.0版本中添加;它会检查双SDK初始化、IncomingCall根节点挂载、移动端VoIP推送配置以及用户选择的通话触发按钮/通话记录位置。)
如果验证通过,将用户引导至迭代菜单——与聊天调度器的步骤7格式相同,包含通话专属选项:
  • 添加功能(录制、屏幕共享、画中画、通话内聊天、自定义UI)
  • 自定义通话界面/参与者列表/控制面板
  • 设置生产环境认证(服务器生成令牌,通话流程中不使用Auth Key)
  • 运行诊断

Hard rules (every per-family
-calls
skill must enforce these)

硬性规则(每个平台专属
-calls
技能必须遵守)

These are the production-grade non-negotiables. The dispatcher checks them in Step 5's plan and the per-family skill is responsible for writing them:
  1. Dual-SDK contract. Chat SDK does
    initiateCall
    (sends a
    MessageType.CALL
    ); Calls SDK does
    joinSession
    . They are NOT interchangeable. The Android skill leads with this — agents trained on multi-platform CometChat data will conflate
    com.cometchat.chat.core.Call
    with
    com.cometchat.chat.models.Call
    and write code that compiles but silently breaks.
  2. VoIP push wired in standalone mode, not documented. CallKit + PushKit (iOS), ConnectionService + FCM high-priority (Android),
    react-native-callkeep
    (RN),
    flutter_callkit_incoming
    (Flutter). Documentation isn't enough — without working push, missed calls don't ring.
  3. Foreground / background lifecycle correct. Android 14+ silently crashes on wrong
    foregroundServiceType
    for ongoing calls; iOS requires CallKit reporting for background audio. Belongs in the
    -calls
    skill body, not a "see also" reference.
  4. Server-minted auth tokens for the calls path. Production calls flows must use auth tokens, never Auth Key. The skill detects existing token endpoints (same way the chat dispatcher does) and uses
    loginWithAuthToken()
    .
  5. Cleanup on hangup. Camera-light-stays-on / mic-stays-hot is the canonical "looks fine in dev, fails review" bug. Every per-family skill includes the explicit teardown checklist.
  6. Permissions with rationale. Microphone, camera, screen-record (where supported), notifications. All four, all with usage strings.
  7. IncomingCall
    mounted at app root in standalone mode.
    Not at the chat surface — calls is the whole product, the listener has to be alive everywhere.
这些是生产环境级别的不可协商规则。调度器会在步骤5的规划中检查这些规则,平台专属技能负责实现:
  1. 双SDK契约。Chat SDK执行
    initiateCall
    (发送
    MessageType.CALL
    );Calls SDK执行
    joinSession
    。二者不可互换。Android技能以此为核心——接受多平台CometChat数据训练的Agent可能会混淆
    com.cometchat.chat.core.Call
    com.cometchat.chat.models.Call
    ,从而编写可编译但静默失效的代码。
  2. 独立模式下配置VoIP推送,而非仅提供文档。iOS使用CallKit + PushKit,Android使用ConnectionService + FCM高优先级推送,RN使用
    react-native-callkeep
    ,Flutter使用
    flutter_callkit_incoming
    。仅提供文档不够——没有正常工作的推送,未接来电无法响铃。
  3. 正确处理前台/后台生命周期。Android 14+若通话时
    foregroundServiceType
    设置错误会静默崩溃;iOS要求CallKit报告后台音频状态。这些内容应包含在
    -calls
    技能主体中,而非"另请参阅"参考文档。
  4. 通话流程使用服务器生成的认证令牌。生产环境通话流程必须使用认证令牌,绝不使用Auth Key。技能会检测现有令牌端点(与聊天调度器方式相同)并使用
    loginWithAuthToken()
  5. 通话结束后清理资源。通话结束后摄像头灯保持开启/麦克风保持激活是典型的"开发环境正常,审核失败"问题。每个平台专属技能都包含明确的资源销毁清单。
  6. 带说明的权限申请。麦克风、相机、屏幕录制(支持的平台)、通知权限。这四项权限均需申请并提供使用说明字符串。
  7. 独立模式下
    IncomingCall
    挂载至应用根节点
    。而非聊天界面——通话是核心产品,监听器需在全局保持活跃。

Anti-patterns

反模式

  1. Don't try to add
    apply-feature calls
    from this dispatcher.
    That CLI command is the v4 chat-flow path — it returns the npm install command and that's it. This dispatcher does the actual integration end-to-end. If the user is in
    chat-messaging+voice-video
    mode, the chat flow already ran; just enter additive mode here. Never call
    apply-feature calls
    from inside this skill.
  2. Don't load
    cometchat-components
    or
    cometchat-placement
    (the chat catalogs).
    Those are chat-shaped. The per-family
    -calls
    skill has its own component list (CallButtons, IncomingCall, OutgoingCall, OngoingCall, CallLogs) and its own placement vocabulary (call trigger, log surface, root listener). Loading the chat catalogs leaks chat assumptions into calls code.
  3. Don't ask the chat archetype question ("Messaging app / Marketplace / SaaS / …"). That taxonomy is for where chat lives. Calls placement is where the call trigger lives + where logs live + whether VoIP push is mandatory. Different vocabulary, different recommendations.
  4. Don't skip VoIP push in standalone mode even if the user says "I'll add it later." Calls without ringing isn't a product. The dispatcher refuses standalone-mode scaffold without VoIP push wired (or at minimum scaffolded with a clear TODO and red-banner warning in the call screen).
  5. Don't mix V5 and V6 cohorts (Android, Flutter). The Calls SDK coordinates differ — V5 Android ships
    calls-sdk-android
    as a separate Cloudsmith dep; V6 folds calls into the unified
    chatuikit-{compose,kotlin}-android
    package. Same for Flutter. Read
    android_version
    /
    flutter_version
    from
    .cometchat/config.json
    and route to the matching cohort skill.
  1. 请勿尝试从本调度器调用
    apply-feature calls
    。该CLI命令是v4版本聊天流程的路径——仅返回npm安装命令。本调度器负责端到端的完整集成。如果用户处于
    chat-messaging+voice-video
    模式,聊天流程已完成;只需在此处进入附加模式。绝不要在本技能内调用
    apply-feature calls
  2. 请勿加载
    cometchat-components
    cometchat-placement
    (聊天组件目录)
    。这些是围绕聊天场景设计的。平台专属
    -calls
    技能有自己的组件列表(CallButtons、IncomingCall、OutgoingCall、OngoingCall、CallLogs)和布局术语(通话触发入口、记录界面、根监听器)。加载聊天组件目录会将聊天场景的假设引入通话代码。
  3. 请勿询问聊天原型问题("消息应用/电商平台/SaaS/…")。该分类是针对聊天界面的位置。通话布局关注的是通话触发按钮的位置 + 记录界面的位置 + VoIP推送是否为必填项。术语不同,推荐方案也不同。
  4. 独立模式下请勿跳过VoIP推送,即使用户说"我稍后再添加"。无响铃的通话不具备产品价值。调度器拒绝在未配置VoIP推送(或至少搭建框架并在通话界面添加明确的TODO和红色横幅警告)的情况下进行独立模式框架搭建。
  5. 请勿混合V5和V6版本(Android、Flutter)。Calls SDK的坐标不同——V5 Android将
    calls-sdk-android
    作为独立的Cloudsmith依赖;V6将通话功能整合至统一的
    chatuikit-{compose,kotlin}-android
    包。Flutter同理。从
    .cometchat/config.json
    读取
    android_version
    /
    flutter_version
    并路由至匹配版本的技能。

Ground truth references

基准参考资料

Per-family
-calls
skills cite from these sources. The dispatcher itself doesn't write code; the per-family skills do. References listed here so a future audit can verify which SDK signatures the skills target.
  • Android V5:
    ~/Downloads/calls-sdk/calls-sdk-android-5/
    — pre-authored 17-skill pack at
    skills/
    , dispatcher at
    AGENTS.md
    . Folded into
    cometchat-android-v5-calls/references/{recording,screen-sharing,picture-in-picture,background-handling,voip-calling,audio-controls,video-controls,participant-management,custom-ui,in-call-chat,call-logs,session-settings,event-listeners,join-session,ringing-integration,setup}.md
    .
  • iOS V5:
    ~/Downloads/calls-sdk/calls-sdk-ios-5/sample-apps/
    — sample-app code as ground truth (no pre-authored skill pack).
  • JavaScript (web):
    ~/Downloads/calls-sdk/calls-sdk-javascript-5/sample-apps/
    — sample-app code as ground truth.
  • React Native:
    ~/Downloads/calls-sdk/calls-sdk-react-native-5/sample-apps/
    — sample-app code as ground truth.
  • Flutter:
    ~/Downloads/calls-sdk/calls-sdk-flutter-5/sample-apps/
    + existing
    cometchat-flutter-v5-calls
    and
    cometchat-flutter-v6-calls
    skills (audited against the SDK).
  • Angular: Same JS Calls SDK (
    @cometchat/calls-sdk-javascript
    ) wrapped in Angular Inputs/Outputs. Sample-app code from
    ~/Downloads/calls-sdk/calls-sdk-javascript-5/
    plus existing
    cometchat-angular-features
    calls section.
平台专属
-calls
技能引用以下来源。本调度器不编写代码;平台专属技能负责编写。此处列出参考资料以便未来审核技能针对的SDK签名。
  • Android V5:
    ~/Downloads/calls-sdk/calls-sdk-android-5/
    ——
    skills/
    目录下的17个预编写技能包,
    AGENTS.md
    中的调度器。整合至
    cometchat-android-v5-calls/references/{recording,screen-sharing,picture-in-picture,background-handling,voip-calling,audio-controls,video-controls,participant-management,custom-ui,in-call-chat,call-logs,session-settings,event-listeners,join-session,ringing-integration,setup}.md
  • iOS V5:
    ~/Downloads/calls-sdk/calls-sdk-ios-5/sample-apps/
    ——示例应用代码作为基准(无预编写技能包)。
  • JavaScript(Web):
    ~/Downloads/calls-sdk/calls-sdk-javascript-5/sample-apps/
    ——示例应用代码作为基准。
  • React Native:
    ~/Downloads/calls-sdk/calls-sdk-react-native-5/sample-apps/
    ——示例应用代码作为基准。
  • Flutter:
    ~/Downloads/calls-sdk/calls-sdk-flutter-5/sample-apps/
    + 已存在的
    cometchat-flutter-v5-calls
    cometchat-flutter-v6-calls
    技能(已针对SDK审核)。
  • Angular: 基于相同的JS Calls SDK(
    @cometchat/calls-sdk-javascript
    )封装Angular Inputs/Outputs。参考
    ~/Downloads/calls-sdk/calls-sdk-javascript-5/
    中的示例应用代码以及已存在的
    cometchat-angular-features
    通话部分。

Three calling modes — pick the right one (Tier 1.8 + 1.9)

三种通话模式——选择合适的模式(Tier 1.8 + 1.9)

CometChat supports three distinct calling workflows. Route the user to the matching per-family reference:
ModeDriverWhen to usePer-family ref
StandardUI Kit (
CometChatCallButtons
+
CometChatIncomingCall
)
80% case — chat-driven calls with prebuilt UIcovered in per-family
SKILL.md
RingingChat SDK call entity + Calls SDK sessionCustom incoming/outgoing call UI on top of CometChat signaling
references/ringing-integration.md
Call SessionCalls SDK
joinSession
directly (no ringing)
Meeting-room URLs, scheduled calls, conference rooms
references/call-session.md
Standard is the default unless the user explicitly says "custom incoming call UI" (→ Ringing) or "meeting link / join with sessionId" (→ Call Session). The Tier 4 use-cases telegraph which mode they want — broadcast + team huddles use Call Session; telehealth + marketplace + support use Standard or Ringing.
CometChat支持三种不同的通话工作流。将用户路由至匹配的平台专属参考文档:
模式驱动方式使用场景平台专属参考文档
标准模式UI Kit(
CometChatCallButtons
+
CometChatIncomingCall
80%的场景——聊天驱动的通话,使用预构建UI平台专属
SKILL.md
中涵盖
响铃式Chat SDK通话实体 + Calls SDK会话在CometChat信令之上自定义来电/去电UI
references/ringing-integration.md
通话会话直接使用Calls SDK
joinSession
(无响铃)
会议室URL、预定通话、会议室
references/call-session.md
除非用户明确要求"自定义来电UI"(→响铃式)或"会议链接/通过sessionId加入"(→通话会话),否则默认使用标准模式。Tier 4用例会暗示所需模式——直播+团队临时会议使用通话会话;远程医疗+电商平台+客服使用标准模式或响铃式。

Use-case integration patterns (Tier 4)

用例集成模式(Tier 4)

If the user describes their product clearly, route to the matching use-case reference for opinionated CallSettings + UX + compliance callouts:
  • Telehealth / virtual visits
    references/use-case-telehealth.md
    — provider/patient flow, two-party consent recording, waiting room, HIPAA notes
  • Marketplace (buyer ↔ seller)
    references/use-case-marketplace.md
    — opaque UIDs, time-bounded access, anti-fraud heuristics
  • Customer support / help desk
    references/use-case-support.md
    — agent queue, auto-record for QA, post-call CSAT
  • Broadcast / webinar / town hall
    references/use-case-broadcast.md
    — locked SIDEBAR, mute-by-default attendees, raise-hand Q&A, RTMP bridge for 100+
  • Team huddle / standup / collab
    references/use-case-team.md
    — TILE layout, opt-in join, recording auto-posted to channel
Each use-case doc covers end-to-end flow + recommended
CallSettings
+ role-based UI + verification checklist. Apply on top of the per-family
-calls
skill, don't duplicate the architecture work.
如果用户清晰描述其产品,将用户路由至匹配的用例参考文档,获取针对性的CallSettings + UX +合规提示:
  • 远程医疗/虚拟问诊
    references/use-case-telehealth.md
    ——医患流程、双方同意录制、等候室、HIPAA相关说明
  • 电商平台(买家↔卖家)
    references/use-case-marketplace.md
    ——匿名UID、限时访问、反欺诈规则
  • 客户支持/服务台
    references/use-case-support.md
    ——客服队列、自动录制用于QA、通话后CSAT评分
  • 直播/研讨会/全体大会
    references/use-case-broadcast.md
    ——锁定侧边栏、参会者默认静音、举手提问、RTMP桥接支持100+人
  • 团队临时会议/站会/协作
    references/use-case-team.md
    ——网格布局、可选加入、录制内容自动发布至频道
每个用例文档涵盖端到端流程 + 推荐的
CallSettings
+ 基于角色的UI + 验证清单。在平台专属
-calls
技能基础上应用这些内容,请勿重复架构工作。

Migration playbooks

迁移指南

For customers upgrading or layering calls on top of an existing chat install, every per-family calls skill ships:
  • references/migration-v4-to-v5.md
    — Calls SDK v4 → v5 (drop-in replacement; v5 APIs unlock granular event listeners + simpler init)
  • references/add-calls-to-existing-chat.md
    — additive integration on top of an existing chat surface (init order, login order, IncomingCall mounting, server push setup)
Cite the right family. The web reference (
cometchat-react-calls
) is canonical for migration-v4-to-v5 — sister docs in other families add only family-specific deltas.
针对升级或在现有聊天集成基础上添加通话功能的客户,每个平台专属通话技能都提供:
  • references/migration-v4-to-v5.md
    ——Calls SDK v4 → v5(无缝替换;v5 API支持更细粒度的事件监听器 + 更简单的初始化)
  • references/add-calls-to-existing-chat.md
    ——在现有聊天界面上进行附加集成(初始化顺序、登录顺序、IncomingCall挂载、服务器推送设置)
引用对应平台的文档。Web参考文档(
cometchat-react-calls
)是v4到v5迁移的标准文档;其他平台的文档仅添加平台专属差异内容。

Server-side push templates (Tier 3)

服务器端推送模板(Tier 3)

VoIP push wiring is platform-specific. Three canonical templates ship under per-family
references/
:
  • iOS APNs PushKit (.p8 token auth) —
    cometchat-ios-calls/references/server-apns-pushkit.md
  • Android FCM HTTP v1 (data-only, priority HIGH) —
    cometchat-android-v5-calls/references/server-fcm-voip.md
    (V6 sister with Compose IncomingCallActivity)
  • Web Push VAPID (best-effort browser ringing) —
    cometchat-react-calls/references/server-web-push-vapid.md
    (Angular sister)
Hybrid platforms (RN, Flutter) ship
references/server-push-bridge.md
that routes to the right canonical by
Platform.OS
/
Platform.is{iOS,Android}
.
VoIP推送配置是平台专属的。三个标准模板在平台专属
references/
目录下:
  • iOS APNs PushKit(.p8令牌认证)——
    cometchat-ios-calls/references/server-apns-pushkit.md
  • Android FCM HTTP v1(仅数据,高优先级)——
    cometchat-android-v5-calls/references/server-fcm-voip.md
    (V6版本对应Compose IncomingCallActivity)
  • Web Push VAPID(浏览器响铃,尽力而为)——
    cometchat-react-calls/references/server-web-push-vapid.md
    (Angular版本对应文档)
混合平台(RN、Flutter)提供
references/server-push-bridge.md
,根据
Platform.OS
/
Platform.is{iOS,Android}
路由至对应标准模板。

What this dispatcher does NOT cover

本调度器未涵盖的内容

  • The actual code. Per-family
    -calls
    skills write the integration. This dispatcher routes.
  • AI-Agent or BYO-Agent flows. Different surface entirely; out of scope. The top-level
    cometchat
    dispatcher's Step 3.0 routes those to docs.
  • Moderation features for calls (recording-with-consent prompts, profanity filter on in-call chat, etc.). Same status as the chat dispatcher — moderation is dashboard-only.
  • Call analytics dashboards — the CometChat dashboard surfaces these, no integration work needed.
  • 实际代码编写。平台专属
    -calls
    技能负责集成代码编写。本调度器仅负责路由。
  • AI-Agent或BYO-Agent流程。完全不同的场景;超出本范围。顶级
    cometchat
    调度器的步骤3.0会将这些请求路由至文档。
  • 通话 moderation功能(需同意的录制提示、通话内聊天脏话过滤等)。与聊天调度器状态相同——moderation仅通过控制台操作。
  • 通话分析仪表盘——CometChat控制台已提供这些功能,无需集成工作。

Pointer back to chat dispatcher

跳转回聊天调度器

If the user invoked
/cometchat-calls
directly but the project has no integration at all yet (no
.cometchat/config.json
, no chat surfaces), and they pick the additive mode by mistake, redirect:
"Looks like you don't have CometChat integrated yet. For a calling-first app, that's fine — I'll run the standalone calls flow now. If you want chat alongside, run
/cometchat
first to set up chat, then come back to add calls."
Don't auto-route to
cometchat/SKILL.md
from here — it's the user's call (no pun intended) which surface is primary.
如果用户直接调用
/cometchat-calls
但项目尚未进行任何集成(无
.cometchat/config.json
,无聊天界面),且错误选择了附加模式,请重定向:
"看起来您尚未集成CometChat。如果是构建以通话为核心的应用,没问题——我现在将运行独立通话流程。如果您需要同时集成聊天,请先运行
/cometchat
设置聊天功能,再返回添加通话。"
请勿从此处自动路由至
cometchat/SKILL.md
——由用户决定哪个场景是核心(无意双关)。