Patent ID: 7969875

Claim:
A method for packet filtering in a media gateway (MG) comprising: A. analyzing, by the MG, packets of a service instance that are permitted, according to current packet filtering rule, to pass through the MG; and obtaining the state change of the service instance; and adding, deleting or changing the packet filtering rule for the packets of the service instance according to the state change of the service instance; and filtering the packets according to the changed filtering rule; issuing, by a media gateway controller (MGC) a command to the MG, the command carrying information that indicates a dynamic packet filtering function is enabled or disabled; performing or terminating, by the MG, the step A. according to the information, wherein the command which the MGC issues to the MG further comprises service type information; and upon receiving the command, the MG performs the step A only for the service instance of a service type specified by the service type information carried in the command.