Skip to content

SIP PBX Trigger Extension Event

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

Overview

Use SIP PBX Trigger with Trigger On = Extension Event to:

  • host extension registration inside n8n
  • receive calls originating from registered extensions
  • optionally let the workflow participate in auth decisions
  • optionally let the workflow decide whether daemon-owned global recording should start

Main Parameters

Parameter Required Shown when Description
Trigger On Yes Always Select Extension Event.
Extensions Ref Yes Always Stable public extensions group name.
Auth Mode Yes Always Static, Digest First, or Raw.
Static Credentials Yes for static auth Auth Mode = Static Collection of username/password/extension triples.
Global Call Recording No Always Enables the Recording branch.

Static Credential Fields

Field Required Description
Username Yes SIP auth username matched against inbound auth.
Password Yes SIP auth password for static auth.
Extension Yes Extension number assigned to this credential entry.

Options

Option Shown when Description
Codecs Always Allowed SIP audio codecs for this extensions route. This is an allow-list only, not a priority override. The runtime keeps its built-in codec priority. Applies both to inbound extension-side traffic on this trigger and to outbound Dial -> Make Call in Mode = Extension when the dial resolves through this extensions route.
DTMF Methods Always Allowed inbound and outbound DTMF methods for this extensions route: RFC2833, SIP INFO, Inband. This is a filter only, not a priority override. Applies both to inbound extension-side traffic on this trigger and to outbound Dial -> Make Call in Mode = Extension when the dial resolves through this extensions route.
Auth Timeout (Seconds) Auth Mode = Digest First or Raw How long the trigger waits for Respond To Auth before assuming not_applicable.
Respond to recording timeout (Seconds) Global Call Recording = on How long the trigger waits for Respond to recording.
Transport Always Current UI exposes UDP.
Local Bind Port Always UDP port for inbound SIP listener.
TLS Bind Port Always Reserved UI field for TLS listener port.
Local Bind IP Always Explicit local bind address.
Advertised IP Always Public host or IP used in Contact/Via fallback identity.
Realm Always SIP auth realm exposed to remote side.
Username Prefix Auth Mode != Raw Trigger applies only when auth username starts with this prefix. The prefix is stripped only for static credential lookup.
Continue On Auth Reject Always If enabled, a reject from this trigger does not stop later matching auth candidates on the same endpoint.

Auth Modes

Auth Mode Auth branch Meaning
Static No Runtime authenticates directly against the configured static credentials.
Digest First Yes Runtime models digest auth but asks the workflow for the decision.
Raw Yes Workflow receives the auth request with minimal runtime assumptions and decides what to do.

Media Filter Notes

Topic Behavior
Codec priority The Codecs option only removes codecs from consideration. It does not reorder them.
DTMF method priority The DTMF Methods option only enables or disables methods. It does not define a user-facing priority order.
Inband DTMF If Inband is allowed, the runtime also runs audio-tone detection in addition to SIP/RTP DTMF paths.

Output Branches

Branch When it appears Meaning
Call Always Extension-originated inbound call.
Recording Global Call Recording = on Trigger-side recording decision request.
Auth Auth Mode != Static Workflow auth decision request for inbound REGISTER or INVITE.

Call Output Payload

Field Meaning
eventType Trigger event type, typically invite.
ref Public extensions ref.
legId Live leg created for the call.
callId SIP call identifier.
direction Runtime call direction string.
extension Resolved extension number for this request.
from Caller SIP URI.
callerNumber Parsed caller number or SIP user.
callerName Parsed caller display name.
to Called SIP URI.
calledNumber Parsed called number or SIP user.
calledName Parsed called display name when present.
raw Normalized SIP inspection object.
sipPbx.ref Hidden routing metadata.
sipPbx.legId Hidden leg resolution metadata.

Auth Output Payload

Field Meaning
authRequestId Request ID for Respond To Auth.
ref Public extensions ref.
requestType SIP method being authenticated, typically register or invite.
auth Flat auth object such as username, realm, nonce, uri.
remoteIp Remote source IP.
remotePort Remote source port.
transport SIP transport, currently udp.
localIp Local listener IP used for this request.
localPort Local listener port used for this request.
raw Normalized SIP request inspection object.
sipPbx.authRequestId Hidden request handle used by automatic respond resolution.

Recording Output Payload

Field Meaning
eventType Recording trigger event type.
recordRequestId Request ID for Respond to recording.
kind Recording request kind.
ref Public extensions ref.
legId Live leg to record.
callId SIP call identifier.
direction Runtime call direction string.
extension Resolved extension number for this call.
from Caller SIP URI.
callerNumber Parsed caller number.
callerName Parsed caller display name.
to Called SIP URI.
calledNumber Parsed called number.
calledName Parsed called display name.
sipPbx.recordRequestId Hidden request handle used by automatic respond resolution.

Follow-Up Action: Respond To Auth

Use SIP PBX -> Respond -> Respond To Auth.

Parameter Required Shown when Description
Action Yes Always Allow, Verify Digest Password, Not Applicable, Challenge, or Deny.
Password Yes Action = Verify Digest Password Digest password to verify against the inbound auth request.
Extension No Action = Allow or Verify Digest Password Optional explicit extension override. Leave empty when it can be derived from the auth username.
Status Code Yes Action = Challenge or Deny SIP response status code.
Reason Yes Action = Deny SIP reason phrase or workflow-defined reject reason.
Options -> Request ID No Always Explicit auth request override. Usually resolved automatically from the trigger item.

Follow-Up Action: Respond to recording

For recording parameters and outputs, see SIP PBX Global Recording.

The Recording branch can also fire for outbound calls created through Dial -> Make Call when that dial resolves through this extensions route.

Clone this wiki locally