Skip to content

Demo Part 2 Step 2 Trunk to Extension and Internal Outbound

Andrey Egorov edited this page May 18, 2026 · 2 revisions

Import: part-2-step-2-trunk-to-extension-and-internal-outbound.json

Goal

Combine both SIP routing directions in one workflow:

  • inbound trunk callers can reach an internal extension
  • registered extensions can start new outbound calls

Changes Compared with Step 1

Added area Why it matters
incoming_answer, play_extension, input_extension adds the inbound front door for trunk callers
dial_extension, wait_extension, ringing_extension, bridge_extension adds extension routing from the trunk side
play_ext_unv, break_extension keeps the inbound extension path closed and retryable

Why This Works

  • the inbound and outbound directions share the same internal extension registration universe, so the workflow can both receive extension calls and dial those same registered endpoints.
  • play_extension is blocking media with DTMF interruption, so the caller can start typing the extension before the prompt finishes.
  • input_extension relies on DTMF fallback instead of explicit rules, which lets entered extension digits flow directly into dial_extension.
  • play_ext_unv loops back to play_extension, so an unavailable extension does not escape the scenario; the caller stays inside the same extension-routing path.
  • the outbound side from step 1 remains unchanged, so the workflow still supports extension-originated external and internal calls.

How to Test

  1. Import and activate the workflow.
  2. Register at least one internal extension.
  3. Test an inbound trunk call and enter a registered extension.
  4. Test an outbound call from a registered extension.

Expected Result

Flow Result
inbound trunk to registered extension caller hears ringback, then is bridged
inbound trunk to unavailable extension caller hears unavailable prompt and returns to the extension prompt
extension-originated outbound call is routed by outgoing_type and bridged on answer

What The Next Part Adds

Part 3 merges this SIP routing line with the queue and AI line from Part 1.

Clone this wiki locally