this might newbie question. developing sip endpoint environment not have ice/turn/stun. sip endpoint behind nating firewall known public address. endpoint can dialed directly (no proxies) endpoint can located either inside or outside firewall. how can endpoint detect whether incoming invite endpoint inside or outside firewall? needed put either private or public ip in contact header , in media description in sdp in 200 response invite? again, not how detect public ip, rather how distinguish ip address send caller. thanks!
there no generic way , depends on firewall , if use same interface public , private. best way hands-down use different interface public , private (and different sip providers) public , private.
if remote parties give correct via can use via header. if firewall allows, , have set of ips know private sure, can physical source ip of incoming messages in nist implementation, cast inbound messages gov.nist.javax.sip.message.sipmessage
, use getremoteaddress()
check address app logic. think trying do. don't recommend it, because app might find in custom networks, algs or behind other nodes stamp hints (such x-auth-ip
). app far more portable if separate interfaces.
Comments
Post a Comment