1. A method of maintaining a connection between a mobile terminal and a network element in a network, the method, comprising: altering a time interval between keep alive messages exchanged between the mobile terminal and the network element; monitoring the Internet Protocol connection to determine if disconnection of the connection occurs as a result of the altering of the time interval between the keep alive messages; determining a value for the time interval, the value being determined such that the connection with the network element is not disconnected and further determined based on an associated cost to send the keep-alive messages; wherein, the cost to send the keep-alive messages includes battery life of the mobile terminal; wherein, the time intervals are further determined statistically based on the disconnection of the connection.