<%= render 'shared/settings_nav' %>

SMS

<% value = @encrypted_config.value || {} %> <% sms_enabled = Sms.enabled?(current_account) %> <% sms_live = Sms.enabled_for?(current_account) %> <% provider_labels = { 'bulkvs' => 'BulkVS', 'twilio' => 'Twilio', 'voipms' => 'VoIP.ms', 'signalwire' => 'SignalWire' } sending_number = case value['provider'].to_s when 'twilio' then value['twilio_from'] when 'voipms' then value['voipms_did'] when 'signalwire' then value['signalwire_from'] else value['from_number'] end selected_provider = value['provider'].presence || 'bulkvs' %> <% if sms_live %>
<%= svg_icon('discount_check_filled', class: 'w-6 h-6') %>

SMS is enabled

Provider: <%= provider_labels[value['provider'].to_s] || value['provider'].to_s.upcase %>. From: <%= sending_number %>.

<% elsif sms_enabled %>
<%= svg_icon('discount_check_filled', class: 'w-6 h-6') %>

SMS is enabled but not fully configured

Select a provider below and fill in its credentials, then save.

<% else %>
<%= svg_icon('info_circle', class: 'w-6 h-6') %>

SMS provider is not configured

WaboSign supports BulkVS, Twilio, VoIP.ms, and SignalWire. Pick a provider below and paste its credentials.

<% end %> <%= form_for @encrypted_config, url: settings_sms_path, method: :post, html: { autocomplete: 'off', class: 'space-y-4', id: 'sms_settings_form' }, data: { turbo_frame: :_top } do |f| %> <%= f.fields_for :value do |ff| %>
<%= ff.label :provider, 'Provider', class: 'label' %> <%= ff.select :provider, Sms::SUPPORTED_PROVIDERS.map { |p| [provider_labels[p] || p, p] }, { selected: selected_provider }, class: 'base-select', id: 'sms_provider_select' %>
<%= ff.label :basic_auth_token, 'BulkVS Basic Auth Token', class: 'label' %> <%= ff.password_field :basic_auth_token, value: '', class: 'base-input', placeholder: value['basic_auth_token'].present? ? '*************' : 'Paste from BulkVS portal' %> <% if value['basic_auth_token'].present? %> Leave blank to keep the saved token. <% else %> In the BulkVS portal, open the API tab and copy the pre-encoded Basic Auth header value (do not include "Basic "). <% end %>
<%= ff.label :from_number, 'From Number', class: 'label' %> <%= ff.text_field :from_number, value: value['from_number'], class: 'base-input', placeholder: '15551234567' %> E.164 format (digits only, country code first; e.g. 15551234567).
<%= ff.label :delivery_webhook_url, 'Delivery Status Webhook (optional)', class: 'label' %> <%= ff.url_field :delivery_webhook_url, value: value['delivery_webhook_url'], class: 'base-input', placeholder: 'https://your-app.example/webhooks/sms' %> If set, BulkVS will POST delivery-status events here for each message.
<%= ff.label :twilio_account_sid, 'Twilio Account SID', class: 'label' %> <%= ff.text_field :twilio_account_sid, value: value['twilio_account_sid'], class: 'base-input', placeholder: 'AC...' %> From your Twilio Console "Account Info" panel.
<%= ff.label :twilio_auth_token, 'Twilio Auth Token', class: 'label' %> <%= ff.password_field :twilio_auth_token, value: '', class: 'base-input', placeholder: value['twilio_auth_token'].present? ? '*************' : 'Click "show" in the Console to reveal' %> <% if value['twilio_auth_token'].present? %> Leave blank to keep the saved token. <% else %> Found next to the Account SID in the Twilio Console. <% end %>
<%= ff.label :twilio_from, 'From Number', class: 'label' %> <%= ff.text_field :twilio_from, value: value['twilio_from'], class: 'base-input', placeholder: '+15551234567' %> Twilio number purchased in Phone Numbers → Manage. Use full E.164 with leading +.
<%= ff.label :voipms_api_username, 'API Username', class: 'label' %> <%= ff.text_field :voipms_api_username, value: value['voipms_api_username'], class: 'base-input', placeholder: 'your-account@example.com' %> Your VoIP.ms portal login email.
<%= ff.label :voipms_api_password, 'API Password', class: 'label' %> <%= ff.password_field :voipms_api_password, value: '', class: 'base-input', placeholder: value['voipms_api_password'].present? ? '*************' : 'Set this at voip.ms/m/api.php' %> <% if value['voipms_api_password'].present? %> Leave blank to keep the saved password. <% else %> Set the dedicated API password at voip.ms/m/api.php — this is not your portal login password. On the same page, enable API access and whitelist this server's egress IP, or every call will fail with ip_not_authorized. <% end %>
<%= ff.label :voipms_did, 'DID (Sending Number)', class: 'label' %> <%= ff.text_field :voipms_did, value: value['voipms_did'], class: 'base-input', placeholder: '5551234567' %> An SMS-enabled DID from Manage DIDs. Digits only, no +. The DID must have the SMS feature enabled.
<%= ff.label :signalwire_space_url, 'Space URL', class: 'label' %> <%= ff.text_field :signalwire_space_url, value: value['signalwire_space_url'], class: 'base-input', placeholder: 'yourname.signalwire.com' %> From Dashboard → API. Omit https://.
<%= ff.label :signalwire_project_id, 'Project ID', class: 'label' %> <%= ff.text_field :signalwire_project_id, value: value['signalwire_project_id'], class: 'base-input', placeholder: '00000000-0000-0000-0000-000000000000' %> The UUID labelled "Your Project ID" on the API tab.
<%= ff.label :signalwire_api_token, 'API Token', class: 'label' %> <%= ff.password_field :signalwire_api_token, value: '', class: 'base-input', placeholder: value['signalwire_api_token'].present? ? '*************' : 'PT...' %> <% if value['signalwire_api_token'].present? %> Leave blank to keep the saved token. <% else %> Generate on the API tab. The token must have the Messaging scope enabled or sends return 401. <% end %>
<%= ff.label :signalwire_from, 'From Number', class: 'label' %> <%= ff.text_field :signalwire_from, value: value['signalwire_from'], class: 'base-input', placeholder: '+15551234567' %> A SignalWire number from Phone Numbers. Full E.164 with leading +.
<% end %>
<%= f.button button_title(title: t('save'), disabled_with: t('saving')), class: 'base-button' %>
<% end %> <% if sms_live %>

Send a test SMS

<%= form_with url: test_message_settings_sms_path, method: :post, html: { autocomplete: 'off', class: 'space-y-3' } do |f| %>
A short test message is sent to this number using your saved config.
<% end %>
<% end %>