Skip to content

Added Vitelity Support#92

Open
slyr91 wants to merge 5 commits intosimontelephonics:release/16.0from
slyr91:claude/review-app-changes-vpZBx
Open

Added Vitelity Support#92
slyr91 wants to merge 5 commits intosimontelephonics:release/16.0from
slyr91:claude/review-app-changes-vpZBx

Conversation

@slyr91
Copy link
Copy Markdown

@slyr91 slyr91 commented Mar 30, 2026

This pull request provides Vitelity support to Smsconnector.

This has been tested on FreePBX 17.0.25. There is a quirk I am experiencing with the webhook registration but it appears to be on the Vitelity side. For now you simply need to register the webhook manually.

Sending and receiving SMS does work once the webhook is registered.

claude added 5 commits March 27, 2026 04:21
Implements outbound SMS via smsout-api.vitelity.net, inbound webhook
handling, and automatic webhook URL registration (smsenableurl) on
config save. MMS is explicitly unsupported. Includes NANP number
normalization and correct 'ok' response body for Vitelity retry prevention.

https://claude.ai/code/session_01GrLxsjU1VtWRM31UWEukL5
Hooks into updateProviders() to invoke onConfigSaved() on any provider
class that implements it, enabling post-save logic (e.g. Vitelity webhook
registration) without changes to providerBase.

https://claude.ai/code/session_01GrLxsjU1VtWRM31UWEukL5
Helps identify IPs to whitelist in the firewall when unexpected HTTP
method or error responses are logged from the webhook endpoint.

https://claude.ai/code/session_01GrLxsjU1VtWRM31UWEukL5
Vitelity sends a GET to the webhook URL before registering it via
smsenableurl; without an 'ok' response it returns x[[invalidurl[[x.
Respond 200 with 'ok' on GET so registration succeeds.

https://claude.ai/code/session_01GrLxsjU1VtWRM31UWEukL5
- registerWebhookUrl() now accepts an optional $did and passes it to
  the smsenableurl API (stripping leading country code for Vitelity's
  10-digit NANP expectation)
- onConfigSaved() receives the list of DIDs already assigned to the
  provider and registers the webhook for each one individually
- onDIDAssigned() is a new hook called by addNumber() whenever a DID
  is assigned or reassigned, registering the webhook for that DID
- updateProviders() now queries getList() and passes filtered DIDs to
  onConfigSaved() for the relevant provider
- addNumber() calls onDIDAssigned() after a successful insert
- No other providers are affected; all new hooks are guarded by
  method_exists()

https://claude.ai/code/session_01GrLxsjU1VtWRM31UWEukL5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants