Patent ID: 7385975

Claim:
A routing method, implemented in a session initiation protocol (SIP) server, comprising the steps of: receiving a signal from a second terminal, wherein the signal comprises a second media stream initiating request when the second terminal comprises a caller, and the signal comprises a fourth media stream initiating response when the second terminal comprises a callee; replacing a source address and port number in the signal with a first address and a first port number corresponding to the SIP server; transmitting the replaced signal to a first terminal; acquiring a public source address and a public source port number of a packet from the first terminal before transmitting a test signal, wherein the test signal comprises a third media stream initiating request with a second source address and a second source port number of the SIP server, which are different from the first address and the first port number of the SIP server; transmitting the test signal to test the first terminal; acquiring a public source address and a public source port number of another packet from the first terminal according to test results; and determining that the first terminal will correspond to different public addresses and public port numbers if the acquired public addresses and public port numbers differ before and after testing determining whether a first terminal will correspond to different public addresses and public port numbers for receiving media stream packets from a second terminal opposite to the first terminal after receiving different requests, wherein the first and second terminals comprise a caller and a callee which are capable of communicating in SIP protocol, and the public addresses and the public port numbers are recorded as source information in media stream packets initiated by the requests; and relaying media stream packets from the first terminal based on the determination.