Perspective  PhoneNumberPlan

Chapter 3: Property Descriptions and Usage

PhoneNumber

Applies to

CallLogEntry, DialingDirectoryEntry, and PhoneCall objects

Description

A string containing a valid phone number.

A phone number consists of an optional country or region code followed by a sequence of numbers that makes up the phone number. International numbers must be preceded by a plus (+) sign. The PhoneNumber string can contain parentheses, periods, dashes, and spaces, all of which are ignored.

Usage


In a painter

StepsTo set the PhoneNumber property of a PhoneCall object:

  1. Enter the phone number in the PhoneNumber text box on the General page of the Properties view for the PhoneCall object.

    The PhoneNumber property of CallLogEntry and DialingDirectoryEntry objects cannot be set in a painter.


In scripts

The PhoneNumber property is a string that contains a valid phone number.

For CallLogEntry and PhoneCall objects, the PhoneNumber property contains the number of the other party in an ingoing or outgoing call. If the caller ID of an incoming call is blocked, the PhoneNumber property is empty.

For DialingDirectoryEntry structures, the phone number is the number to be dialed.

The following statements create an instance of a call log and add all the phone numbers in the log to a list box:

// instance variable: CallLogEntry iLogEntries[]

CallLog callLog1

callLog1 = CREATE CallLog
callLog1.getEntries(iLoggedEntries)

int count
for count = 1 to UpperBound(iLoggedEntries)
   lb_1.AddItem(iLoggedEntries[count].PhoneNumber)
end for

The following statement displays a phone number in a single line edit box, where newEntry is a DialingDirectoryEntry structure:

sle_call.text = newEntry.PhoneNumber

The following statement sets the PhoneNumber property of a PhoneCall object to the string entered in a single line edit box::

pcall_1.PhoneNumber = sle_newcall.text





Copyright © 2004. Sybase Inc. All rights reserved. PhoneNumberPlan

View this book as PDF