[Asterisk-Dev] ast_find_ourip and sip?
Brian West
brian.west at mac.com
Wed Apr 27 11:45:48 MST 2005
> It needs the IP so that it can do matching based on what it sees in
> the SIP headers, and so that it can add proper Via headers and such
> on the way out.
>
> No, I don't think the IP of A.ROOT-SERVERS.NET should be embedded
> in that function either. Someone please find out when it was put
> there and why, so we can get it taken care of...
>
But finding the IP by hostname will fail a lot of the time. Their
are better way to find the ip. And in most cases I just add the
hostname to the 127.0.0.1 line in /etc/hosts which works fine. (not
sure if it breaks anything) but you can find the ip in a more proper
way.
This is an example I came up with... it doesn't work so well on BSD
but they have nice a nice getifaddrs they can use to do the same thing.
http://daffy.bkw.org/get_myaddr.c
/b
More information about the asterisk-dev
mailing list