Hello,
can you try with:
if(is_method("NOTIFY|SUBSCRIBE|OPTIONS")) {
Not sure method (which is reserved keyword), works with regular expressions, the example is with $rm, which is a variable and works with regexps.
Cheers, Daniel
On 1/17/12 6:40 PM, JR Richardson wrote:
Hi All,
Tuning my homer capture server and ran into a syntax error in the onreply_route. The idea is to NOT to capture NOTIFY|SUBSCRIBE|OPTIONS. The route block compiles ok but I get the following errors for the lines in the onreply_route:
0(6443) :<core> [cfg.y:3504]: parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 48, column 46: syntax error 0(6443) :<core> [cfg.y:3504]: parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 49, column 15: bad expression 0(6443) :<core> [cfg.y:3504]: parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 49, column 16: ERROR: bad config file (3 errors)
route { if (!(method =~ "^(NOTIFY|SUBSCRIBE|OPTIONS)")) { sip_capture(); } exit; }
47 onreply_route { 48 if (!($rm =~ "^(NOTIFY|SUBSCRIBE|OPTIONS)") { 49 sip_capture(); 50 } 51 drop; 52 }
This example was used from the homer wiki http://code.google.com/p/homer/wiki/Kamailio
root@homer:/etc/kamailio# kamailio -V version: kamailio 3.2.1 (x86_64/linux) bee094
Any guidance is appreciated.
Thanks.
JR