Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webhook event Error(onHangUp, onAnswer) #29

Open
Liam-Philips opened this issue Mar 5, 2025 · 0 comments
Open

Webhook event Error(onHangUp, onAnswer) #29

Liam-Philips opened this issue Mar 5, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@Liam-Philips
Copy link

Hi, I tried to use webhook and onNewCall event works well.
But onHangUp and onAnswer events are not working.
Even it doesn't console any string.
I tried like this, could you please help me?

createWebhookModule(sipgateio)
.createServer({
port: port,
serverAddress: serverAsdress,
skipSignatureVerification: true
})
.then((webhookServer) => {
console.log("Webhook server connected");
webhookServer.onNewCall(async (newCallEvent) => {

        console.log(`New Call from ${newCallEvent.from} to ${newCallEvent.to}`);
    });

    webhookServer.onAnswer(async (answerEvent) => {
        console.log(`The call was anwered by ${answerEvent.user}`);
    });

    webhookServer.onHangUp(async (hangUpEvent) => {
        console.log("sdfsdfdsfsdfsdfdsfsdfsdfsdfsdfsdfsdf");
    });
    webhookServer.onData(async (dataEvent) => {
        console.log(`Data Event: `, dataEvent);
    });
}).catch((err) => console.error(err));
@Liam-Philips Liam-Philips added the enhancement New feature or request label Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants