Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.