CRM Webhooks not being called

Quick CRM webhook primer:

  • Browse to http://postb.in and get a URL you can use for testing
  • From the bash prompt, you can structure a webhook using the test url from above with:
# curl -H "Token: <sangoma_crm_token>" -d "url=http://postb.in/<postbin_code>&direction=both" http://localhost/admin/api/sangomacrm/rest/webhooks
{"status":true,"id":{"id":"1","url":"http:\/\/postb.in\/<postbin_code>","direction":"both"}}
  • List the newly created webhook
# curl -H "Token: <sangoma_crm_token>" http://localhost:85/admin/api/sangomacrm/rest/webhooks/both
{"status":true,"data":[{"id":"1","url":"http:\/\/postb.in\/<postbin_code>","direction":"both"}]}
  • Make inbound or outbound call to trigger the webhook
  • Refresh the web page at http://postb.in/b/<postbin_code> to see the post data pushed by the webhook

edit - Major overhaul to the wiki page, so the above is superseded by browsing to:
https://wiki.freepbx.org/display/FPG/Sangoma+CRM+REST+API

1 Like