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
route[SERVICES] {
rewritehostport("127.0.0.1:5080");
append_branch();
t_on_branch("1");
t_on_reply("catch_200");
}
branch_route[1] {
remove_hf("P-App-Name");
append_hf("P-App-Name: early_announce\r\n");
append_hf("P-App-Param: B2B=no\r\n");
}
onreply_route[catch_200] {
if(status=="200") {
if (t_cancel_branches("others")) {
xlog("cancelled all branches\n");
}
}
}
Thanks.