What does the SMS Webhook module do?

I can’t seem to find much information about it. When I click on the info icon this is all it says.

This section is used to add web hook urls. The sms data will be sent to this web hook based the web hook settings.

Which just creates more questions in my mind. LIke what data is sent? Where is it sent from? Is the data sent when SMS messages are sent, received, or both? Does this affect anything else like sending/receiving SMS from UCP? Does this only work with Sangoma modules or can it be useful for more generic solutions? I read a blub on some other thread where one person suggested creating a https.webhook.site link for testing but I was not able to see any traffic trying various things.

This feels like something I may have added for a dangerous demo but I don’t recall. In any case the SMS module is NOT open source so I can’t go pasting code here. You are also “not allowed” to reverse engineer anything. That said asking PHP nicely may give you some information

 php -r 'require "/etc/freepbx.conf"; $classReflection = new ReflectionClass(FreePBX::Sms()); foreach ($classReflection->getMethods() as $method) { $signature = $method->getName() . "("; $params = $method->getParameters(); $paramStrings = []; foreach ($params as $param) { $paramString = ""; if ($param->hasType()) { $paramString .= $param->getType() . " "; } if ($param->isPassedByReference()) { $paramString .= "&"; } $paramString .= "$" . $param->getName(); if ($param->isDefaultValueAvailable()) { $paramString .= " = " . var_export($param->getDefaultValue(), true); } $paramStrings[] = $paramString; } $signature .= implode(", ", $paramStrings) . ")"; echo $signature . PHP_EOL; }'

It looks like there are some webhook functions that may give you more information.

1 Like

https://sangomakb.atlassian.net/wiki/spaces/PG/pages/25690422/SMS+Webhook

1 Like

Works great thanks. Who says we can’t legitimately reverse engineer anything?

https://www.sangoma.com/wp-content/uploads/FreePBX-Commercial-Module-EULA.pdf Section 2.2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.