Patent ID: 7706373

Claim:
A method of resolving NAT and firewall related issues for initiation of a session, the method including: preliminarily determining NAT/firewall topology, before a user request for initiation of a session between an initiating peer device and a responding peer device, by sending two or more messages from the initiating peer device by an unreliable transport protocol through one or more NAT and firewall devices to two or more external IP/port addresses, listening for responses, and determining from the responses or lack of responses whether the firewall will allow initiation of unreliable transport protocol sessions and determining whether the NAT assigns IP/port addresses to the messages that are predictable by the initiating peer device; upon receiving the user request for initiation and before transmitting session initiation messages to initiate the session, sending one or more probe messages through the one or more NAT and firewall devices to an external server, listening for responses and identifying from the responses one or more external IP/port addresses assigned by the NAT to the one or more probe messages; proceeding with an exchange of session initiation messages, wherein a first session initiation message from the initiating peer device includes, in addition to standard session initiation information, at least an internal, inside the NAT, IP/port address and the external IP/port addresses for the initiating peer device; using at least results of the preliminary determining NAT/firewall topology, selecting potentially successful hole punching strategies and commencing, if selected, cooperative and private hole punching to establish an unreliable transport session between the initiating and responding peer devices without forwarding through an external media forwarding device, wherein cooperative hole punching means one peer device causing the NAT to open a port and listening for packets from an other peer device addressed to the opened port and private hole punching means exchanging packets using the internal IP/port addresses of the initiating and responding peer devices without address modification by the NAT; and in case hole punching fails, using a media packet relay path through a media forwarding device.