diff --git a/README.md b/README.md index ea1bb01..610f067 100644 --- a/README.md +++ b/README.md @@ -189,13 +189,14 @@ The web interface provides four main sections: ### Extra Button Operation (Optional) If enabled in `config.json`: -1. **Guest picks up phone**: Phone goes off-hook -2. **Guest presses button**: System detects GPIO signal (only works when off-hook) -3. **Sound plays**: Configured button sound plays through speaker -4. **Can be pressed multiple times**: Works during greeting or recording -5. **Debounced**: 0.5s delay prevents accidental double-presses +1. **Guest picks up phone**: Phone goes off-hook, greeting plays +2. **Recording starts**: After greeting finishes +3. **Guest presses button**: System detects GPIO signal (only works during recording) +4. **Sound plays**: Configured button sound plays through speaker +5. **Can be pressed multiple times**: Works throughout the recording phase +6. **Debounced**: 0.5s delay prevents accidental double-presses -**Note:** Button only responds when handset is off-hook (during active call) +**Note:** Button only responds during the recording phase (not during greeting or when on-hook) ### Greeting Delay (Optional) diff --git a/rotary_phone_web.py b/rotary_phone_web.py index 0d46679..7a5f301 100644 --- a/rotary_phone_web.py +++ b/rotary_phone_web.py @@ -319,13 +319,13 @@ class RotaryPhone: } def play_extra_button_sound(self): - """Play sound when extra button is pressed (only when off-hook/in call)""" + """Play sound when extra button is pressed (only during recording)""" if not EXTRA_BUTTON_ENABLED: return - # Only play if phone is OFF hook (during a call) - if self.phone_status != "off_hook": - print("Extra button ignored - phone is on hook") + # Only play if currently recording + if not self.recording: + print("Extra button ignored - not recording") return button_sound = self.get_extra_button_sound_path()