 Agent and Sends/Receives terminates and reoriginates the SIP Sends/Receives fully INVITE that have messaging formed INVITE to been routed Peer devices through edge SBC Call Agents Feature Customer Billing Server Database Server Figure 5-2 Features and Interconnects of a SP Call Agent SP Network-Billing Server All SPs are in business to service customers. Most SPs are in business to collect remuner- ation for these services, and a few SPs are in business to make a profit. These things require that accurate records of what has occurred be kept. This is no different when pro- viding SIP trunks. A SP network that is set up to offer SIP trunks must have a billing serv- er that can accurately determine when calls have been made and in a post processing or real-time method, determine the charge that will be assessed for these calls to the end customer. Generally, the billing mechanisms that are required for TDM-based PSTN services must be replicated if SPs are offering SIP trunks for PSTN access. This includes the require- ment to accurately maintain records of all transactions that have occurred on the SIP trunk for legal intercept reasons. If the SP is offering enhanced services, beyond those of just PSTN offnet, the billing service needs to interact with the service that is controlling these functions to maintain an accurate record and eventually generate an accurate bill for these transactions. Generally billing servers fall into two major groups: Real-time billing servers: Those that can affect the call signaling path of every call. Post-paid billing servers: These generally gather billing information at the end of the call and update customer records in large batches after the call is completed. Because they are involved in the call setup for every call, real-time billing servers have a much greater impact on caller experience. If they are slow or inaccurate, real-time billing 62 SIP Trunking servers can result in long call setup times or the disallowance of calls in real time that should be allowed. This can hav