A method for communicating messages from a media gateway is disclosed. A
thread pair comprising a communication protocol control stack thread and
one or more media gateway adapter threads is assigned to a message from a
media gateway. The thread pair is associated with a processor. The
message is received from the media gateway at the communication protocol
control stack thread, and is routed to a media gateway adapter thread
corresponding to a communication protocol. The message is processed
according to the communication protocol, and is sent to a call agent.