Web ProForums
Signaling System 7 (SS7)
8. Database Query Example
People generally are familiar with the toll-free aspect of 800 (or 888) numbers, but these numbers have significant additional capabilities made possible by the SS7 network. 800 numbers are virtual telephone numbers. Although they are used to point to real telephone numbers, they are not assigned to the subscriber line itself.When a subscriber dials an 800 number, it is a signal to the switch to suspend the call and seek further instructions from a database. The database will provide either a real phone number to which the call should be directed, or it will identify another network (e.g., a long-distance carrier) to which the call should be routed for further processing. While the response from the database could be the same for every call (as, for example, if you have a personal 800 number), it can be made to vary based on the calling number, the time of day, the day of the week, or a number of other factors.
The following example shows how an 800 call is routed (see Figure 7).

Figure 7. Database Query Example
- A subscriber served by switch A wants to reserve a rental car at a company's nearest location. She dials the company's advertised 800 number.
- When the subscriber has finished dialing, switch A recognizes that this is an 800 call and that it requires assistance to handle it properly.
- Switch A formulates an 800 query message including the calling and called number and forwards it to either of its STPs (e.g., X) over its A link to that STP (AX).
- STP X determines that the received query is an 800 query and selects a database suitable to respond to the query (e.g., M).
- STP X forwards the query to SCP M over the appropriate A link (MX). SCP M receives the query, extracts the passed information, and (based on its stored records) selects either a real telephone number or a network (or both) to which the call should be routed.
- SCP M formulates a response message with the information necessary to properly process the call, addresses it to switch A, picks an STP and an A link to use (e.g., MW), and routes the response.
- STP W receives the response message, recognizes that it is addressed to switch A, and routes it to A over AW.
- Switch A receives the response and uses the information to determine where the call should be routed. It then picks a trunk to that destination, generates an IAM, and proceeds (as it did in the previous example) to set up the call.


