{"id":50415933,"url":"https://github.com/arthur-s/cipbx","last_synced_at":"2026-06-24T10:01:01.098Z","repository":{"id":314867727,"uuid":"1055593743","full_name":"arthur-s/cipbx","owner":"arthur-s","description":"cipbx — a minimalistic VoIP call testing tool implementing a simple echo server in Go using diago","archived":false,"fork":false,"pushed_at":"2025-09-27T16:02:32.000Z","size":14079,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-16T22:05:00.967Z","etag":null,"topics":["ci","ci-cd","rtp","sip","testing","voip"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arthur-s.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-12T13:54:15.000Z","updated_at":"2026-04-02T02:55:08.000Z","dependencies_parsed_at":"2025-09-15T10:27:01.913Z","dependency_job_id":"9dad5c0e-4d36-43bc-ae3d-fc7073e4da98","html_url":"https://github.com/arthur-s/cipbx","commit_stats":null,"previous_names":["arthur-s/cipbx"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/arthur-s/cipbx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthur-s%2Fcipbx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthur-s%2Fcipbx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthur-s%2Fcipbx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthur-s%2Fcipbx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arthur-s","download_url":"https://codeload.github.com/arthur-s/cipbx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthur-s%2Fcipbx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34724756,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-24T02:00:07.484Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ci","ci-cd","rtp","sip","testing","voip"],"created_at":"2026-05-31T06:00:23.622Z","updated_at":"2026-06-24T10:01:01.071Z","avatar_url":"https://github.com/arthur-s.png","language":"Go","funding_links":[],"categories":["Interconnect"],"sub_categories":["SBC, IMS"],"readme":"# cipbx\n\n\"CI PBX\" is a VoIP echo server, designed for CI/CD pipelines. Implemented in Go using [diago](https://github.com/emiago/diago).\n\n## Purpose\n\n- Test SIP/RTP call flows in automated environments\n- Validate call establishment and media transmission\n- Check codec negotiation\n- Provide reliable testing for continuous integration pipelines\n\n\n## Usage\n\n```bash\n# Basic usage (echo server only)\ncipbx --listen 127.0.0.1 --port 5090\n\n# Using short flags\ncipbx -l 127.0.0.1 -p 5090\n\n# Specify transport (defaults to udp). Supported: udp, tcp, tls, ws, wss\ncipbx --transport udp -l 127.0.0.1 -p 5090\n\n# With authentication (accepts REGISTER requests)\ncipbx -l 127.0.0.1 -p 5090 -u username -w password\n\n# Multiple accounts (comma separated lists)\ncipbx -l 127.0.0.1 -p 5090 -u alice,bob -w secret1,secret2\n\n# With timeout (automatically hang up after 30 seconds)\ncipbx -l 127.0.0.1 -p 5090 -t 30\n\n# With RTP payload validation (expect 0x30 in all payload bytes. Note: validate encoded value, not decoded)\ncipbx -l 127.0.0.1 -p 5090 --expect 0x30\n```\n\n### Features\n\n- **Echo Server**: Call `echo@\u003cserver-ip\u003e` to test echo functionality\n- **Playback Server**: Call `playback@\u003cserver-ip\u003e` for demo playback functionality\n- **Call Bridging**: Call any other extension to bridge calls (e.g., `alice@\u003cserver-ip\u003e`)\n- **Authentication**: Optional digest authentication for REGISTER requests (supports multiple accounts) with 1-hour expiration\n- **Call Timeout**: Optional automatic call termination after specified duration (in seconds)\n- **Transport Selection**: Choose between `udp`, `tcp`, `tls`, `ws`, `wss` (default `udp`)\n- **RTP Payload Validation**: Optional validation of RTP payload bytes for testing purposes\n\n### Call Routing\n\n- **echo@domain**: Routes to echo server for testing media transmission\n- **playback@domain**: Routes to playback server (demo functionality)\n- **user@domain**: Bridges calls to the specified user (requires proper SIP routing)\n\n### Authentication\n\nWhen username and password are provided:\n- Accepts authenticated REGISTER requests\n- Supports specifying multiple accounts using comma-separated lists (e.g. `-u alice,bob -w secret1,secret2`)\n- Sets registration expiration to 1 hour\n- Logs successful registrations\n\nExample with authentication:\n```bash\n# Enable authentication for single account\ncipbx -l 127.0.0.1 -p 5090 -u testuser -w testpass\n\n# Enable authentication for multiple accounts\ncipbx -l 127.0.0.1 -p 5090 -u alice,bob -w secret1,secret2\n\n# Client can now register with:\n# REGISTER sip:127.0.0.1:5090 SIP/2.0\n# Authorization: Digest username=\"testuser\", realm=\"cipbx\", ...\n```\n\n### Call Timeout\n\nThe timeout feature allows you to specify a maximum call duration in seconds. When enabled:\n- Calls will be automatically terminated after the specified duration\n- The server sends a BYE message to properly close the call\n- Useful for testing scenarios where calls should not run indefinitely\n\nExample with timeout:\n```bash\n# Set 60-second timeout\ncipbx -l 127.0.0.1 -p 5090 -t 60\n\n# Combine with authentication\ncipbx -l 127.0.0.1 -p 5090 -u testuser -w testpass -t 120\n```\n\n### RTP Payload Validation\n\nThe `--expect` flag enables RTP payload validation for testing purposes. When specified, the server will:\n\n- Ignore the first 15 RTP packets (startup/comfort noise)\n- Validate a window of payloads (≥50 packets over 3 seconds)\n- Check that every payload byte matches the expected value\n- Log validation results with `RTP_ASSERT_OK` or `RTP_ASSERT_FAIL`\n\nExample usage:\n```bash\n# Expect 0x55 in all RTP payload bytes\ncipbx -l 127.0.0.1 -p 5090 --expect 0x55\n\n# Combine with other options\ncipbx -l 127.0.0.1 -p 5090 -u testuser -w testpass --expect 0x55 -t 60\n```\n\nThe validation is only active for `echo@domain` calls and logs results like:\n- `RTP_ASSERT_OK codec=PCMU bytes=0x55` (success)\n- `RTP_ASSERT_FAIL codec=PCMU expected=0x55 valid_packets=45 total_packets=50` (failure)\n\n\n# RTP tester\n\nRTP testing utility for validating media transmission without SIP signaling.\n\n## 🎯 Purpose\n\n- Test raw RTP media streams directly\n- Validate codec performance (PCMA, PCMU, Opus)\n- Debug RTP packet transmission issues\n- Measure media quality without SIP overhead\n\n## 🔄 Difference from cipbx\n\nWhile `cipbx` tests complete SIP/RTP call flows, `rtptester` focuses exclusively on the media layer:\n\n- **rtptester**: Raw RTP testing only (no SIP)\n- **cipbx**: Complete SIP + RTP call testing\n\n## Basic Usage\n\n```bash\n# With custom values using flags\nrtptester --local-ip 192.168.1.100 --local-port 6000 --remote-ip 192.168.1.200 --remote-port 6001 --codec PCMU --debug\n\n# Using short flags\nrtptester -l 192.168.1.100 -p 6000 -r 192.168.1.200 -P 6001 -c PCMU -d\n```\n\n## Manual Testing with GStreamer\n\nThe RTP tester can be manually tested using GStreamer to send and receive RTP packets. This is useful for verifying the echo functionality works correctly.\n\n### Test Setup\n\nRun these commands in separate terminals:\n\n**Terminal 1 - RTP Echo Tester:**\n```bash\n.\\rtptester --local-ip 127.0.0.1 --local-port 5004 --remote-ip 127.0.0.1 --remote-port 5005 --codec PCMA --debug\n```\n\n**Terminal 2 - GStreamer Sender:**\n```bash\ngst-launch-1.0 audiotestsrc wave=sine freq=440 num-buffers=300 ! audioconvert ! audioresample ! alawenc ! rtppcmapay ! udpsink host=127.0.0.1 port=5004\n```\n\n**Terminal 3 - GStreamer Receiver:**\n```bash\ngst-launch-1.0 udpsrc port=5005 ! application/x-rtp,encoding-name=PCMA,clock-rate=8000 ! rtppcmadepay ! alawdec ! audioconvert ! wavenc ! filesink location=received_audio.wav\n```\n\n### Expected Results\n\n- The RTP tester will log received and echoed packets\n- The `received_audio.wav` file will contain the echoed audio\n- You should hear a 440Hz sine wave when playing the audio file\n\n### Direct GStreamer Test (Bypass RTP Tester)\n\nTo verify GStreamer setup works independently:\n\n**Terminal 1 - Direct Sender:**\n```bash\ngst-launch-1.0 audiotestsrc wave=sine freq=440 num-buffers=300 ! audioconvert ! audioresample ! alawenc ! rtppcmapay ! udpsink host=127.0.0.1 port=5005\n```\n\n**Terminal 2 - Direct Receiver:**\n```bash\ngst-launch-1.0 udpsrc port=5005 ! application/x-rtp,encoding-name=PCMA,clock-rate=8000 ! rtppcmadepay ! alawdec ! audioconvert ! wavenc ! filesink location=direct_test.wav\n```\n\nThis should create `direct_test.wav` with audio content, confirming GStreamer is working correctly.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farthur-s%2Fcipbx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farthur-s%2Fcipbx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farthur-s%2Fcipbx/lists"}