<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style></head><body lang=EN-US link=blue vlink="#954F72" style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal>Hi I want to use kamailio with sems for early media generation. For that purpose I write a service route that when an invite received by kamailio it triggers that route in that route I fork the call to the sems and continue to the calle when I receive 200 ok cancel all other branches. But no media between 2 call ends please help me. I know something is wrong in my logic</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>route[SERVICES] {</p><p class=MsoNormal>rewritehostport("127.0.0.1:5080");</p><p class=MsoNormal> append_branch();</p><p class=MsoNormal> t_on_branch("1");</p><p class=MsoNormal> t_on_reply("catch_200");</p><p class=MsoNormal>}</p><p class=MsoNormal>branch_route[1] {</p><p class=MsoNormal> remove_hf("P-App-Name");</p><p class=MsoNormal> append_hf("P-App-Name: early_announce\r\n");</p><p class=MsoNormal> append_hf("P-App-Param: B2B=no\r\n");</p><p class=MsoNormal> }</p><p class=MsoNormal> </p><p class=MsoNormal> </p><p class=MsoNormal> onreply_route[catch_200] {</p><p class=MsoNormal> if(status=="200") {</p><p class=MsoNormal> if (t_cancel_branches("others")) {</p><p class=MsoNormal> xlog("cancelled all branches\n");</p><p class=MsoNormal> }</p><p class=MsoNormal> }</p><p class=MsoNormal> }</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks.</p><p class=MsoNormal><o:p> </o:p></p></div></body></html>