I am working with SIP protocol, and I have an issue with an endpoint (ZTE). The endpoint sends a lot of SUBSCRIBE method messages and I want to stop that because i don't whant to implement it. I already tried to respond with 403 (Method Forbibben) and 405 (Method Not Allowed), but the endpoint is still sending SUBSCRIBE.
What is the propper way to stop an endpoint to send that method?
Thanks!
Sending a 405 (Method not allowed) response is correct. You should also add an Allow header with the methods you DO support.
Omit the SUBSCRIBE method from the Allow headers in (all) your requests and responses to the endpoint. This indicates that you don't support the SUBSCRIBE method.
Of course, you can't control whether the endpoint complies. If it's poorly implemented it could still send SUBSCRIBEs despite you indicating not to send them.