Skip to main content
Version: 0.9.14

Managed callback actions

Managed LLM providers can continue a call by returning messages, and can also ask Delphi to run configured call actions. This page is the field-level reference for those callback action payloads.

The most important rule: callback actions are requests, not permissions. The Flow Designer still controls which actions are enabled, which sources may send them, and which platform/team restrictions apply.

Where actions appear

For TOBi-style callbacks, actions are sent in the top-level actions array of the webhook body:

{
"conversation": {"identifier": {"id": "channel-123"}},
"messages": {
"message": [
{
"content": {
"textMessage": {
"textPlain": "I will connect you now."
}
}
}
]
},
"actions": [
{
"name": "transfer",
"value": {
"transferTarget": "tel:+491701234567",
"transferSipHeaders": [{"name": "X-Queue", "value": "care"}]
}
}
]
}

Each item has:

FieldTypeMeaning
namestringAction name. Supported call-control names are transfer, handover, and hangup.
valueobjectAction-specific parameters. Unknown fields are ignored by the managed action mapper.

handover is treated as a synonym for transfer.

Resolution and safety

When a callback action arrives, Delphi normalizes it into a runtime command with source: "external_llm", then resolves it against the flow's managed gateway settings.

Order of precedence:

  1. Callback action fields override the managed action defaults for that one call.
  2. Flow defaults in gatewayProfile.actions.transfer / gatewayProfile.actions.hangup fill missing values.
  3. Hard defaults apply only when neither the callback nor the flow sets a value.
  4. gatewayProfile.commandPolicies must allow the command type from external_llm.
  5. Platform restrictions still apply: blocked destinations, missing trunks, SIP routing failure, or disabled managed actions can still reject the request.

SIP header arrays are limited to 100 headers and 12,000 total characters across names and values.

Failover and bot readiness use the same transfer/hangup action shapes, but they are configured in the flow rather than sent by the provider callback. See Failover activities and Bot readiness.

Runtime configuration updates

v0.9.14 lets managed providers update a small set of live-call runtime settings without granting separate transfer or hangup permissions.

CommandTypical fieldsEffect
update_dtmf_configmaxDigits, timeoutMs, interDigitTimeoutMs, terminator, enabledChanges how Delphi collects keypad input for the active TOBi-managed call.
update_bot_delay_configbotNoInputTimeoutMs, botNoInputSpeech, botNoInputUrl, botNoInputRetries, botNoInputGiveUpTimeoutMs, resumeRecognitionTimeoutMsChanges intermediate comfort-message and final give-up behavior while waiting for bot responses.

These updates are runtime configuration changes for the current call. They do not bypass transfer restrictions, hangup policy, or provider permissions for actual call-control actions.

Example DTMF config update:

{
"name": "update_dtmf_config",
"value": {
"enabled": true,
"maxDigits": 6,
"timeoutMs": 8000,
"interDigitTimeoutMs": 2500,
"terminator": "#"
}
}

Example bot-delay config update:

{
"name": "update_bot_delay_config",
"value": {
"botNoInputTimeoutMs": 10000,
"botNoInputSpeech": "One moment, I am still checking that.",
"botNoInputRetries": 1,
"botNoInputGiveUpTimeoutMs": 30000
}
}

Transfer action

Use name: "transfer" or name: "handover" to request a handoff.

Transfer fields

Callback fieldTypeMaps toMeaning
transferTargetstringtargetDestination phone number, tel: URI, sip: URI, or sips: URI. A leading tel: prefix is stripped before execution.
targetstringtargetAlternative name for transferTarget.
transferMethodstringmethodTransfer execution method. Supported values: sip_refer, sip_refer_replace, sip_invite, sip_invite_bridge, sip_invite_reinvite_p2p, sip_bye.
transferReferredByURLstringreferredByValue for SIP Referred-By metadata when the method uses SIP referral semantics.
transferNotificationsbooleantransferNotificationsWhether Delphi should keep notification/control behavior for transfer outcome handling when supported by the integration.
transferNotificationsHangupMSnumbernotificationsHangupMsGrace period in milliseconds before disconnecting after a successful transfer notification path. Maximum 10000.
transferRoutingPoolstringroutingPoolRouting pool selector for number targets. Ignored for full SIP URI targets, which route by URI host.
transferSipHeadersarraysipHeadersExplicit SIP headers to add to the transfer request. Overrides configured default headers for this call.
transferSipQueryParamsobject or arraysipQueryParamsQuery parameters appended to the target / Refer-To URI.
sipQueryParamsobject or arraysipQueryParamsAlternative name for transferSipQueryParams.
transferMessagestringmessageAlias for the transfer announcement message.
transferPlayMessagebooleanplayMessageAlias that controls whether Delphi plays the configured transfer message.
transferCanConfirmbooleancanConfirmAlias that controls whether the provider may ask for confirmation before transfer.
handoverReasonstringreasonSIP Reason text for sip_bye disconnect-reconnect transfers.
hangupReasonstringreasonFallback reason when handoverReason is not set. Used by sip_bye.

transferTarget is required for all transfer methods except sip_bye. With sip_bye, the carrier can reroute based on BYE headers instead of a target URI.

Transfer methods

MethodBehavior
sip_referBlind SIP REFER handoff.
sip_refer_replaceSIP REFER with replace/attended semantics where supported.
sip_inviteOriginates a new outbound leg and keeps the gateway in the media path.
sip_invite_bridgeINVITE-based bridge behavior.
sip_invite_reinvite_p2pINVITE setup with peer-to-peer RTP re-INVITE when supported.
sip_byeDisconnect-reconnect handoff. Sends BYE with routing headers/reason so the carrier can reroute the caller.

Header format

Use {name, value} objects for SIP headers:

{
"name": "transfer",
"value": {
"transferTarget": "sip:agent@pbx.example.com",
"transferSipHeaders": [
{"name": "X-Genesys-IPCC_Skill", "value": "care"},
{"name": "X-Delphi-Intent", "value": "billing"}
]
}
}

Query parameter format

transferSipQueryParams accepts either an object:

{
"name": "transfer",
"value": {
"transferTarget": "sip:agent@pbx.example.com",
"transferSipQueryParams": {
"X-Case": "12345",
"X-Language": "de-DE"
}
}
}

or an array of {name, value} pairs:

{
"name": "transfer",
"value": {
"transferTarget": "sip:agent@pbx.example.com",
"sipQueryParams": [
{"name": "X-Case", "value": "12345"},
{"name": "X-Language", "value": "de-DE"}
]
}
}

Transfer examples

Basic PSTN transfer:

{
"name": "transfer",
"value": {
"transferTarget": "tel:+491701234567"
}
}

Transfer through a routing pool with SIP headers:

{
"name": "transfer",
"value": {
"transferTarget": "+49301234567",
"transferRoutingPool": "support-pool",
"transferSipHeaders": [{"name": "X-Delphi-Reason", "value": "customer_requested_agent"}]
}
}

Disconnect-reconnect transfer using BYE headers:

{
"name": "transfer",
"value": {
"transferMethod": "sip_bye",
"handoverReason": "reroute_to_queue",
"transferSipHeaders": [
{"name": "X-Reroute", "value": "queue-7"},
{"name": "X-Caller-Language", "value": "de-DE"}
]
}
}

Hangup action

Use name: "hangup" when the provider decides the call should end.

Hangup fields

Callback fieldTypeMaps toMeaning
hangupReasonstringreasonReason recorded for the hangup and, where applicable, placed on SIP signaling / call status data.
hangupSipHeadersarraysipHeadersSIP headers to add to the BYE message. Overrides configured default BYE headers for this call.
botOperationResultstringbotOperationResultBot outcome recorded for CDR/call-status use. Supported values: success, failure.
botOperationDataobjectbotOperationDataAdditional structured bot outcome data recorded with the operation result.

Hangup execution also uses the flow's configured hangup defaults. Full playback and disconnect order: Speech playback and hangup.

Flow settingEffect
waitForSilenceWhether Delphi waits for active TTS playback before disconnecting. Defaults to true.
farewellMessageOptional message Delphi can play before the hangup.
allowMessageOverrideWhether a runtime hangup command may replace the configured farewell message.
delayBotDisconnectMsGrace period after wait-for-silence, before the channel hangup. Maximum 30000.
headerRulesOutbound Channel Data Forwarding rules that produce BYE headers from call metadata.

Hangup examples

End the call with a reason:

{
"name": "hangup",
"value": {
"hangupReason": "conversationCompleted"
}
}

End the call and add BYE headers:

{
"name": "hangup",
"value": {
"hangupReason": "conversationCompleted",
"hangupSipHeaders": [
{"name": "X-Genesys-hangupReason", "value": "conversationCompleted"},
{"name": "X-Genesys-IPCC_Skill", "value": "care"}
]
}
}

Record a bot operation outcome:

{
"name": "hangup",
"value": {
"hangupReason": "done",
"botOperationResult": "success",
"botOperationData": {
"feedback": "cooperative",
"intent": "appointment_confirmed"
}
}
}

Failover activities

Failover activities are configured on the managed gateway profile, not sent by callback. They describe what Delphi should do when a runtime failure happens after the call is already active.

Failover is stored under gatewayProfile.failover:

{
"gatewayProfile": {
"failover": {
"enabled": true,
"botNoInputGiveUpTimeoutMs": 30000,
"botNoInputTimeoutMs": 10000,
"botNoInputSpeech": "One moment, I am still checking that.",
"botNoInputRetries": 1,
"policies": [
{
"triggers": ["bot_timeout"],
"action": "transfer",
"transfer": {
"target": "+49301234567",
"method": "sip_refer",
"routingPool": "support-pool",
"sipHeaders": [{"name": "X-Failover", "value": "bot_timeout"}]
}
},
{
"triggers": ["bot_error", "system_error"],
"action": "hangup",
"hangup": {
"reason": "failover",
"sipHeaders": [{"name": "X-End-Reason", "value": "failover"}]
}
}
]
}
}
}

Failover fields

FieldTypeMeaning
enabledbooleanEnables failover processing for the managed gateway profile.
botNoInputGiveUpTimeoutMsnumberFinal no-response watchdog for bot_timeout. Replaces botResponseTimeoutMs; allowed range depends on the active flow validation.
botNoInputTimeoutMsnumberIntermediate no-input timeout before playing a comfort message.
botNoInputSpeech / botNoInputUrlstringComfort message text or media URL played while waiting for the bot.
botNoInputRetriesnumberNumber of intermediate comfort attempts before the final give-up timeout.
policies[]arrayOrdered failover steps. Delphi evaluates matching policies in array order. Maximum 10.
policies[].triggers[]arrayFailure classes that activate the policy.
policies[].actionstringtransfer or hangup.
policies[].transferobjectTransfer action shape. Uses the same fields as managed transfer defaults: target, method, mediaMode, message, playMessage, canConfirm, maxRingTime, callerId, referredBy, disconnectBotLeg, transferNotifications, notificationsHangupMs, routingPool, sipHeaders, sipQueryParams, reason.
policies[].hangupobjectHangup action shape. Uses the same fields as managed hangup defaults: reason, waitForSilence, sipHeaders, delayBotDisconnectMs, botOperationResult, botOperationData.
policies[].descriptionstringOptional human-readable note for reviewers.

Failover triggers

TriggerWhen it fires
bot_timeoutThe managed bot/LLM reaches the final botNoInputGiveUpTimeoutMs watchdog without producing a response.
bot_errorThe managed bot/LLM returns or raises an error.
stt_errorSpeech-to-text setup or runtime processing fails.
tts_errorText-to-speech setup or runtime playback fails.
system_errorInternal gateway/runtime error.

Transfer failover is converted into a normalized runtime command with source: "flow_engine" and then follows the same transfer validation as callback-triggered transfer. Hangup failover follows the same hangup validation and SIP BYE header handling as callback-triggered hangup.

Bot readiness

Bot readiness is pre-answer inbound handling. It decides whether Delphi answers immediately or waits until provider preparation, such as TOBi createConversation, succeeds.

Readiness can be configured as a flow-wide default under gatewayProfile.inbound, and entry points can override it with their own inbound block.

{
"gatewayProfile": {
"inbound": {
"answerWhen": "ready",
"readyTimeoutMs": 5000,
"onNotReady": "transfer",
"transfer": {
"target": "+49301234567",
"method": "sip_refer",
"routingPool": "support-pool",
"sipHeaders": [{"name": "X-Not-Ready", "value": "tobi_timeout"}]
}
}
}
}

Readiness fields

FieldTypeMeaning
answerWhenstringready waits until inbound readiness gates pass before sending SIP 200 OK; immediate answers without waiting. Default ready.
readyTimeoutMsnumberMaximum wait for readiness before onNotReady runs. Maximum 60000; default 5000. Ignored when answerWhen is immediate.
onNotReadystringWhat to do when readiness fails or times out. Values: busy, hangup, transfer. Default busy.
hangupobjectUsed when onNotReady is hangup. Supports reason, sipHeaders, and headerRules.
transferobjectUsed when onNotReady is transfer. Supports target, method, mediaMode, routingPool, sipHeaders, headerRules, maxRingTime, callerId, referredBy, and reason.

Not-ready actions

onNotReadyBehavior
busyRejects the inbound call with SIP busy behavior before answer.
hangupEnds the call with optional SIP Reason/header data. This path resolves through the managed hangup action with waitForSilence: false.
transferAnswers, then transfers the caller to the configured target. This path resolves through the managed transfer action.

Use readiness for failures before the provider is ready to talk to the caller. Use failover for failures after the live managed interaction has started.

The callback values above are per-call overrides. Persistent defaults live in the Flow Designer: