Migrate the Single Call Flow

This is the connector contract for the most common case: one inbound call, accepted, connected, and ended.

Lifecycle MomentDirectionWhat Happens
Call rings on backendConnector → SalesforcepublishEvent(CALL_STARTED, { call }) with state: RINGING
Rep clicks AcceptSalesforce → ConnectoracceptCall(call) → return Promise<CallResult>
Framework publishes(auto)Framework publishes CALL_CONNECTED from your CallResult
Rep clicks MuteSalesforce → Connectormute(call) → return Promise<MuteToggleResult>
Rep clicks End CallSalesforce → ConnectorendCall(call) → return Promise<HangupResult>
Framework publishes(auto)Framework publishes HANGUP from your HangupResult
Customer hangs up firstConnector → SalesforcepublishEvent(HANGUP, { calls: [call], reason })
ACW timer expires or rep ends wrap-upSalesforce → ConnectorwrapUpCall(call) → return Promise<GenericResult>