Hi Mikko,
I have configured the kamailio.cfg file as given below
onreply_route[MANAGE_REPLY] {
xdbg("incoming reply\n");
if(method == "REGISTER") {
*append_to_reply*("Security-Server: ipsec-3gpp; q=0.1;
alg=hmac-md5-96; ealg=des-ede3-cbc; prot=ah; mod=trans; spi-c=3333;
spi-s=4444; port-c=5066; port-s=5068\r\n");
}
if(status=~"[12][0-9][0-9]")
route(NATMANAGE);
}
Now I am getting below error message
loading modules under config path: /usr/local/lib64/kamailio/modules/
0(3002) ERROR: <core> [cfg.y:3282]: yyparse(): misused command
append_to_reply
0(3002) : <core> [cfg.y:3426]: yyerror_at(): parse error in config file
/usr/local/etc/kamailio/kamailio.cfg, line 982, column 164: Command cannot
be used in the block
ERROR: bad config file (1 errors)
0(3002) WARNING: <core> [ppcfg.c:219]: pp_ifdef_level_check(): different
number of preprocessor directives: N(#!IF[N]DEF) - N(#!ENDIF) = 1
Could you please give me idea where I went wrong ?
On Sat, Jun 6, 2015 at 11:37 AM, Mikko Lehto <mslehto(a)iki.fi> wrote:
Priyaranjan Nayak <priyaranjan4169(a)gmail.com>om>:
I wanted to send a extra header(i.e.
Security-Server ) in the 200 OK
from
kamailio server. Could you please suggest me how
can I add extra header
in
200 OK message by using kamailio.cfg file ?
Hi Priyaranjan
Maybe you are looking for script function append_to_reply() ?
http://www.kamailio.org/docs/modules/4.3.x/modules/textops.html#textops.f.a…
--
Mikko Lehto
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Thanks
Priyaranjan