There are some other uses for the UA besides making and receiving user calls. For example, we use the UA as a load generator for performance testing.
When providing load generation for performance testing, the UA automatically dials calls and some extra operators, such as OpAutoCall and OpAutoAnswer, are added, automatically moving the state machine from Call to Dialing. As the test calls are completed and the UA returns to the Idle state, it waits a few seconds and then automatically generates another call.
In many of these setups, there are several UAs set up in a lab with ingress and egress Marshal servers and a Redirect server. The load-generating UAs are calling other test UAs in the lab. They are not usually calling across to another network or over the PSTN, unless those routes are specifically intended for testing. When lab testing is in progress, there are also a load-generation thread and a monitor that track statistics about how much of the load is being generated.
As you read in the SIP chapters, the UA needs to register with the Registration server in a SIP network before it can start sending and receiving phone calls. To register, it sends a REGISTER message, which is handled by the Registration class and the RegistrationManager class. The registration is good for a limited time only: the UA has to resend its registration to the Registration server repeatedly. The RegistrationManager class keeps track of ...