Added support for IP CallingStationID, some logic optimisation