A call flow server is disclosed that processes call flow events from a
plurality of gateways bridging between traditional circuit-switched
networks and packet-switched networks. The call flow server server, which
may be implemented with either a single processor or multi-processor
design, includes call flow engine and call flow thread manager modules
capable of managing a plurality of call flow events by distributing the
call flow scripts associated with such events among a plurality of
threads executing on the call flow server. Each call flow event in the
form of a call flow script is processed on a single thread within a
selected processor. Processing each call flow script on a single thread
fully utilizes the processor resources and ensures that a call flow
script need not be blocked while another call flow script is running. The
call flow server includes a thread manager to direct a given call flow
script to a thread that has excess capacity.