You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I'm not sure if I understand the usage of webhooks with sipgate.io correctly. I wrote some code, along with the node examples, that reacts on multiple events, e.g. newCallEvent. I host it on a dedicated machine in AWS that is assigned the WEBHOOK_SERVER_ADDRESS. This is also configured in sipgate.io.
The WEBHOOK_URL is set to some Grafana incoming webhook endpoint. When starting the server and calling a number that's configured for the webhook, the log reads
Caution! IP address is not from sipgate
At this point I'm not sure if I'm supposed to host this "webhook relay" myself or if it should somehow be configured / uploaded to sipgate. But if so, I have no idea how. Would be lovely if someone can point me in the right direction.
To Reproduce
Steps to reproduce the behavior.
Expected behavior
Webhook data being transfered from sipgate to the configured outgoing webhook.
Environment (please complete the following information):
OS: node:20-buster docker image
Node.js Version 20
Library Version 2.15.0
Additional context
const{ createWebhookModule }=require("sipgateio");require("dotenv").config();constaxios=require("axios").default;process.on('SIGINT',function(){console.log("Caught interrupt signal");if(true)process.exit();});constoutgoingWebhookUrl=process.env.OUTGOING_WEBHOOK_URL;if(!outgoingWebhookUrl){console.error("Please provide a outgoing webhook URL via the environment variable OUTGOING_WEBHOOK_URL");return;}constserverAddress=process.env.WEBHOOK_SERVER_ADDRESS;if(!serverAddress){console.error("Please provide a server address via the environment variable WEBHOOK_SERVER_ADDRESS");return;}constwebhookServerOptions={port: process.env.WEBHOOK_SERVER_PORT||3000,
serverAddress,};createWebhookModule().createServer(webhookServerOptions).then((server)=>{console.log(`Server running at ${webhookServerOptions.serverAddress}:${webhookServerOptions.port}\n`+"Ready for calls");server.onNewCall((newCallEvent)=>{console.log(`New call from ${newCallEvent.from} to ${newCallEvent.to}`);axios.post(outgoingWebhookUrl,{})});});
The text was updated successfully, but these errors were encountered:
Describe the bug
I'm not sure if I understand the usage of webhooks with sipgate.io correctly. I wrote some code, along with the node examples, that reacts on multiple events, e.g.
newCallEvent
. I host it on a dedicated machine in AWS that is assigned theWEBHOOK_SERVER_ADDRESS
. This is also configured in sipgate.io.The
WEBHOOK_URL
is set to some Grafana incoming webhook endpoint. When starting the server and calling a number that's configured for the webhook, the log readsAt this point I'm not sure if I'm supposed to host this "webhook relay" myself or if it should somehow be configured / uploaded to sipgate. But if so, I have no idea how. Would be lovely if someone can point me in the right direction.
To Reproduce
Steps to reproduce the behavior.
Expected behavior
Webhook data being transfered from sipgate to the configured outgoing webhook.
Environment (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: