[SR-Users] Need to add extra header in 200 OK message by using kamailio.cfg file

Daniel-Constantin Mierla miconda at gmail.com
Mon Jun 8 19:32:41 CEST 2015


If you want to add a header to a received reply handled in
onreply_route, simply use append_hf(...).

Cheers,
Daniel

On 06/06/15 09:31, Mikko Lehto wrote:
> Priyaranjan Nayak <priyaranjan4169 at gmail.com>:
>  
>> 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
> That means that you can not run append_to_reply()
> while in onreply_route -block. Quote from documentation:
> ---
> This function can be used from REQUEST_ROUTE, BRANCH_ROUTE,
> FAILURE_ROUTE, ERROR_ROUTE.  
> ---
>
> Maybe you can call append_to_reply() before setting onreply_route
> with t_on_reply() ?
>
>
>> 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
> I don't know about this, propably unrelated to above.
>

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com




More information about the sr-users mailing list