Merged
Conversation
Run shell commands on profile events (e.g. profile_loaded). Hooks are configured in ringo.toml as [[hooks]] entries. Commands run in background threads with stdout/stderr logged to /tmp/ringo-hooks.log. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Introduces src/log.rs with OnceLock<Mutex<File>>, writing to
/tmp/ringo-{profile}.log. Replaces ad-hoc logging in hooks.rs and
surfaces previously silent errors across TCP, config parsing, baresip
lifecycle, call history, dial history, notify-send, and phone commands.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Hooks now fire on incoming and outgoing calls with event data (call_id, number, display_name) passed as RINGO_EVENT_DATA JSON and individual RINGO_<KEY> env vars. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fires when a call closes with event data: call_id, number, direction, duration_secs, reason, and error flag. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…NT_DATA JSON Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ringo.tomlas[[hooks]]entries witheventandcommandfieldsRINGO_EVENT,RINGO_PROFILE,RINGO_PROFILE_JSON, andRINGO_EVENT_DATA(JSON)profile_loaded,call_incoming,call_outgoing,call_endedsrc/log.rs) writing to/tmp/ringo-<name>.log— replaces ad-hoc/tmp/ringo-hooks.logHook events
profile_loadedcall_incomingcall_id,number,display_namecall_outgoingcall_id,numbercall_endedcall_id,number,direction,duration_secs,reason,errorTest plan
RINGO_EVENT_DATAJSON is correct for each event/tmp/ringo-<name>.log🤖 Generated with Claude Code