feat: phone webhook integration (callstart/callend on port 8081)

- New webhook server on port 8081 for phone system (PBX)
- Endpoints: GET/POST /{extension}/callstart and /{extension}/callend
- New 'phone_extension' field on users (Durchwahl)
- Only activates when user is anwesend or homeoffice (AIDA)
- Sets WLED to phone_active color (red) on callstart
- Restores previous Teams/AIDA color on callend
- Polling skips WLED update while phone is active
- Dashboard shows phone badge when user is in a call
- New color rule 'phone_active' (configurable via web UI)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-23 23:15:51 +02:00
co-authored by Claude Opus 4.6
parent 47210cb068
commit 7f2858aab6
6 changed files with 183 additions and 7 deletions
+4
View File
@@ -81,6 +81,10 @@
<span class="badge bg-light text-dark"><i class="bi bi-microsoft-teams"></i> {{ seg.teams }}</span>
{% endif %}
{% endif %}
{% if seg.phone %}
<span class="badge bg-danger"><i class="bi bi-telephone-fill"></i> Telefoniert</span>
{% endif %}
</div>
{% endif %}
{% else %}
+14
View File
@@ -35,6 +35,7 @@
<th>Name</th>
<th>E-Mail</th>
<th>Personal-Nr (AIDA)</th>
<th>Durchwahl</th>
<th>Zuordnung</th>
<th>Aktionen</th>
</tr>
@@ -57,6 +58,19 @@
class="form-control form-control-sm" style="width: 120px;"
placeholder="~~00000~~">
<input type="hidden" name="active" value="{{ '1' if user.active else '0' }}">
<input type="hidden" name="phone_extension" value="{{ user.phone_extension or '' }}">
<button type="submit" class="btn btn-sm btn-outline-secondary">
<i class="bi bi-check"></i>
</button>
</form>
</td>
<td>
<form method="post" action="/api/users/{{ user.azure_id }}/update" class="d-flex gap-1">
<input type="text" name="phone_extension" value="{{ user.phone_extension or '' }}"
class="form-control form-control-sm" style="width: 80px;"
placeholder="z.B. 123">
<input type="hidden" name="personal_nr" value="{{ user.personal_nr or '' }}">
<input type="hidden" name="active" value="{{ '1' if user.active else '0' }}">
<button type="submit" class="btn btn-sm btn-outline-secondary">
<i class="bi bi-check"></i>
</button>