[SR-Users] Append to reply in default action of failure_route

Andrew Pogrebennyk apogrebennyk at sipwise.com
Mon Dec 28 15:12:44 CET 2015


Thanks Dmitri, I have to look closer at it, but for me it breaks
parallel forking, e.g. I need to reply only when it's the last branch.

Andrew

On 12/22/2015 05:46 PM, Dmitri Savolainen wrote:
> Andrew, I use smth like this for adding header to any response
> 
> request_route{
> 
> if (is_method("INVITE")){
>         t_check_trans();
>         t_on_failure("INV_FAIL");
>         t_relay("mysip", "5060");
> }
> 
> }
> 
> 
> failure_route[INV_FAIL] {
>         xlog("L_INFO", "failure_route code: $T_reply_code; reason:
> $T_reply_reason;");
>         append_to_reply("MyField: my_field_content\r\n");
>         send_reply("$T_reply_code","$T_reply_reason");
>         exit;
> 
> }




More information about the sr-users mailing list