Hello,
On 11/01/06 21:53, Rodrigo P. Telles wrote:
Hi Folks,
Today I realised something strange in openser-1.1.0-notls. I'm trying to mach any ACKs to do something (e.g. logging) but its doesn't work at all.
I'm using "method" like this:
If (method=="ACK") { xlog("L_ALERT","ACK received\n"); };
and I it doesn't work, but...
if (is_method("ACK")) { xlog("L_ALERT","ACK received\n"); };
works perfectly! I could not find anything about it in archive mail list neither in doc.
is_method() is documented in textops module readme. You can use is_method() to check the known methods and you can give more method names as parameters
is_method("INVITE|BYE|CANCEL|ACK")
It is a bit faster since it uses bit operations to check the method value, while (method=="NAME") is string comparison.
Cheers, Daniel
Rodrigo P. Telles
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users