Net2Phone uses three ports (two UDP ports and one TCP port) to establish a line of communication between the PC and the Net2Phone Switch.
One UDP port is used to establish the initial connection to the server; the second UDP port is used to pass voice packets. The TCP port is used for control to make sure the connection between the PC and the Net2Phone server remains open.
Net2Phone establishes the first connection using port UDP port 6801. This port must remain open for the duration of the call. The other UDP port does normally not need to be specified. Net2Phone uses anything in the range 1 - 30000. However, when Net2Phone is running on a machine behind NAT32, the actual port number used must be known.
Fortunately, the Net2Phone client software can be configured so that specific port numbers are used. You do this as follows:
1.1 Run the Net2Phone software.In the NAT32 Console, run the n2p Tcl script as follows:
1.2 Click Menu/Preferences/Network
1.3 Select Client and enter a UDP port such as 3000.
1.4 Click OK to save the changes.
n2p 172.16.2.20 3000
The above command will assign Net2Phone access to the specified private
machine using the specified UDP port number.
To reverse the mappings, enter the command:
n2p off 3000
To assign Net2Phone access to a particular machine automatically, simply add the needed command to file startup.
The n2p Tcl Script is as follows:
#!tcl
#
# Net2Phone mappings
#
if {$argc != 2} {
error {Usage: n2p IPaddress|off Port}
}
set addr [lindex $argv 0]
set port [lindex $argv 1]
if {$addr == "off"} {
exec "umap delete $port"
exec "ppmap delete udp $port"
} else {
exec "umap add 6801 1"
exec "ppmap add udp $port $addr $port"
}
The TCL help Page documents the special features of the NAT32 implementation of TCL.
ppmap tcl umap