<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello All,<br>
<br>
I am trying to get a failure route to work, I have got it working
partially.<br>
<br>
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.<br>
<br>
But sometimes the sip client is still registered in the location
table, but not connected anymore, mainly with wifi connected
clients.<br>
<br>
So, I have got the time out on 3 seconds (fr_timer). When that hits
I have configured the following failure route:<br>
<br>
<br>
failure_route[NOTONLINE]<br>
{<br>
<br>
xlog("SCRIPT: Notonline failure route\n");<br>
<br>
t_on_failure("STOP");<br>
<br>
if (t_is_canceled())<br>
{<br>
exit;<br>
}<br>
<br>
if (t_check_status("408"))<br>
{<br>
xlog("SCRIPT: Status is time out");<br>
$rU = $avp(orig_called); <i>( called number and
alias id not equal, so have to revert the rU back to the called
number)</i><br>
prefix("9993"); <i>( needed to get the right
manipulation done within asterisk)</i><br>
xlog("SCRIPT: uri is $ru");<br>
$ru = "sip:" + $rU + "@w.x.y.x:5060";<br>
xlog("SCRIPT: uri is $ru");
(w.x.y.z ip address of the asterisk box)<br>
append_branch();<br>
t_relay_to_udp("w.x.y.x","5060");<br>
break;<br>
}<br>
}<br>
<br>
<br>
I am not sure if the above is correct. I have based this on an old
"voicemail" failure route I could find.<br>
<br>
It is working correct, the call is forwarded to an Asterisk box,
where some manipulation is done and then send to an pstn gateway. <br>
<br>
The only problem I have is one way audio. RTP from the called number
reaches the callee but not vice versa.<br>
<br>
Now I am wondering, can that be caused by the failure route, or
should I be looking in another direction?<br>
<br>
Hope someone can give me a pointer.<br>
<br>
Thanks.<br>
<br>
Gertjan Wolzak<br>
</body>
</html>