<div dir="ltr">Hallo all, <div><br></div><div>I defined  branch_failure routing  block via t_on_branch_failure()</div>In the branch_failure route, in case of "408 Request timeout" I am sending CANCEL with reason "t_cancel_callid("$ci", "$cs", "22", "408")".<div><br></div><div>If the t_cancel_callid("$ci", "$cs", "22", "408") is called in 

branch_failure for branch idx 0, the CANCEL is sent, but Reason header is missing there.</div><div><div>Why?  (I expect that t_cancel_callid() should insert Reason header regardless of branch it is called from)</div><div><br></div></div><div><div>If the t_cancel_callid is called in branch idx !=0, the CANCEL contains Reason header with cause as expected.</div><div><br></div></div><div>Thanks for clarification of this behavior, <br></div><div>Pavel.  </div><div><br></div><div>P.S. code snipset:</div><div>event_route[tm:branch-failure:primary]<br></div><div>{<br></div><div> if ($T(reply_code) == "408")</div>    {<br>        if ($avp(branch_idx) == $T_branch_idx)<br>        {<br>            if (t_cancel_callid("$ci", "$cs", "22", "408"))<br>            {<br>                xlog("L_INFO", "CANCEL sent ci:$ci, cs:$cs 408");    <br>            }<br>            else<br>            {<br>                xlog("L_INFO", "CANCEL not sent ... ci:$ci, cs:$cs 408");<br>            }<br><br>            $var(_palotmp_) = "sip:" + $avp(replaced_cfnry_target_number) + "@" + $dd + ":" + $dp + ";user=phone";            <br>            append_branch($var(_palotmp_),"1.0");<br><br>            t_relay();<br>            return;<br>        }<br>    }<div>}<br></div><div><div><br></div></div></div>