feat: activate mod_xml_curl with b2bcall-fs-config (agente.md secao 26)

- apps/freeswitch-config (b2bcall-fs-config): Fastify service implementing
  the mod_xml_curl HTTP protocol (form-encoded POST -> XML response),
  containerized, no host port published
- reactivated mod_xml_curl in FreeSWITCH, binding restricted to
  directory|dialplan only (configuration was removed after testing showed
  it firing several unnecessary HTTP round-trips at boot for module
  configs we don't need dynamic — matches agente.md's own 'don't put every
  critical config through XML Curl' guidance)
- no extensions/dialplan tables exist yet (next phases), so the service
  always answers 'not found' for now — this phase only proves the wire
  protocol works without breaking the static vanilla config fallback
- verified end-to-end: user/8888 (nowhere) -> SUBSCRIBER_ABSENT via
  fs-config; user/1000 (static vanilla extension) -> USER_NOT_REGISTERED,
  proving FreeSWITCH correctly falls through to static XML when xml_curl
  says not found
- docs/XML_CURL.md, including the not-yet-authenticated endpoint note (fine
  while it only returns not-found; needs gateway-credentials before serving
  real directory/dialplan data)
This commit is contained in:
2026-08-28 07:07:05 -03:00
parent 60e9f6838e
commit d2ea83c06a
11 changed files with 240 additions and 7 deletions

35
pnpm-lock.yaml generated
View File

@@ -70,6 +70,28 @@ importers:
specifier: ^5.7.0
version: 5.9.3
apps/freeswitch-config:
dependencies:
'@b2bcall/shared':
specifier: workspace:*
version: link:../../packages/shared
'@fastify/formbody':
specifier: ^8.0.1
version: 8.0.2
fastify:
specifier: 5.12.1
version: 5.12.1
devDependencies:
'@types/node':
specifier: ^22.0.0
version: 22.20.1
tsx:
specifier: ^4.23.12
version: 4.23.12
typescript:
specifier: ^5.7.0
version: 5.9.3
apps/freeswitch-events:
dependencies:
'@b2bcall/shared':
@@ -369,6 +391,9 @@ packages:
'@fastify/fast-json-stringify-compiler@5.1.0':
resolution: {integrity: sha512-PxcYtKLbQ8Z+yApiqjK8FwxIwvEj38k2OiLc17u8dkJSlmfi2wHHPaSnaoqBPQqtvF8YVsDgDpP2snDCfFrpfw==}
'@fastify/formbody@8.0.2':
resolution: {integrity: sha512-84v5J2KrkXzjgBpYnaNRPqwgMsmY7ZDjuj0YVuMR3NXCJRCgKEZy/taSP1wUYGn0onfxJpLyRGDLa+NMaDJtnA==}
'@fastify/formbody@9.0.0':
resolution: {integrity: sha512-T/af26CSrUARBCvsEmv+DJLPfZlrRKESzqironxP1j7qzuLyKcoZtj6MuTGShuKx1THXugoie2oFbUJxXfGFzA==}
@@ -963,6 +988,9 @@ packages:
fast-uri@4.1.3:
resolution: {integrity: sha512-7+72G6vLt7jjNas8SmSATx2qeyRIjxeqO3i4IkmDTxlqYZRKANhOe1bnovcp4WZmvsYrp60WyqPyHqgRiX0yXw==}
fastify-plugin@5.1.0:
resolution: {integrity: sha512-FAIDA8eovSt5qcDgcBvDuX/v0Cjz0ohGhENZ/wpc3y+oZCY2afZ9Baqql3g/lC+OHRnciQol4ww7tuthOb9idw==}
fastify-plugin@6.0.0:
resolution: {integrity: sha512-fZOty7z3O7vOliF6d8bHE3wiEh1KcNnKEQensSgTk9C1DvN6nRLS++XVd86v33Hw/8u9Un8A1zDrQ8ujcQDHEg==}
@@ -1527,6 +1555,11 @@ snapshots:
dependencies:
fast-json-stringify: 7.0.1
'@fastify/formbody@8.0.2':
dependencies:
fast-querystring: 1.1.2
fastify-plugin: 5.1.0
'@fastify/formbody@9.0.0':
dependencies:
fast-querystring: 1.1.2
@@ -2164,6 +2197,8 @@ snapshots:
fast-uri@4.1.3: {}
fastify-plugin@5.1.0: {}
fastify-plugin@6.0.0: {}
fastify@5.12.1: