Guys, I am working with this proxy for a month or so and I think there's a better solution to this. There are 2 reasons for this. The first and the most important is that loopback is not only 127.0.0.1 but whole network 127/8 (e.g. Debian and Ubuntu systems put FQDN to 127.0.1.1). The second is that you say this: > The loopback check was > there because most usages (apart from proxy.h, apparently) don't need it. So my solution is to put a check in proxy.h:is_uri_local if the address is from 127/8 which solves all the problems with all loopback's IPs. Unfortunately I was doing more changes there so I don't have exact code for you, but it would be something like this change in: if ((uri->port == global.name[i].port || (uri->port==0 && global.name[i].port==5060)) && pj_stricmp(&uri->host, &global.name[i].host)==0) { /* Match */ return PJ_TRUE; } to: if ((uri->port == global.name[i].port || (uri->port==0 && global.name[i].port==5060)) && (pj_stricmp(&uri->host, &global.name[i].host)==0 || (pj_ntohl(in_addr.s_addr) >> 24) == 127)) { /* Match */ return PJ_TRUE; } where in_addr.s_addr will be from pj_inet_aton(&uri->host, &in_addr); Best, Ondrej