mirror of
https://github.com/Jeuners/Logpy-AgentOne.git
synced 2026-09-17 18:56:12 +02:00
feat(telefon): Hauptnummer - Taste 9 waehrend der Ansage verbindet zu Astra
Die Ansage laeuft per play_and_get_digits; 9 geht wie Durchwahl 9 an den Pipecat-Bootstrap (eigener Kontext hauptnummer_menue), ohne Taste weiter zur Aufnahme. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
c9bf40d760
commit
7c85f91d35
3 changed files with 36 additions and 1 deletions
|
|
@ -52,10 +52,14 @@ fuelle() { # <vorlage> <ziel>
|
|||
fuelle "$PROJEKT/telefon/freeswitch/plusnet.xml.tpl" "$FS_ETC/sip_profiles/external/plusnet.xml"
|
||||
chmod 600 "$FS_ETC/sip_profiles/external/plusnet.xml" # enthaelt das SIP-Passwort
|
||||
fuelle "$PROJEKT/telefon/freeswitch/praxis_ab.xml.tpl" "$FS_ETC/dialplan/public/00_praxis_ab.xml"
|
||||
# Kontext fuer Taste 9 waehrend der Ansage - Top-Level unter dialplan/,
|
||||
# nicht in public/ (siehe hauptnummer_menue.xml.tpl).
|
||||
fuelle "$PROJEKT/telefon/freeswitch/hauptnummer_menue.xml.tpl" "$FS_ETC/dialplan/hauptnummer_menue.xml"
|
||||
|
||||
echo "Trunk -> $FS_ETC/sip_profiles/external/plusnet.xml (Rechte 600)"
|
||||
echo "Dialplan -> $FS_ETC/dialplan/public/00_praxis_ab.xml"
|
||||
echo "Ansage -> $PROJEKT/telefon/ansage.wav"
|
||||
echo "Menue -> $FS_ETC/dialplan/hauptnummer_menue.xml (Taste 9 -> Astra)"
|
||||
echo "Eingang -> $PROJEKT/telefon/eingang"
|
||||
|
||||
if [ -n "${DW3_DDI:-}" ]; then
|
||||
|
|
|
|||
24
telefon/freeswitch/hauptnummer_menue.xml.tpl
Normal file
24
telefon/freeswitch/hauptnummer_menue.xml.tpl
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<include>
|
||||
<!-- Eigener Kontext fuer die Tastenwahl waehrend der Ansage auf der
|
||||
Hauptnummer. 00_praxis_ab.xml spielt telefon/ansage.wav per
|
||||
play_and_get_digits und ruft danach
|
||||
execute_extension hauptnummer_taste_${hauptnummer_taste} XML hauptnummer_menue
|
||||
auf. Nur "hauptnummer_taste_9" hat hier eine Regel; ohne Taste findet
|
||||
execute_extension nichts, kehrt zurueck und die Aufnahme startet.
|
||||
|
||||
Bewusst nicht im Kontext "public": dort matcht der Catch-all in
|
||||
00_praxis_ab.xml jede Nummer und wuerde die Wahl verschlucken.
|
||||
Liegt als Top-Level-Datei unter dialplan/ (wie agentzwei.xml), sonst
|
||||
kennt FreeSWITCH den Kontextnamen nicht.
|
||||
|
||||
Taste 9 -> Astra, genau wie Durchwahl 9 (00_dw9_rufagent.xml). Kein
|
||||
hangup danach: laeuft der Pipecat-Bootstrap nicht, kehrt socket sofort
|
||||
zurueck und der Anrufer landet wenigstens auf dem Anrufbeantworter. -->
|
||||
<context name="hauptnummer_menue">
|
||||
<extension name="hauptnummer_taste_9">
|
||||
<condition field="destination_number" expression="^hauptnummer_taste_9$">
|
||||
<action application="socket" data="127.0.0.1:8095 async full"/>
|
||||
</condition>
|
||||
</extension>
|
||||
</context>
|
||||
</include>
|
||||
|
|
@ -9,7 +9,14 @@
|
|||
<action application="answer"/>
|
||||
<!-- kurze Pause, sonst schneidet die Gegenstelle den Anfang der Ansage ab -->
|
||||
<action application="sleep" data="700"/>
|
||||
<action application="playback" data="@@PROJEKT@@/telefon/ansage.wav"/>
|
||||
<!-- Ansage mit Tastenwahl: 9 waehrend der Ansage -> Astra wie Durchwahl 9
|
||||
(siehe hauptnummer_menue.xml.tpl). Ohne Taste nach 200 ms weiter zur
|
||||
Aufnahme - die Ansage endet schon mit Signalton + 0,3 s Stille.
|
||||
Argumente: min max versuche timeout_ms terminator datei
|
||||
datei_bei_fehleingabe variable regex -->
|
||||
<action application="play_and_get_digits"
|
||||
data="1 1 1 200 # @@PROJEKT@@/telefon/ansage.wav silence_stream://10 hauptnummer_taste ^9$"/>
|
||||
<action application="execute_extension" data="hauptnummer_taste_${hauptnummer_taste} XML hauptnummer_menue"/>
|
||||
<!-- record: <datei> <max_sekunden> <stille_schwelle> <stille_sekunden> -->
|
||||
<action application="record"
|
||||
data="@@PROJEKT@@/telefon/eingang/${strftime(%Y%m%d-%H%M%S)}_${caller_id_number}.wav 120 200 4"/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue