[SR-Users] how to forward on busy

Daniel-Constantin Mierla miconda at gmail.com
Tue Feb 22 22:55:48 CET 2011


Hello,

On 2/21/11 7:59 PM, x-kamailio at sidell.org wrote:
> I'm trying to do something very basic, which is to forward a call to a
> different number on busy.  But, the various things I've tried from the
> examples don't work.
>
> Starting with the kamailio.cfg that is included with version 3.1, what
> code would I add to forward all busy calls to "sip:foo at bar.com", a
> target that is not necessarily local to the server?
>
after going to lookup("location") and forwarding for the first time the 
INVITE, set a failure_route with:

t_on_failure("REDIRECT_BUSY");

before doing the t_relay().

Then, define the failure_route like:

failure_route[REDIRECT_BUSY] {
    if(t_check_status("486")) {
        $ru = "sip:foo at bar.com";
        t_relay();
    }
}

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://www.asipto.com




More information about the sr-users mailing list