Hi,
Ya i do change the Presence block also, but the same error is logging:
$ sudo /etc/init.d/kamailio start
Not starting Kamailio: invalid configuration file!
-e
0(5930) INFO: tls [tls_init.c:385]: init_tls_compression(): tls: init_tls: disabling compression...
0(5930) : <core> [cfg.y:3570]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 815, column 1: syntax error
0(5930) : <core> [cfg.y:3570]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 815, column 1: invalid route statement
0(5930) : <core> [cfg.y:3567]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 818, column 1-5:
ERROR: bad config file (3 errors)
Here below is the script that looks like:
# Per SIP request initial checks
route[REQINIT] {
#!ifdef WITH_ANTIFLOOD
# flood dection from same IP and traffic ban for a while
# be sure you exclude checking trusted peers, such as pstn gateways
# - local host excluded (e.g., loop to self)
if(src_ip!=myself)
{
if($sht(ipban=>$si)!=$null)
{
# ip is already blocked
xdbg("request from blocked IP - $rm from $fu (IP:$si:$sp)\n");
exit;
}
if (!pike_check_req())
{
xlog("L_ALERT","ALERT: pike blocking $rm from $fu (IP:$si:$sp)\n");
$sht(ipban=>$si) = 1;
exit;
}
}
#!endif
}
# Presence server route
route[PRESENCE] {
if(!is_method("PUBLISH|SUBSCRIBE|NOTIFY"))
return;
#!ifdef WITH_PRESENCE
# create new transaction to catch retransmissions
if (!t_newtran())
{
sl_reply_error();
exit;
}
if( is_method("NOTIFY"))
{
xlog("L_INFO", "*** xmpp-handled NOTIFY message.");
if(pua_xmpp_notify())
t_reply("200", "OK");
t_release();
exit;
}
else if( is_method("SUBSCRIBE"))
{
xlog("L_INFO", "*** xmpp-handled SUBSCRIBE message.\n");
handle_subscribe();
if($(hdr(Event))== "presence")
{
pua_xmpp_req_winfo("$ruri", "$hdr(Expires)");
}
t_release();
exit;
}
else if(is_method("PUBLISH"))
{
handle_publish();
t_release();
exit;
}
#!endif
}
please help me in resolving this problem.