Hi,
I've been googling for a while and I haven't been able to find out how to do the following:
I would like to reject all SUBSCRIBE and NOTIFY messages received by my OpenSER server. How do I do properly?
if (method=="SUBSCRIBE") { };
if (method=="NOTIFY") { };
I couldn't find any examples and Google also didn't find anything that pointed me in the right direction.
Thanks!
Hi,
use sl_send_reply() function, and them terminate it afterwords with a break (or maybe it's exit in openser)
-Atle
* Andreas Sikkema andreas.sikkema@bbeyond.nl [070501 13:43]:
Hi,
I've been googling for a while and I haven't been able to find out how to do the following:
I would like to reject all SUBSCRIBE and NOTIFY messages received by my OpenSER server. How do I do properly?
if (method=="SUBSCRIBE") { };
if (method=="NOTIFY") { };
I couldn't find any examples and Google also didn't find anything that pointed me in the right direction.
Thanks!
-- Andreas Sikkema
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Hi Andreas,
The following code will do it: if (is_method("SUBSCRIBE|NOTIFY")) { sl_send_reply("501", "SUBSCRIBE and NOTIFY not supported"); exit; };
Regards, Ovidiu Sas
On 5/1/07, Andreas Sikkema andreas.sikkema@bbeyond.nl wrote:
Hi,
I've been googling for a while and I haven't been able to find out how to do the following:
I would like to reject all SUBSCRIBE and NOTIFY messages received by my OpenSER server. How do I do properly?
if (method=="SUBSCRIBE") { };
if (method=="NOTIFY") { };
I couldn't find any examples and Google also didn't find anything that pointed me in the right direction.
Thanks!
-- Andreas Sikkema
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Andreas Sikkema wrote:
Ovidiu,
The following code will do it: if (is_method("SUBSCRIBE|NOTIFY")) { sl_send_reply("501", "SUBSCRIBE and NOTIFY not supported"); exit; };
And 501 is the appropriate error to send back?
Yes, you may want to have a look at
http://tech-invite.com/Ti-sip-abnf.html#siprc
for a list of all possible SIP response codes.
Christian
Hi Andreas,
According to the rfc, it should be valid:
21.5.2 501 Not Implemented
The server does not support the functionality required to fulfill the request. This is the appropriate response when a UAS does not recognize the request method and is not capable of supporting it for any user. (Proxies forward all requests regardless of method.)
Note that a 405 (Method Not Allowed) is sent when the server recognizes the request method, but that method is not allowed or supported.
Now, how the UAC will handle the response, it is a different story :-) You will need to test for each UAC.
Regards, Ovidiu Sas
On 5/3/07, Andreas Sikkema andreas.sikkema@bbeyond.nl wrote:
Ovidiu,
The following code will do it: if (is_method("SUBSCRIBE|NOTIFY")) { sl_send_reply("501", "SUBSCRIBE and NOTIFY not supported"); exit; };
And 501 is the appropriate error to send back?
-- Andreas Sikkema
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users