{ "name": "n8n-sip-pbx-demo-part-1-step-1-trunk-to-queue-basic", "nodes": [ { "parameters": { "triggerOn": "trunk", "ref": "external", "trunkConnectionMode": "dynamic", "trunkStaticUsername": "trunk", "trunkStaticPassword": "Passw0rd", "options": {} }, "type": "n8n-nodes-sip-pbx.sipPbxTrigger", "typeVersion": 1, "position": [ -3520, 3072 ], "id": "99ad2fa2-7736-4bbe-9d1f-176d5f5a9461", "name": "external" }, { "parameters": { "resource": "call", "operation": "call.answer", "options": {} }, "type": "n8n-nodes-sip-pbx.sipPbx", "typeVersion": 1, "position": [ -3312, 3072 ], "id": "61c158a4-8585-47af-aeee-982e59c04704", "name": "incoming_answer" }, { "parameters": { "resource": "media", "operation": "media.playAudio", "sourceType": "http", "playbackHttpUrl": "https://translate.google.com/translate_tts?client=tw-ob&tl=en&q=Press%201%20if%20you%20are%20a%20customer,%20or%202%20if%20you%20would%20like%20to%20become%20one", "interruptOn": [ "dtmf" ], "options": {} }, "type": "n8n-nodes-sip-pbx.sipPbx", "typeVersion": 1, "position": [ -2064, 3072 ], "id": "46124451-0120-42e5-9d1b-0f679cb66b11", "name": "play_queues" }, { "parameters": { "resource": "call", "operation": "call.wait", "timeoutSeconds": 5, "rules": { "item": [ { "pattern": "1", "label": "Support" }, { "pattern": "2", "label": "Sales" } ] }, "waitDtmfFallbackEnabled": true, "options": {} }, "type": "n8n-nodes-sip-pbx.sipPbx", "typeVersion": 1, "position": [ -1856, 3024 ], "id": "2c327637-7319-45ba-9fde-969c21f0d9be", "name": "input_queue" }, { "parameters": { "resource": "queue", "operation": "queue.putLeg", "ref": "support", "options": {} }, "type": "n8n-nodes-sip-pbx.sipPbx", "typeVersion": 1, "position": [ -1616, 2944 ], "id": "0f0cc63b-37fa-448c-b6a2-7099feead01c", "name": "put_support" }, { "parameters": { "resource": "queue", "operation": "queue.putLeg", "ref": "sales", "options": {} }, "type": "n8n-nodes-sip-pbx.sipPbx", "typeVersion": 1, "position": [ -1616, 3104 ], "id": "d2cee325-44b9-4070-98fd-f23677ad073e", "name": "put_sales" }, { "parameters": { "triggerOn": "queue", "ref": "support", "queueExtensions": "101,102" }, "type": "n8n-nodes-sip-pbx.sipPbxTrigger", "typeVersion": 1, "position": [ -3520, 3760 ], "id": "c269335c-e05e-4d03-8fbb-d2eead22ec34", "name": "queue_support" }, { "parameters": { "triggerOn": "queue", "ref": "sales", "queueExtensions": "102,103" }, "type": "n8n-nodes-sip-pbx.sipPbxTrigger", "typeVersion": 1, "position": [ -3520, 4592 ], "id": "9310ef3b-4564-4dde-99e0-5ce5de66df85", "name": "queue_sales" }, { "parameters": { "resource": "media", "operation": "media.playAudio", "sourceType": "http", "playbackHttpUrl": "https://streams.radiomast.io/ref-32k-mp3-mono", "options": { "mediaExecutionMode": "background" } }, "type": "n8n-nodes-sip-pbx.sipPbx", "typeVersion": 1, "position": [ -3248, 3744 ], "id": "ebb84866-63a1-4014-b4a3-b7a68bbb4bc4", "name": "play_music" }, { "parameters": { "resource": "queue", "operation": "queue.getStats", "queueStatsTarget": "legId", "options": {} }, "type": "n8n-nodes-sip-pbx.sipPbx", "typeVersion": 1, "position": [ -3040, 3744 ], "id": "03984f36-6b54-49df-9e6b-270d15cdccd3", "name": "queue_stat" }, { "parameters": { "resource": "media", "operation": "media.playAudio", "sourceType": "http", "playbackHttpUrl": "=https://translate.google.com/translate_tts?client=tw-ob&tl=en&q=Your%20place%20in%20the%20queue:%20{{ $json.position }}.", "options": { "duckingFactor": 10 } }, "type": "n8n-nodes-sip-pbx.sipPbx", "typeVersion": 1, "position": [ -2832, 3744 ], "id": "de487621-b562-4272-adc6-e22da5c9c843", "name": "play_stat" }, { "parameters": { "resource": "call", "operation": "call.wait", "options": { "interruptReasons": [ "call_queue_removed" ] }, "timeoutSeconds": 30 }, "type": "n8n-nodes-sip-pbx.sipPbx", "typeVersion": 1, "position": [ -2624, 3712 ], "id": "5008cacc-ec76-44b7-84cd-f0f663d56dc3", "name": "wait_music_loop" }, { "parameters": {}, "type": "n8n-nodes-base.noOp", "typeVersion": 1, "position": [ -3248, 4192 ], "id": "99ad6d81-4bb8-4f94-9c58-0ca3da004a41", "name": "dispatch_entry" }, { "parameters": { "operation": "dial.wait", "dialTimeoutSeconds": 10 }, "type": "n8n-nodes-sip-pbx.sipPbx", "typeVersion": 1, "position": [ -3040, 4144 ], "id": "1f7a52ef-255b-46a0-a60c-cb56784aec89", "name": "wait_agent" }, { "parameters": { "resource": "call", "operation": "call.bridge", "legAId": "={{ $json.legId }}", "legBId": "={{ $('dispatch_entry').item.json.legId }}", "options": {} }, "type": "n8n-nodes-sip-pbx.sipPbx", "typeVersion": 1, "position": [ -2208, 4112 ], "id": "1b08b807-9e91-4ea9-b9f5-540c70a92503", "name": "bridge_agent" }, { "parameters": { "operation": "dial.break", "options": {} }, "type": "n8n-nodes-sip-pbx.sipPbx", "typeVersion": 1, "position": [ -2832, 4288 ], "id": "ea9c03ec-b8ff-4c14-bc5d-a04ebb74004d", "name": "break_agent" }, { "parameters": { "resource": "media", "operation": "media.playAudio", "sourceType": "http", "playbackHttpUrl": "https://translate.google.com/translate_tts?client=tw-ob&tl=en&q=There%20are%20no%20representatives%20available%20online.%20Please%20call%20back%20later.", "options": { "legId": "={{ $json.legId }}", "stopOtherMedia": true } }, "type": "n8n-nodes-sip-pbx.sipPbx", "typeVersion": 1, "position": [ -2416, 4624 ], "id": "445bbf22-377f-4532-a156-f59a498b19e1", "name": "play_offline" }, { "parameters": { "triggerOn": "extensions", "ref": "internal", "staticCredentials": { "item": [ { "username": "user1", "password": "Passw0rd", "extension": "101" }, { "username": "user2", "password": "Passw0rd", "extension": "102" }, { "username": "user3", "password": "Passw0rd", "extension": "103" } ] }, "extensionsEnableCallRecording": false, "options": {} }, "type": "n8n-nodes-sip-pbx.sipPbxTrigger", "typeVersion": 1, "position": [ -3520, 3440 ], "id": "34c0d499-5535-4661-aff3-3e4fa9fd8dbb", "name": "internal" } ], "pinData": {}, "connections": { "external": { "main": [ [ { "node": "incoming_answer", "type": "main", "index": 0 } ] ] }, "play_queues": { "main": [ [ { "node": "input_queue", "type": "main", "index": 0 } ], [ { "node": "input_queue", "type": "main", "index": 0 } ] ] }, "input_queue": { "main": [ [ { "node": "put_support", "type": "main", "index": 0 } ], [ { "node": "put_sales", "type": "main", "index": 0 } ], [ { "node": "play_queues", "type": "main", "index": 0 } ], [ { "node": "put_sales", "type": "main", "index": 0 } ], [] ] }, "queue_support": { "main": [ [ { "node": "play_music", "type": "main", "index": 0 } ], [ { "node": "dispatch_entry", "type": "main", "index": 0 } ], [ { "node": "play_offline", "type": "main", "index": 0 } ] ] }, "queue_sales": { "main": [ [ { "node": "play_music", "type": "main", "index": 0 } ], [ { "node": "dispatch_entry", "type": "main", "index": 0 } ], [ { "node": "play_offline", "type": "main", "index": 0 } ] ] }, "wait_agent": { "main": [ [ { "node": "bridge_agent", "type": "main", "index": 0 } ], [], [ { "node": "break_agent", "type": "main", "index": 0 } ], [] ] }, "play_music": { "main": [ [ { "node": "queue_stat", "type": "main", "index": 0 } ] ] }, "queue_stat": { "main": [ [ { "node": "play_stat", "type": "main", "index": 0 } ] ] }, "play_stat": { "main": [ [ { "node": "wait_music_loop", "type": "main", "index": 0 } ], [ { "node": "wait_music_loop", "type": "main", "index": 0 } ] ] }, "dispatch_entry": { "main": [ [ { "node": "wait_agent", "type": "main", "index": 0 } ] ] }, "wait_music_loop": { "main": [ [], [ { "node": "queue_stat", "type": "main", "index": 0 } ], [] ] }, "incoming_answer": { "main": [ [ { "node": "play_queues", "type": "main", "index": 0 } ] ] } }, "active": false, "settings": { "executionOrder": "v1", "binaryMode": "separate", "timeSavedMode": "fixed", "saveDataSuccessExecution": "all", "callerPolicy": "workflowsFromSameOwner", "availableInMCP": false }, "meta": { "templateCredsSetupCompleted": true }, "tags": [] }