Wiki source code of SIP
Version 1.2 by Aaron Blackburn on 2026/09/01 18:31
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | {{html clean="false"}} | ||
| 2 | <!-- | ||
| 3 | XWiki usage: paste everything in this file into an HTML macro. | ||
| 4 | --> | ||
| 5 | <style> | ||
| 6 | @import url('https://fonts.googleapis.com/css2?family=Host+Grotesk:wght@300;400;500;600;700;800&display=swap'); | ||
| 7 | |||
| 8 | .fd-sip-diag, .fd-sip-diag * { box-sizing: border-box; } | ||
| 9 | .fd-sip-diag { | ||
| 10 | --fd-navy: #003366; | ||
| 11 | --fd-dark-navy: #001a33; | ||
| 12 | --fd-blue: #307ab2; | ||
| 13 | --fd-sky: #38b2e3; | ||
| 14 | --fd-bright-cyan: #5ed2ff; | ||
| 15 | --fd-red: #cf333d; | ||
| 16 | --fd-slate: #2e404d; | ||
| 17 | --fd-grey: #8f9499; | ||
| 18 | --fd-lightgrey: #e2e8f0; | ||
| 19 | --fd-offwhite: #f8fafc; | ||
| 20 | --fd-max-w: 1140px; | ||
| 21 | |||
| 22 | font-family: 'Host Grotesk', system-ui, -apple-system, sans-serif; | ||
| 23 | color: var(--fd-slate); | ||
| 24 | background: #ffffff; | ||
| 25 | max-width: var(--fd-max-w); | ||
| 26 | margin: 0 auto; | ||
| 27 | padding: 24px 16px; | ||
| 28 | } | ||
| 29 | |||
| 30 | /* ---------- HEADER BANNER ---------- */ | ||
| 31 | .fd-sip-diag .diag-header { | ||
| 32 | background: radial-gradient(circle at 50% 35%, rgba(13, 71, 128, 0.78) 0%, rgba(0, 51, 102, 0.93) 60%, rgba(0, 26, 51, 0.98) 100%), | ||
| 33 | url('Fiber Optic Theme.JPG') center/cover no-repeat; | ||
| 34 | padding: 40px 32px; | ||
| 35 | border-radius: 20px; | ||
| 36 | text-align: center; | ||
| 37 | color: #ffffff; | ||
| 38 | box-shadow: inset 0 0 60px rgba(0, 26, 51, 0.6), 0 12px 32px rgba(0, 51, 102, 0.12); | ||
| 39 | margin-bottom: 32px; | ||
| 40 | } | ||
| 41 | .fd-sip-diag .diag-header p.kicker { | ||
| 42 | color: var(--fd-bright-cyan); | ||
| 43 | font-weight: 800; | ||
| 44 | font-size: .8rem; | ||
| 45 | text-transform: uppercase; | ||
| 46 | letter-spacing: .18em; | ||
| 47 | margin: 0 0 8px; | ||
| 48 | text-shadow: 0 2px 10px rgba(0, 26, 51, 0.8); | ||
| 49 | } | ||
| 50 | .fd-sip-diag .diag-header h1 { | ||
| 51 | font-weight: 800; | ||
| 52 | font-size: 2.25rem; | ||
| 53 | margin: 0 0 10px; | ||
| 54 | letter-spacing: -0.02em; | ||
| 55 | text-shadow: 0 3px 12px rgba(0, 26, 51, 0.9); | ||
| 56 | } | ||
| 57 | .fd-sip-diag .diag-header p.sub { | ||
| 58 | color: #f8fafc; | ||
| 59 | font-weight: 400; | ||
| 60 | font-size: 1rem; | ||
| 61 | max-width: 680px; | ||
| 62 | margin: 0 auto; | ||
| 63 | line-height: 1.5; | ||
| 64 | text-shadow: 0 2px 8px rgba(0, 26, 51, 0.95); | ||
| 65 | } | ||
| 66 | |||
| 67 | /* ---------- DIAGRAM ARCHITECTURE GRID ---------- */ | ||
| 68 | .fd-sip-diag .arch-grid { | ||
| 69 | display: grid; | ||
| 70 | grid-template-columns: 1fr 120px 1.2fr 120px 1fr; | ||
| 71 | align-items: center; | ||
| 72 | gap: 12px; | ||
| 73 | margin-bottom: 36px; | ||
| 74 | } | ||
| 75 | |||
| 76 | .fd-sip-diag .node-box { | ||
| 77 | background: rgba(255, 255, 255, 0.95); | ||
| 78 | border: 2px solid var(--fd-lightgrey); | ||
| 79 | border-radius: 16px; | ||
| 80 | padding: 24px 20px; | ||
| 81 | text-align: center; | ||
| 82 | box-shadow: 0 8px 24px rgba(0, 30, 60, 0.06); | ||
| 83 | position: relative; | ||
| 84 | } | ||
| 85 | |||
| 86 | .fd-sip-diag .node-box.fd-cloud { | ||
| 87 | background: linear-gradient(180deg, #f0f7fc 0%, #ffffff 100%); | ||
| 88 | border-color: var(--fd-blue); | ||
| 89 | } | ||
| 90 | .fd-sip-diag .node-box.firewall { | ||
| 91 | background: linear-gradient(180deg, #fff5f5 0%, #ffffff 100%); | ||
| 92 | border-color: var(--fd-red); | ||
| 93 | } | ||
| 94 | .fd-sip-diag .node-box.cust-pbx { | ||
| 95 | background: linear-gradient(180deg, var(--fd-offwhite) 0%, #ffffff 100%); | ||
| 96 | border-color: var(--fd-navy); | ||
| 97 | } | ||
| 98 | |||
| 99 | .fd-sip-diag .node-badge { | ||
| 100 | display: inline-block; | ||
| 101 | padding: 4px 10px; | ||
| 102 | font-size: 0.72rem; | ||
| 103 | font-weight: 700; | ||
| 104 | text-transform: uppercase; | ||
| 105 | letter-spacing: 0.08em; | ||
| 106 | border-radius: 20px; | ||
| 107 | margin-bottom: 12px; | ||
| 108 | } | ||
| 109 | .fd-cloud .node-badge { background: var(--fd-blue); color: #ffffff; } | ||
| 110 | .firewall .node-badge { background: var(--fd-red); color: #ffffff; } | ||
| 111 | .cust-pbx .node-badge { background: var(--fd-navy); color: #ffffff; } | ||
| 112 | |||
| 113 | .fd-sip-diag .node-box h3 { | ||
| 114 | margin: 0 0 6px; | ||
| 115 | font-size: 1.2rem; | ||
| 116 | color: var(--fd-navy); | ||
| 117 | font-weight: 700; | ||
| 118 | } | ||
| 119 | .fd-sip-diag .node-box p.ip-addr { | ||
| 120 | font-family: monospace; | ||
| 121 | font-size: 0.85rem; | ||
| 122 | font-weight: 700; | ||
| 123 | color: var(--fd-slate); | ||
| 124 | background: #eef4f8; | ||
| 125 | padding: 4px 8px; | ||
| 126 | border-radius: 6px; | ||
| 127 | display: inline-block; | ||
| 128 | margin: 4px 0 10px; | ||
| 129 | } | ||
| 130 | .fd-sip-diag .node-box p.desc { | ||
| 131 | font-size: 0.82rem; | ||
| 132 | color: var(--fd-slate); | ||
| 133 | margin: 0; | ||
| 134 | line-height: 1.4; | ||
| 135 | } | ||
| 136 | |||
| 137 | /* Connector Arrows */ | ||
| 138 | .fd-sip-diag .flow-connector { | ||
| 139 | text-align: center; | ||
| 140 | position: relative; | ||
| 141 | } | ||
| 142 | .fd-sip-diag .arrow-line { | ||
| 143 | height: 3px; | ||
| 144 | background: var(--fd-blue); | ||
| 145 | position: relative; | ||
| 146 | margin: 12px 0; | ||
| 147 | } | ||
| 148 | .fd-sip-diag .arrow-line::before, .fd-sip-diag .arrow-line::after { | ||
| 149 | content: ''; | ||
| 150 | position: absolute; | ||
| 151 | top: -4px; | ||
| 152 | width: 0; height: 0; | ||
| 153 | border-style: solid; | ||
| 154 | } | ||
| 155 | /* Left Arrowhead */ | ||
| 156 | .fd-sip-diag .arrow-line::before { | ||
| 157 | left: -2px; | ||
| 158 | border-width: 5px 8px 5px 0; | ||
| 159 | border-color: transparent var(--fd-blue) transparent transparent; | ||
| 160 | } | ||
| 161 | /* Right Arrowhead */ | ||
| 162 | .fd-sip-diag .arrow-line::after { | ||
| 163 | right: -2px; | ||
| 164 | border-width: 5px 0 5px 8px; | ||
| 165 | border-color: transparent transparent transparent var(--fd-blue); | ||
| 166 | } | ||
| 167 | .fd-sip-diag .flow-label { | ||
| 168 | font-size: 0.72rem; | ||
| 169 | font-weight: 700; | ||
| 170 | color: var(--fd-navy); | ||
| 171 | text-transform: uppercase; | ||
| 172 | letter-spacing: 0.05em; | ||
| 173 | background: var(--fd-offwhite); | ||
| 174 | padding: 2px 6px; | ||
| 175 | border-radius: 4px; | ||
| 176 | border: 1px solid var(--fd-lightgrey); | ||
| 177 | } | ||
| 178 | |||
| 179 | /* ---------- RULES & SPECS CARDS ---------- */ | ||
| 180 | .fd-sip-diag .rules-grid { | ||
| 181 | display: grid; | ||
| 182 | grid-template-columns: 1fr 1fr; | ||
| 183 | gap: 20px; | ||
| 184 | margin-bottom: 32px; | ||
| 185 | } | ||
| 186 | .fd-sip-diag .rule-card { | ||
| 187 | background: rgba(255, 255, 255, 0.95); | ||
| 188 | border: 1px solid var(--fd-lightgrey); | ||
| 189 | border-left: 5px solid var(--fd-sky); | ||
| 190 | border-radius: 12px; | ||
| 191 | padding: 20px 24px; | ||
| 192 | box-shadow: 0 4px 16px rgba(0, 30, 60, 0.04); | ||
| 193 | } | ||
| 194 | .fd-sip-diag .rule-card.outbound { | ||
| 195 | border-left-color: var(--fd-blue); | ||
| 196 | } | ||
| 197 | .fd-sip-diag .rule-card h4 { | ||
| 198 | margin: 0 0 10px; | ||
| 199 | font-size: 1.05rem; | ||
| 200 | color: var(--fd-navy); | ||
| 201 | display: flex; | ||
| 202 | align-items: center; | ||
| 203 | gap: 8px; | ||
| 204 | } | ||
| 205 | .fd-sip-diag .rule-card ul { | ||
| 206 | margin: 0; | ||
| 207 | padding-left: 18px; | ||
| 208 | font-size: 0.9rem; | ||
| 209 | line-height: 1.5; | ||
| 210 | } | ||
| 211 | .fd-sip-diag .rule-card li { margin-bottom: 6px; } | ||
| 212 | |||
| 213 | /* ---------- TROUBLESHOOTING / PITFALLS SECTION ---------- */ | ||
| 214 | .fd-sip-diag .pitfalls-container { | ||
| 215 | background: #fff8f8; | ||
| 216 | border: 1px solid #fecaca; | ||
| 217 | border-radius: 16px; | ||
| 218 | padding: 28px; | ||
| 219 | box-shadow: 0 8px 24px rgba(207, 51, 61, 0.05); | ||
| 220 | } | ||
| 221 | .fd-sip-diag .pitfalls-header { | ||
| 222 | display: flex; | ||
| 223 | align-items: center; | ||
| 224 | gap: 12px; | ||
| 225 | margin-bottom: 16px; | ||
| 226 | } | ||
| 227 | .fd-sip-diag .pitfalls-header h3 { | ||
| 228 | margin: 0; | ||
| 229 | color: var(--fd-red); | ||
| 230 | font-size: 1.2rem; | ||
| 231 | font-weight: 800; | ||
| 232 | } | ||
| 233 | .fd-sip-diag .pitfalls-grid { | ||
| 234 | display: grid; | ||
| 235 | grid-template-columns: 1fr 1fr; | ||
| 236 | gap: 20px; | ||
| 237 | } | ||
| 238 | .fd-sip-diag .pitfall-item { | ||
| 239 | background: #ffffff; | ||
| 240 | border: 1px solid #fca5a5; | ||
| 241 | border-radius: 10px; | ||
| 242 | padding: 16px 20px; | ||
| 243 | } | ||
| 244 | .fd-sip-diag .pitfall-item h5 { | ||
| 245 | margin: 0 0 6px; | ||
| 246 | color: var(--fd-navy); | ||
| 247 | font-size: 0.95rem; | ||
| 248 | font-weight: 700; | ||
| 249 | } | ||
| 250 | .fd-sip-diag .pitfall-item p { | ||
| 251 | margin: 0; | ||
| 252 | font-size: 0.88rem; | ||
| 253 | color: var(--fd-slate); | ||
| 254 | line-height: 1.45; | ||
| 255 | } | ||
| 256 | |||
| 257 | @media (max-width: 900px) { | ||
| 258 | .fd-sip-diag .arch-grid { grid-template-columns: 1fr; gap: 20px; } | ||
| 259 | .fd-sip-diag .flow-connector { display: none; } | ||
| 260 | .fd-sip-diag .rules-grid, .fd-sip-diag .pitfalls-grid { grid-template-columns: 1fr; } | ||
| 261 | } | ||
| 262 | </style> | ||
| 263 | |||
| 264 | <div class="fd-sip-diag"> | ||
| 265 | |||
| 266 | <!-- Header Banner --> | ||
| 267 | <div class="diag-header"> | ||
| 268 | <p class="kicker">FirstDigital Technical Architecture</p> | ||
| 269 | <h1>SIP Trunking Architecture & Traffic Flow</h1> | ||
| 270 | <p class="sub">Reference guide for signaling (UDP 5060), media routing (RTP), and required customer firewall policies.</p> | ||
| 271 | </div> | ||
| 272 | |||
| 273 | <!-- Architecture Flow Diagram --> | ||
| 274 | <div class="arch-grid"> | ||
| 275 | |||
| 276 | <!-- FirstDigital SBC --> | ||
| 277 | <div class="node-box fd-cloud"> | ||
| 278 | <span class="node-badge">FirstDigital Cloud</span> | ||
| 279 | <h3>Cloud SBC</h3> | ||
| 280 | <span class="ip-addr">FirstDigital SBC IP</span> | ||
| 281 | <p class="desc">Central Session Border Controller managing inbound/outbound signaling & media.</p> | ||
| 282 | </div> | ||
| 283 | |||
| 284 | <!-- Flow Connector 1 --> | ||
| 285 | <div class="flow-connector"> | ||
| 286 | <span class="flow-label">WAN SIP / RTP</span> | ||
| 287 | <div class="arrow-line"></div> | ||
| 288 | <span class="flow-label">UDP 5060</span> | ||
| 289 | </div> | ||
| 290 | |||
| 291 | <!-- Customer Firewall --> | ||
| 292 | <div class="node-box firewall"> | ||
| 293 | <span class="node-badge">Boundary</span> | ||
| 294 | <h3>Customer Firewall</h3> | ||
| 295 | <span class="ip-addr">Public IP (Provided)</span> | ||
| 296 | <p class="desc">Network perimeter executing NAT and inspecting incoming/outgoing UDP 5060 & RTP streams.</p> | ||
| 297 | </div> | ||
| 298 | |||
| 299 | <!-- Flow Connector 2 --> | ||
| 300 | <div class="flow-connector"> | ||
| 301 | <span class="flow-label">LAN Routing</span> | ||
| 302 | <div class="arrow-line"></div> | ||
| 303 | <span class="flow-label">Private Net</span> | ||
| 304 | </div> | ||
| 305 | |||
| 306 | <!-- Customer PBX --> | ||
| 307 | <div class="node-box cust-pbx"> | ||
| 308 | <span class="node-badge">Customer Premises</span> | ||
| 309 | <h3>Customer PBX</h3> | ||
| 310 | <span class="ip-addr">192.168.x.x (Private)</span> | ||
| 311 | <p class="desc">Internal phone system handling extensions, call logic, and audio endpoints.</p> | ||
| 312 | </div> | ||
| 313 | |||
| 314 | </div> | ||
| 315 | |||
| 316 | <!-- Inbound & Outbound Traffic Rules --> | ||
| 317 | <div class="rules-grid"> | ||
| 318 | |||
| 319 | <div class="rule-card"> | ||
| 320 | <h4> | ||
| 321 | <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#38b2e3" stroke-width="2.5"><path d="M12 5v14M5 12l7 7 7-7"/></svg> | ||
| 322 | Inbound Call Rules (FirstDigital → Customer) | ||
| 323 | </h4> | ||
| 324 | <ul> | ||
| 325 | <li>FirstDigital SBC directs calls toward the <strong>Public IP</strong> provided by the customer.</li> | ||
| 326 | <li>The customer's firewall must <strong>permit inbound UDP 5060</strong> sourced strictly from FirstDigital's SBC IP.</li> | ||
| 327 | <li>Dynamic RTP audio port ranges must be allowed through the firewall once the SIP handshake completes.</li> | ||
| 328 | </ul> | ||
| 329 | </div> | ||
| 330 | |||
| 331 | <div class="rule-card outbound"> | ||
| 332 | <h4> | ||
| 333 | <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#307ab2" stroke-width="2.5"><path d="M12 19V5M5 12l7-7 7 7"/></svg> | ||
| 334 | Outbound Call Rules (Customer → FirstDigital) | ||
| 335 | </h4> | ||
| 336 | <ul> | ||
| 337 | <li>All signaling and audio streams <strong>must source from the registered Public IP</strong> provided to FirstDigital.</li> | ||
| 338 | <li>FirstDigital enforces strict security and will <strong>automatically reject calls</strong> sourcing from unknown or unverified IPs.</li> | ||
| 339 | <li>Firewall must perform proper Source NAT (SNAT) to map outgoing PBX packets to the designated public IP.</li> | ||
| 340 | </ul> | ||
| 341 | </div> | ||
| 342 | |||
| 343 | </div> | ||
| 344 | |||
| 345 | <!-- Common Troubleshooting Pitfalls --> | ||
| 346 | <div class="pitfalls-container"> | ||
| 347 | <div class="pitfalls-header"> | ||
| 348 | <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#cf333d" stroke-width="2.5"><path d="M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0zM12 9v4M12 17h.01"/></svg> | ||
| 349 | <h3>Most Common SIP & Audio Issues</h3> | ||
| 350 | </div> | ||
| 351 | |||
| 352 | <div class="pitfalls-grid"> | ||
| 353 | |||
| 354 | <div class="pitfall-item"> | ||
| 355 | <h5>1. One-Way or No Audio (Dropped RTP Packets)</h5> | ||
| 356 | <p>Occurs when the customer firewall allows SIP signaling (UDP 5060) to connect the call, but blocks or drops the dynamic RTP audio stream ports. Ensure RTP port ranges are open between the SBC and PBX.</p> | ||
| 357 | </div> | ||
| 358 | |||
| 359 | <div class="pitfall-item"> | ||
| 360 | <h5>2. Private IP Leakage in SIP SDP Headers</h5> | ||
| 361 | <p>The firewall fails to rewrite the SDP payload, causing the audio stream to request packet delivery to the PBX's <em>private IP</em> (e.g. <code>10.x.x.x</code> or <code>192.168.x.x</code>) rather than its external public IP address.</p> | ||
| 362 | </div> | ||
| 363 | |||
| 364 | </div> | ||
| 365 | </div> | ||
| 366 | |||
| 367 | </div> | ||
| 368 | {{/html}} |