Dear ALL:
I try to make a call from UA1 to UA2, and UA2 is busy. So the call
will forward to another UA3.
UA1 ==> UA2(busy) ==> UA3
But when I watch the log, I find that miss the following log (diff
with call from UA1 to UA2 and directly forward to UA3)
UA1 ==> UA2(callfwd) ==> UA3
Feb 22 12:15:07 ser mediaproxy[18476]: session
16AA8C75-5EAC-403C-85DA-C5D9BDFD15C7(a)10.18.1.70: started. listening on
xxx.xxx.190.248:35026
When I make a callfwd call, the call will run route[2] but not failure_route[1].
UA1==>UA2(callfwd)==>route[2]==>UA3
And I make a fwdbusy call, the call will run route[2] then pass
failure_route[1],
and return to route[2].
UA1==>UA2(fwdbusy)==>failure_route[1]==>route[2] =XXX=> UA3 ????
Why does the method be failed? Do I must "end_media_session()" before
start a busy call?
How can I modify it or any idea?
My snippet ser.cfg :
--------------------------------------------------------------------------------------------------------------
route[2] {
log(1, "SER: SIP Call On-Net section route(2)\n");
if ((method=="INVITE") && !allow_trusted()) {
if (!proxy_authorize("", "subscriber")) {
proxy_challenge("", "0");
break;
} else if (!check_from()) {
log(1, "Spoofed SIP call attempt");
sl_send_reply("403", "Use From=ID");
break;
} else if (!(is_from_local() || is_uri_host_local())) {
sl_send_reply("403", "Please register to use
our service");
break;
};
};
if (uri=~"[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)"
&&
!search("^Route:")){
sl_send_reply("479", "We don't forward to private IP
addresses");
break;
};
if (method=="INVITE" || method=="ACK") {
use_media_proxy();
};
t_on_failure("1");
t_on_reply("1");
if (!t_relay()) {
if (method=="INVITE" || method=="ACK") {
end_media_session();
};
sl_reply_error();
};
}
failure_route[1] {
log(1, "SER: Failure Route section failure_route(1)\n");
# if caller hung up then don't sent to voicemail
if (t_check_status("487")) {
break;
};
if (isflagset(26) && t_check_status("486")) {
# forward busy is flag 26
if (avp_pushto("$ruri", "s:fwdbusy")) {
log(1, "SER: fork to fwdbusy\n");
avp_delete("s:fwdbusy");
append_branch();
resetflag(26);
# test for domestic PSTN gateway
if (uri=~"^sip:0[0-9]{9}@") {
# if (avp_check("$fwd_busy_type", "eq/dom/i"))
{
# test for domestic PSTN gateway
log(1, "SER: Busy Failure and Jump to
route(3)\n");
route(3);
} else if (uri=~"^sip:002[1-9][0-9]*@") {
# } else if (avp_check("$fwd_busy_type",
"eq/int/i")) {
# test for international PSTN gateway
log(1, "SER: Busy Failure and Jump to
route(6)\n");
route(6);
} else {
# default to sip call
log(1, "SER: Busy Failure and Jump to
route(2)\n");
route(2);
};
break;
};
};
# here we can have either voicemail __OR__ forward no answer
if (isflagset(27) && t_check_status("408")) {
# forward no answer is flag 27
if (avp_db_load("$ruri/username", "s:fwdnoanswer")) {
avp_pushto("$ruri", "s:fwdnoanswer");
log(1, "SER: fork to fwdnoanswer\n");
avp_delete("s:fwdnoanswer");
append_branch();
resetflag(27);
if (uri=~"^sip:0[0-9]{9}@") {
# if (avp_check("$fwd_no_answer_type",
"eq/dom/i")) {
# test for domestic PSTN gateway
log(1, "SER: No Answer Failure and Jump
to route(3)\n");
route(3);
} else if (uri=~"^sip:002[1-9][0-9]*@") {
# } else if (avp_check("$fwd_no_answer_type",
"eq/int/i")) {
# test for international PSTN gateway
log(1, "SER: No Answer Failure and Jump
to route(6)\n");
route(6);
} else {
# default to sip call
log(1, "SER: No Answer Failure and Jump
to route(2)\n");
route(2);
};
break;
};
} else if (isflagset(31) && avp_pushto("$ruri",
"$voicemail")) {
avp_delete("$voicemail");
log(1, "SER: No Answer Failure and Jump to route(4)\n");
route(4);
break;
};
}