Outgoing webhooks

hello,
I am using Mattermost for the first time.
I have set up incoming and outgoing webhooks. My incoming webhooks are working fine; I can receive messages from the API, but when I send a message from Mattermost with a trigger word, for example, weather New York, my POST API is not receiving data.

When I check the console, it is sending a request to itself, e.g it is sending request where Mattermost is hosted and not on my callback URL.
Please help to resolve this issue.

Hi Adil! Welcome to Mattermost! It sounds like there might be a configuration issue with your outgoing webhook. Please ensure that your callback URL is correctly set. If the problem persists, feel free to share more details here, and our community will be happy to help!

i have correctly setup the callback URL (http://127.0.0.1:5000/webhook)
when i check my docker logs this error came.

2024-07-15 11:14:06 {“timestamp”:“2024-07-15 05:44:06.864 Z”,“level”:“error”,“msg”:“Event POST
failed.”,“caller”:“app/webhook.go:119”,“path”:“/api/v4/posts”,“request_id”:“hccds8nykjb6dkffyhhyjem1ur”,“ip_addr”:“172.18.0.1”,“user_id”:“u3yitjdhujf4xdo8xzt4fad6qy”,“method”:“POST”,“error”:“Post "http://127.0.0.1:5000/webhook\”: dial tcp 127.0.0.1:5000: connect: connection refused"}