<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font size="-1">Hi list, <br>
<br>
I having trouble with my script when trying to call forward by
reseting the $ru and doing a route(1)<br>
<br>
My problem seems to be coming from the fact that I am changing my
$fu with uac_replace_from. When I xlog the $fu right before the
route() It shows the correct value (the original $fu before it was
changed by uac_replace_from). But on the request to the forwarded
number it tries to authenticate the user using the new value (the
value that uac_replace_from put in)<br>
<br>
If I don't replace the $fu everything works fine.<br>
<br>
Thanks A lot for any help!!<br>
<br>
here is the relavant parts of my script:<br>
<br>
Replacing the uri in the original request:<br>
<br>
if (is_avp_set("$avp(s:uri)")) {<br>
if (is_avp_set("$avp(s:fromname)")) {<br>
xlog("L_INFO","Fromname set to
$avp(s:fromname) and URI set to $avp(s:uri)");<br>
uac_replace_from("$avp(s:fromname)","$avp(s:uri)");<br>
} else {<br>
uac_replace_from("","$avp(s:uri)");<br>
xlog("L_INFO","Only Fromname
Set");<br>
}<br>
}<br>
<br>
<br>
The fowrwarding:<br>
<br>
if(avp_db_load("$ru","$avp(s:unavailcallfwd)")) {<br>
#xlog("call forward is
set to: $avp(s:unavailcallfwd)");<br>
avp_pushto("$ru","$avp(s:unavailcallfwd)");<br>
xlog("call forward is
set to: $ru from $fu");<br>
<br>
route(1);<br>
<br>
exit;<br>
}<br>
<br>
<br>
And the proxy authorize<br>
<br>
<br>
xlog("Checking if we should attempt authentication on
$fu");<br>
if (!(method=="REGISTER"))<br>
{<br>
#Do not authenticate calls from the gateways<br>
xlog("Checking if its from a gateway");<br>
if(!is_from_gw()) # This check is from the
drouting module<br>
{<br>
xlog("Checking if it is an IP Authed IP");<br>
if(!check_source_address("0",
"$avp(i:9)")) #This check looks in the address table<br>
{<br>
xlog("Checking if it is a
subscriber");<br>
<br>
xlog("from is $fu");<br>
<br>
if (!proxy_authorize("",
"subscriber")) {<br>
proxy_challenge("", "0");<br>
xlog("Sent proxy challange
to $fu");<br>
exit;<br>
}<br>
if (!db_check_from()) {<br>
sl_send_reply("403","Forbidden auth ID");<br>
exit;<br>
}<br>
<br>
}<br>
}<br>
}<br>
<br>
<br>
</font>
<pre class="moz-signature" cols="72">--
Jesse Cloutier
Network Administrator
Cronomagic Canada
5143411579 x210
<a class="moz-txt-link-abbreviated" href="mailto:jesse@cronomagic.com">jesse@cronomagic.com</a></pre>
</body>
</html>