Hi,<br><br>It is very strange that following chan_woomera code part gives IP address <a href="http://44.215.5.41">44.215.5.41</a>.<br><br>static int connect_woomera(int *new_socket, woomera_profile *profile, int flags)<br>
{<br> struct sockaddr_in localAddr, remoteAddr;<br> struct hostent *hp;<br> struct ast_hostent ahp;<br> int res = 0;<br><br> *new_socket=-1;<br><br> printf("WOOMERA HOST: %s\n",profile->woomera_host); // THIS PRINTS CORRECT IP ADDRESS<br>
if ((hp = ast_gethostbyname(profile->woomera_host, &ahp))) {<br> remoteAddr.sin_family = hp->h_addrtype; memcpy((char *) &remoteAddr.sin_addr.s_addr, hp->h_addr_list[0], hp->h_length);<br>
<br> printf("************************ WOOMERA HOST: %s\n", inet_ntoa(remoteAddr.sin_addr)); // THIS PRINTS <a href="http://44.215.5.41">44.215.5.41</a><br> remoteAddr.sin_port = htons(profile->woomera_port);<br>
<br>And chan_woomera tries to connect to <a href="http://44.215.5.41:42240">44.215.5.41:42240</a>, it is very strange, because<br>I have already defined host <a href="http://192.168.0.18">192.168.0.18</a> in woomera.conf.<br>
<br>I can hardcode it like:<br><br>// memcpy((char *) &remoteAddr.sin_addr.s_addr, hp->h_addr_list[0], hp->h_length);<br> inet_aton("<a href="http://192.168.0.18">192.168.0.18</a>", &remoteAddr.sin_addr);<br>
<br>But I would like to know the right solution.<br>Please let me know.<br><br>thanks,<br><br>Ganbold<br><br><br>