Skip to content

Instantly share code, notes, and snippets.

@dwilkie
Last active September 17, 2025 08:48
Show Gist options
  • Save dwilkie/cdd714f07721b8926c089f6701c0355c to your computer and use it in GitHub Desktop.
Save dwilkie/cdd714f07721b8926c089f6701c0355c to your computer and use it in GitHub Desktop.
CGRateS commands

Useful CGrateS commands

Run ngrep on the cgrates container with JSON formatting

docker compose exec -it billing-engine sh -c \
'ngrep -d any -W byline port 2021 or 2013 or 2014 or 2080 or 2060 or 2012 | \
while read line; do
  echo "$line" | jq . 2>/dev/null || echo "$line"
done'

Run ngrep on the cgrates container without formatting only on 8021

docker compose exec -it billing-engine sh -c 'ngrep -d any -W byline port 8021'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment