Patent ID: 7830821

Claim:
A method of connecting and sharing resources of network terminal devices of two private networks via user agents, and the method being applied in a network system, and the network system comprising at least two private networks and an Internet, wherein each private network includes at least two network terminal devices, and at least one network terminal device installs a user agent, and each user agent is connected with the other network terminal device on a respective private network, and each network terminal device is connected to the Internet through a network connecting device, and the method comprising: a first user agent of a first network terminal device on a first private network packaging a discovery protocol request into a first session initiation protocol packet and transmitting the first session initiation protocol packet to a second user agent of a third network terminal device on a second private network via the Internet, after the first user agent of the first network terminal device receives the discovery protocol request transmitted from a second network terminal device on the first private network; the second user agent of the third network terminal device reading the discovery protocol request in the first session initiation protocol packet and transmitting the discovery protocol request to a fourth network terminal device on the second private network, after the second user agent of the third network terminal device receives the first session initiation protocol packet; the second user agent of the third network terminal device packaging a first response of accepting the discovery protocol request transmitted from the fourth network terminal device into a second session initiation protocol packet and transmitting the second session initiation protocol packet to the first user agent of the first network terminal device via the Internet, after the second user agent of the third network terminal device receives the first response of accepting the discovery protocol request returned by the fourth network terminal device; and the first user agent of the first network terminal device reading the first response in the second session initiation protocol packet and transmitting the first response to the second network terminal device, after the first user agent of the first network terminal device receives the second session initiation protocol packet, such that the second network terminal device and the fourth network terminal device can use the first user agent and the second user agent to discover and identify with each other via the Internet, and establish a connection channel for an online connection.