Dear kamailio'ns

I am running kamailio 4.0.3 on ubuntu 12.04 and installed kamailio from its repository. I had changed the default kamailio config file, and inserted xmpp and presence related script. But after all when i tried to start my kamailio server I am getting the following errors:

$ sudo /etc/init.d/kamailio start
Not starting Kamailio: invalid configuration file!
-e
 0(5502) INFO: tls [tls_init.c:385]: init_tls_compression(): tls: init_tls: disabling compression...
 0(5502) : <core> [cfg.y:3570]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 816, column 6: syntax error
 0(5502) : <core> [cfg.y:3570]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 816, column 6: missing '(' or ')' ?
 0(5502) : <core> [cfg.y:3570]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 816, column 6: bad command: missing ';'?
 0(5502) : <core> [cfg.y:3570]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 816, column 15: '('')' expected (function call)
 0(5502) : <core> [cfg.y:3570]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 816, column 15: bad command: missing ';'?
 0(5502) : <core> [cfg.y:3570]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 816, column 17: bad command
ERROR: bad config file (6 errors)

All of the above errors are pointing at route[Presence] block in the script.
What could be the reason for the errors and is there any fault in my config file (please find the attachment for the same).

Thanks in advance.

Regards.
Ravi