This is a stupidly trivial additional module for FreePBX's CallerID Superfecta (CID Superfecta) that adds support for sending the caller ID name and number to an external host using a HTTP POST request.
This is absolutely perfect for trigging webhooks in things like Home Assistant, where a GET request may be undesirable.
Make sure you have CID Superfecta installed (that's outside the scope of this readme, I'm sure you can figure it out)
Copy contents into /var/www/html/admin/modules/superfecta/sources/source-Send_to_URL_POST.module
. The source should show up immediately in CID Superfecta.
Configure as any other source, making sure you enable it when ready. Probably best placed at the end of your processing chain.
If you're using this with Home Assistant, create an automation triggered by a webhook.
Once you've done this, use the following URL in this module's config:
https://[home-assistant-url]/api/webhook/[webhook-id]
You can then access the data inside your actions using the {{trigger.data.name}}
and {{trigger.data.number}}
template variables.
MIT license.