This is a Prosody module to map JIDs to DIDs on VoIP.ms and support sending/receiving SMS/MMS.
option | type | default | description |
---|---|---|---|
voipms_api_username | string | nil | E-mail address used at voip.ms |
voipms_api_password | string | nil | API password (not login password) |
voipms_query_key | string | nil | Key to secure service (part of webhook) |
voipms_jid_map | table | nil | JID -> DIDs mapping |
VirtualHost "sms.example.com"
modules_enabled = {
"voipms";
}
voipms_api_username = john@example.com
voipms_api_password = abcd1234
voipms_query_key = some_query_key
voipms_jid_map = {
["your_jid@your_domain.com"] = { "+1234567890" },
["your_jid2@your_domain.com"] = { "+0123456789", "+18573647583" }
}
The module is served on Prosody’s default HTTP ports at the path /voipms. More details on configuring HTTP modules in Prosody can be found in the HTTP documentation.
This module receives the VoIP.ms Webhook URL (POST) at the /voipms endpoint. It uses the sendSMS/sendMMS GET methods against the VoIP.ms APIs. This is an example webhook to use in VoIP.ms:
https://sms.example.com/voipms?key=some_query_key
With the plugin installer in Prosody 0.12 you can use:
sudo prosodyctl install --server=https://modules.prosody.im/rocks/ mod_voipms
For earlier versions see the documentation for installing 3rd party modules