Method for updating a database of a VoIP network by means of a gateway of a local area network allowing access to the VoIP network, the method comprising: - a step of receiving a call initiation message initiating a VoIP call over the VoIP network from a terminal connected to the local area network; - a step of determining a hardware identifier (@MAC2) of the terminal from an IP address (@IP2) used by the terminal on the local area network and contained in the call initiation message, said hardware identifier uniquely identifying the terminal; - if the hardware identifier (@MAC2) is coupled in the database of the VoIP network with a telephone identity (IDPub3) allocated by the VoIP network, a step of transferring the call initiation message to the VoIP network with a view to setting up the call over the VoIP network with a recipient of the call initiation message; - otherwise: ∘ a step of setting up a VoIP channel between the terminal and a voice server hosted by the access gateway; ∘ a step of obtaining, by means of the voice server, via the channel set up, an authentication code (AUTH3) of a user of the terminal; ∘ if it is verified (E80, E90) that the obtained authentication code of the user is associated, in the VoIP network, with a telephone identity allocated by the VoIP network, a step of updating the database by coupling, in the database, the hardware identifier (@MAC2) of the terminal with the telephone identity (IDPub3). - a step of receiving a call initiation message initiating a VoIP call over the VoIP network from a terminal connected to the local area network; - a step of determining a hardware identifier (@MAC2) of the terminal from an IP address (@IP2) used by the terminal on the local area network and contained in the call initiation message, said hardware identifier uniquely identifying the terminal; - if the hardware identifier (@MAC2) is coupled in the database of the VoIP network with a telephone identity (IDPub3) allocated by the VoIP network, a step of transferring the call initiation message to the VoIP network with a view to setting up the call over the VoIP network with a recipient of the call initiation message; - otherwise: ∘ a step of setting up a VoIP channel between the terminal and a voice server hosted by the access gateway; ∘ a step of obtaining, by means of the voice server, via the channel set up, an authentication code (AUTH3) of a user of the terminal; ∘ if it is verified (E80, E90) that the obtained authentication code of the user is associated, in the VoIP network, with a telephone identity allocated by the VoIP network, a step of updating the database by coupling, in the database, the hardware identifier (@MAC2) of the terminal with the telephone identity (IDPub3). ∘ a step of setting up a VoIP channel between the terminal and a voice server hosted by the access gateway; ∘ a step of obtaining, by means of the voice server, via the channel set up, an authentication code (AUTH3) of a user of the terminal; ∘ if it is verified (E80, E90) that the obtained authentication code of the user is associated, in the VoIP network, with a telephone identity allocated by the VoIP network, a step of updating the database by coupling, in the database, the hardware identifier (@MAC2) of the terminal with the telephone identity (IDPub3).