Hello All,

I am trying to get a failure route to work, I have got it working partially.

When a call comes in, first I check the db_alias, if that is positive I do a lookup location and relay if the location is valid.

But sometimes the sip client is still registered in the location table, but not connected anymore, mainly with wifi connected clients.

So, I have got the time out on 3 seconds (fr_timer). When that hits I have configured the following failure route:


failure_route[NOTONLINE]
{

        xlog("SCRIPT: Notonline failure route\n");

        t_on_failure("STOP");

        if (t_is_canceled())
        {
                exit;
        }

        if (t_check_status("408"))
        {
                xlog("SCRIPT: Status is time out");
                $rU = $avp(orig_called); ( called number and alias id not equal, so have to revert the rU back to the called number)
                prefix("9993"); ( needed to get the right manipulation done within asterisk)
                xlog("SCRIPT: uri is $ru");
                $ru = "sip:" + $rU + "@w.x.y.x:5060";
                xlog("SCRIPT: uri is $ru");                    (w.x.y.z ip address of the asterisk box)
                append_branch();
                t_relay_to_udp("w.x.y.x","5060");
                break;
        }
}


I am not sure if the above is correct. I have based this on an old "voicemail" failure route I could find.

It is working correct, the call is forwarded to an Asterisk box, where some manipulation is done and then send to an pstn gateway.

The only problem I have is one way audio. RTP from the called number reaches the callee but not vice versa.

Now I am wondering, can that be caused by the failure route, or should I be looking in another direction?

Hope someone can give me a pointer.

Thanks.

Gertjan Wolzak