A method for operating a device comprising the following steps of, performed by a processing unit of the device : receiving a) a phone call from a calling party; determining b) an action to be performed by the device among a predetermined list of actions related to the handling of a phone call, as a function at least of identity information about the calling party; performing c) said determined action for handling said phone call; at least one of said actions, in the predetermined list of actions, has been predetermined a0) on the basis at least of an action performed by the user in relation with a previous phone call from said calling party, wherein said predetermined list of actions related to the handling of a phone call comprises at least one of the following actions: - answering the phone call; - rejecting the phone call; - ringing the device , wherein the action of ringing the device comprises informing a user of the device through a user interface of the phone call and prompting the user to decide whether to answer or to reject the phone call, wherein by default the predetermined action is ringing the device , said predetermined action being learnt as a function of how the user handle the phone call when the device is ringing, wherein the predetermined action is further determined as a function of contextual data comprising acceleration data provided by an acceleration sensor of the device , wherein the action to be determined during step a0) is learnt to be rejecting the phone call when the user has not answered the previous phone call while the acceleration data provided during the previous phone call are representative of the user having taken the device . receiving a) a phone call from a calling party; determining b) an action to be performed by the device among a predetermined list of actions related to the handling of a phone call, as a function at least of identity information about the calling party; performing c) said determined action for handling said phone call; at least one of said actions, in the predetermined list of actions, has been predetermined a0) on the basis at least of an action performed by the user in relation with a previous phone call from said calling party, wherein said predetermined list of actions related to the handling of a phone call comprises at least one of the following actions: - answering the phone call; - rejecting the phone call; - ringing the device , - answering the phone call; - rejecting the phone call; - ringing the device , wherein the action of ringing the device comprises informing a user of the device through a user interface of the phone call and prompting the user to decide whether to answer or to reject the phone call, wherein by default the predetermined action is ringing the device , said predetermined action being learnt as a function of how the user handle the phone call when the device is ringing, wherein the predetermined action is further determined as a function of contextual data comprising acceleration data provided by an acceleration sensor of the device , wherein the action to be determined during step a0) is learnt to be rejecting the phone call when the user has not answered the previous phone call while the acceleration data provided during the previous phone call are representative of the user having taken the device . <EOS>