<HTML>
<HEAD>
<TITLE>Problems with goes_to_gw Drouting</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Using opensips 1.6.3 SVN # 7282<BR>
<BR>
<BR>
I noticed that if I have a gateway defined in the dr_gateways tables as a hostname, the goes_to_gw function never works (it gets skipped). But if I change that hostname to an IP address, the function works properly. Is this how its supposed to function or is it a bug? <BR>
<BR>
do_routing()<BR>
if (goes_to_gw(&quot;2&quot;)) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xlog (&quot;the GW type is 2&quot;);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;setflag(10);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;route(4);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit;<BR>
}<BR>
<BR>
For example, the above code only works if the gateway is defined as &#8220;10.1.1.5&#8221; not &#8220;test.something.com&#8221;. The gw type field is always set to &#8220;2&#8221;.<BR>
<BR>
<BR>
</SPAN></FONT><SPAN STYLE='font-size:11pt'><FONT FACE="Optima, Times New Roman">Sven Schulz<BR>
Penn State University<BR>
Telecommunications and Network Services<BR>
814.865.6116<BR>
sip:<a href="sven@psu.edu">sven@psu.edu</a><BR>
</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><BR>
</FONT></SPAN>
</BODY>
</HTML>