The application discloses a communication penetration method and
system based on a
session initiation protocol, and the method comprises the following steps: forcibly intercepting a data packet sent by a SIP terminal to a
SIP server, converting a source IP of the data packet into a
public network IP, converting a source port of the data packet into a target port, replacing a
private IP and a port carried in a header connection field in SIP signaling of the data packet with the
public network IP and the target port, and replacing a private media IP and a port in SDP information with a
public network IP and a target media port when the SIP signaling carries the SDP information. Therefore, it can be seen that a boundary device uniformly intercepts and processes SIP data packets, fixes a port conversion relationship during registration, synchronously modifies a
private address and a port in a signaling header into boundary device public network information, realizes consistency of
network layer and
application layer address conversion, and avoids SIP signaling address mismatch in a NAT environment.