chore: emulator sip_gateway, Makefile targets, full README documentation

- Emulator: add sip_gateway field to all scenarios (auto-trunk creation)
- Makefile: build-agent, build-siptest, emulate-*, siptest-* targets
- README: full documentation with agent section, production deployment
- Project structure update with all components
This commit is contained in:
Maksim Totmin
2026-06-25 16:59:17 +07:00
parent 1e6f432230
commit 95ac4164dd
3 changed files with 841 additions and 10 deletions
+36 -1
View File
@@ -8,7 +8,8 @@ DATA_DIR := data
.PHONY: all build build-go build-web clean run test install \
emulate emulate-normal emulate-overload emulate-cpu-low emulate-fail-high \
emulate-node-down emulate-stale emulate-chaos build-emulator
emulate-node-down emulate-stale emulate-chaos build-emulator \
build-siptest siptest-uas siptest-uac siptest-full
all: build
@@ -100,6 +101,40 @@ emulate-stale: nats build-emulator
emulate-chaos: nats build-emulator
./$(BINDIR)/emulator --scenario chaos
# ============================================================
# Агент сбора метрик (pulse-lets-go-agent)
# ============================================================
build-agent:
@mkdir -p $(BINDIR)
go build -o $(BINDIR)/pulse-lets-go-agent ./cmd/pulse-lets-go-agent
# ============================================================
# SIP-тестер (e2e проверка с FreeSWITCH)
# ============================================================
build-siptest:
@mkdir -p $(BINDIR)
go build -o $(BINDIR)/siptest ./cmd/siptest
# Запуск UAS (PBX-нода, отвечает 200 OK на INVITE)
siptest-uas: build-siptest
./$(BINDIR)/siptest -mode uas
# Отправка тестового звонка (10 CPS, 100 вызовов)
siptest-uac: build-siptest
./$(BINDIR)/siptest -mode uac -r 10 -l 100 -m 100
# Полный e2e тест: UAS + UAC
siptest-full: build-siptest
@echo "→ Запуск UAS (PBX-нода) на порту 5090..."
./$(BINDIR)/siptest -mode uas &
@sleep 1
@echo "→ Запуск UAC (оператор)..."
./$(BINDIR)/siptest -mode uac -r 10 -l 100 -m 200
@echo "→ Остановка UAS..."
pkill siptest 2>/dev/null || true
# ============================================================
# NATS и запуск
# ============================================================