> 2.12.2 | Reading phonebook entries

> This section comprises the subsections Description, Used AT Commands, Flow Chart, Hints and Example. To move to these subsections please use the Navigation Frame or the appropriate buttons on the toolbar.

> 2.12.2.1 | Description

> This chapter describes all the steps used to read one or more entries from your phonebooks. You can read entries sorted by index or sorted by name in alphabetical order. Sorting by name is only supported for the phonebook types “SM”, “ME”, “FD” (fixdialing phonebook) and “ON” (own number phonebook).
> Other phonebooks are “LD” (last dialed numbers), “MC” (list of your missed calls) and “RC” (list of received calls). These phonebooks only support reading by sorted index.

> 2.12.2.2 | Used AT commands

> Command | Explanation
> AT+CPBS | Select phonebook memory storage
> AT^SPBG | Read entry from active telephone book via sorted index
> AT+CPBR | Read current phonebook entries

> For further details about the commands see [2].

> 2.12.2.3 | Flow Chart

> Figure 88: Reading phonebook entries – part 1
> Figure 89: Reading phonebook entries – part 2

> 2.12.2.4 | Hints

> • | For some products an extra parameter for AT^SPBG is available to get the physical index of an entry. For detail please see [2].

> 2.12.2.5 | Example

> ***************************************
> Comment: Reading phonebook entries
> ***************************************
> ***************************************
> Comment: Request selected phonebook and number of entries.
> ***************************************
> Subscr 1 Send: AT+CPBS?
> Subscr 1 Receive: AT+CPBS?
> Subscr 1 Receive: +CPBS: "SM",9,20
> Subscr 1 Receive:
> Subscr 1 Receive: OK
> ***************************************
> Comment: List phonebook entries sorted by name.
> ***************************************
> Subscr 1 Send: AT^SPBG=1,8
> Subscr 1 Receive: AT^SPBG=1,8
> Subscr 1 Receive: ^SPBG: 1,"+445415454646",145,"Abigail Cox"
> Subscr 1 Receive: ^SPBG: 2,"+449585315798",145,"Alexis Wright"
> Subscr 1 Receive: ^SPBG: 3,"+445565656899",145,"Hannah Adams"
> Subscr 1 Receive: ^SPBG: 4,"+44556565657",145,"Joe Anderson"
> Subscr 1 Receive: ^SPBG: 5,"+491765864491",145,"John Smith"
> Subscr 1 Receive: ^SPBG: 6,"+446565689115",145,"Kyla Clark"
> Subscr 1 Receive: ^SPBG: 7,"+445636934485",145,"Oscar Thomson"
> Subscr 1 Receive: ^SPBG: 8,"+44545896638",145,"Paul Williams"
> Subscr 1 Receive:
> Subscr 1 Receive: OK
> ***************************************
> Comment: List phonebook entries sorted by name (endindex > number of used entries).
> ***************************************
> Subscr 1 Send: AT^SPBG=1,20
> Subscr 1 Receive: AT^SPBG=1,20
> Subscr 1 Receive: ^SPBG: 1,"+445415454646",145,"Abigail Cox"
> Subscr 1 Receive: ^SPBG: 2,"+449585315798",145,"Alexis Wright"
> Subscr 1 Receive: ^SPBG: 3,"+445565656899",145,"Hannah Adams"
> Subscr 1 Receive: ^SPBG: 4,"+44556565657",145,"Joe Anderson"
> Subscr 1 Receive: ^SPBG: 5,"+491765864491",145,"John Smith"
> Subscr 1 Receive: ^SPBG: 6,"+446565689115",145,"Kyla Clark"
> Subscr 1 Receive: ^SPBG: 7,"+445636934485",145,"Oscar Thomson"
> Subscr 1 Receive: ^SPBG: 8,"+44545896638",145,"Paul Williams"
> Subscr 1 Receive: ^SPBG: 9,"+447982865563",145,"Samantha Young"
> Subscr 1 Receive: +CME ERROR: invalid index
> ***************************************
> Comment: List phonebook entries sorted by index.
> ***************************************
> Subscr 1 Send: AT+CPBR=1,20
> Subscr 1 Receive: AT+CPBR=1,20
> Subscr 1 Receive: +CPBR: 1,"+491765864491",145,"John Smith"
> Subscr 1 Receive: +CPBR: 2,"+44545896638",145,"Paul Williams"
> Subscr 1 Receive: +CPBR: 3,"+44556565657",145,"Joe Anderson"
> Subscr 1 Receive: +CPBR: 4,"+445636934485",145,"Oscar Thomson"
> Subscr 1 Receive: +CPBR: 5,"+445565656899",145,"Hannah Adams"
> Subscr 1 Receive: +CPBR: 6,"+447982865563",145,"Samantha Young"
> Subscr 1 Receive: +CPBR: 7,"+449585315798",145,"Alexis Wright"
> Subscr 1 Receive: +CPBR: 8,"+445415454646",145,"Abigail Cox"
> Subscr 1 Receive: +CPBR: 12,"+446565689115",145,"Kyla Clark"
> Subscr 1 Receive:
> Subscr 1 Receive: OK
> ***************************************
> Comment: List phonebook entries sorted by index (endindex > maximum number of locations).
> ***************************************
> Subscr 1 Send: AT+CPBR=1,260
> Subscr 1 Receive: AT+CPBR=1,260
> Subscr 1 Receive: +CPBR: 1,"+491765864491",145,"John Smith"
> Subscr 1 Receive: +CPBR: 2,"+44545896638",145,"Paul Williams"
> Subscr 1 Receive: +CPBR: 3,"+44556565657",145,"Joe Anderson"
> Subscr 1 Receive: +CPBR: 4,"+445636934485",145,"Oscar Thomson"
> Subscr 1 Receive: +CPBR: 5,"+445565656899",145,"Hannah Adams"
> Subscr 1 Receive: +CPBR: 6,"+447982865563",145,"Samantha Young"
> Subscr 1 Receive: +CPBR: 7,"+449585315798",145,"Alexis Wright"
> Subscr 1 Receive: +CPBR: 8,"+445415454646",145,"Abigail Cox"
> Subscr 1 Receive: +CPBR: 12,"+446565689115",145,"Kyla Clark"
> Subscr 1 Receive: +CME ERROR: invalid index