# Placing and receiving calls

The following illustration shows the object interaction while placing and receiving calls:

At the initial stage of the call, the Call object associates itself with the BChannel object. The B channel number comes when the startCall function is called. When a call leaves the connected state, the stopCall function is called. Then the ISDN call ceases to exist. The Call object invokes the free function to free the BChannel object. Once free, that BChannel object may be used by another call.

When a BChannel object is in outbound mode, it initiates a new call by getting a free Call object (getFreeCall) and invoking makeCall. When the call reaches the connected state, a Timer object is started. After the timer expires, BChannel invokes hangUp to terminate the call.

In a call collision situation, there are two Call objects (one inbound, one outbound) that have invoked get without invoking free. In this situation, the freeResources function is invoked for the first Call object to disassociate it with the BChannel object.

The following illustration shows call collision processing: