[OpenSIPS-Users] Implement Conditional Call forward

Kenny Tsang kenny at cititone.net
Mon Sep 5 13:54:33 CEST 2011


Hello guys,
Can anyone help me? I was trying to implement conditional call forward when it was busy or time-out. But the caller can’t hear anything after it was forward to the IVR. It just keep ringing. Any idea why? I’ve installed the Opensips 1.5.2, Asterisk 1.4.27.1 and Mediaproxy 2.3.8.
 
route[5]
{
            xlog("L_INFO", "conditional call forward checking");
            if(avp_db_load("$ru/username","$avp(s:cvm)"))
            {
                        $avp(s:divert_reason)="cvm";
                        prefix("VMR_");
                        rewritehostport("vm.example.com:5060");
                        append_branch();
                        if (!t_relay()) {
                                    xlog("L_INFO","sl reply error");
                                    sl_reply_error();
                        }
                        exit;
            }         
            xlog("L_INFO", "No conditional forward found");
}
 
failure_route[1] {
            if (t_was_cancelled())
            {
                        xlog("L_INFO", "call was cancelled");
                        exit;
            }
 
            if (t_check_status("3[0-9][0-9]"))
            {
                        t_reply("404","Not found");
                        exit;
            }
 
            if (t_check_status("48[0-9]|408"))
            {
                        xlog("L_INFO", "failed call forward, failure_route - call forward to Voice Mail - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
                        route(5);
            }
}
 
Regards,
Kenny
 




More information about the Users mailing list