<DIV>
<DIV>
<DIV>Hello,</DIV>
<DIV>I ran out into some problem when&nbsp;implementing Call Forwarding feature using SER. </DIV>
<DIV>My test setup:</DIV>
<DIV>192.168.25.101 - XLite ---&gt; INVITE UA(sip:444)</DIV>
<DIV>192.168.25.163 - ser; rewrites to Address of record of Asterisk (sip:1111 instead of sip:444)</DIV>
<DIV>192.168.25.169 - PBX Asterisk</DIV>
<DIV>&nbsp;</DIV>
<DIV>As I see from log files, SER sends INVITE 2 times,</DIV>
<DIV>then Asterisk sends 3 times 200 status etc . until BYE is sent (here everything correct....)</DIV>
<DIV>Here is my configuration script:</DIV>
<DIV>==================================</DIV>
<DIV>route{</DIV>
<DIV>. . .<BR>&nbsp;&nbsp;<BR>&nbsp;record_route();</DIV>
<DIV>&nbsp;#--rewrite URI &nbsp;<BR>&nbsp;if (method=="INVITE"){&nbsp;#--call forwarding<BR>&nbsp;setflag(1);<BR>&nbsp;route(1); #--cfw<BR>&nbsp;if(!isflagset(1)) {<BR>&nbsp;&nbsp;break;<BR>&nbsp;}</DIV>
<DIV>lookup("location")</DIV>
<DIV>...</DIV>
<DIV>};</DIV>
<DIV>&nbsp;</DIV>
<DIV>route[1] {<BR>&nbsp;log(1, "forwarding\n");<BR>&nbsp;if (!if_activated("to")) {&nbsp;&nbsp;<BR>&nbsp;&nbsp;#--continue regular call set up<BR>&nbsp;&nbsp;break;<BR>&nbsp;};<BR>&nbsp;if (!lookup_dn()){<BR>&nbsp;&nbsp;sl_send_reply("404","Not Found");<BR>&nbsp;&nbsp;resetflag(1); #--continue!<BR>&nbsp;&nbsp;break;<BR>};</DIV>
<DIV>}</DIV>
<DIV>Here if_activated checks whether the feature was activated; lookup_dn() rewrites URI to new UA and call append_branch()</DIV>
<DIV>&nbsp;</DIV>
<DIV>Any ideas what I am doing wrong?<BR>&nbsp;<BR>&nbsp;if (!t_relay()) {<BR>&nbsp;&nbsp;sl_reply_error();<BR>&nbsp;};</DIV>
<DIV>}</DIV>
<DIV>===========</DIV>
<DIV>&nbsp;</DIV>
<DIV>Any help will be highly appreciated!!!</DIV>
<DIV>Thanks, Tina,</DIV>
<DIV>software engineer</DIV>
<DIV>&nbsp;</DIV></DIV></DIV><p>
                <hr size=1>Do you Yahoo!?<br> 
Yahoo! Small Business - <a href="http://us.rd.yahoo.com/evt=31637/*http://smallbusiness.yahoo.com/resources/">Try our new resources site!</a>