主权项 |
1. A method for telephony, comprising:
receiving at an Internet telephony service provider a subscriber request from an Internet Protocol, IP, telephony user terminal which is directly connected to the Internet telephony service provider via a packet switched data link to place a call to a telephone number; in response to the subscriber request, querying a cache associated with the Internet telephony service provider to check if the cache holds a record for the telephone number; if the cache holds a record for the telephone number, obtaining the record and:
if the record is a packet network address, placing the call to the packet network address associated with the endpoint user terminal telephone number, andif the record indicates that there is no packet network address associated with the telephone number, placing the call to the endpoint user terminal telephone number via a public switched telephone network (PSTN); if the cache does not hold a record for the telephone number, sending a request to a database server, which maintains a database of records associating endpoint user terminal telephone numbers of subscribers with respective packet network addresses of the endpoint user terminal, each packet network address being uniquely associated with a subscriber, to retrieve a packet network address of the endpoint user terminal to which calls to the telephone number should be placed; if the database server holds a record of a packet network address of the endpoint user terminal telephone number, the database server notifying the Internet telephony service provider of the packet network address of the endpoint user terminal; if the database server does not hold a record of a packet network address of the endpoint user terminal telephone number, the database server notifying the Internet telephony service provider with a negative response that no record of a packet network address associated with the endpoint user terminal telephone number was found; upon receiving the notification from the database server, storing the packet network address or the negative response, as appropriate, in the cache as a record for the telephone number; wherein if the cache does not hold a record for the telephone number, further comprising placing the call to the endpoint user terminal telephone number via the PSTN whilst the request is sent to the database server to retrieve the packet network address of the endpoint user terminal to which calls to the telephone number should be placed. |