referring to the drawing , wherein like numbers denote like parts throughout the several views , fig1 is a high - level block diagram illustrating the major components of a telephone answering message system which may be used to support flexible message presentation , according to the preferred embodiment of the present invention . message system 100 includes programmable processor 101 , telephone line interface 102 , non - volatile semiconductor read - only memory ( rom ) 103 , read / write semiconductor random access memory ( ram ) 104 , and i / o device interface 105 . processor 101 executes control program 110 stored in rom 103 to control the operation of message system 100 . telephone interface 102 includes a jack for receiving an incoming telephone line 120 , a jack for an outgoing telephone line connected to a telephone 121 , and control electronics for taking control of the telephone line in response to an incoming signal . telephone interface further includes hardware for converting a telephone signal to appropriate digital form for storage and playback on telephone system 100 . ram 104 is used for storing volatile data ; it includes a greeting file 111 containing one or more pre - recorded voice greetings to be played over the telephone line to a caller when the user does not intercept the telephone call ; message in file 112 containing voice messages left for the user by callers ; and sorting profile 113 containing data used to sort messages for playback , as further described herein . i / o device interface 105 provides an interface to various i / o devices within message system 100 . such i / o devices preferably include a display 106 , such as a light emitting diode ( led ) or liquid crystal diode ( lcd ) display , for displaying system status ; a plurality of buttons and switches 107 for user input and selection ; and a speaker 108 for audibly playing stored messages to the user . while message system 100 is shown in fig1 with a separate external telephone 121 attached via an outgoing telephone port in telephone interface 102 , it will be understood that message system 100 could contain an integral telephone handset . [ 0020 ] fig2 shows the structure of sorting profile 113 , which is used to control sorting of message for presentation , according to the preferred embodiment . sorting profile contains a header 201 and a variable number of caller entries 202 . the header includes a mode field 203 which identifies a sorting mode for playback of messages recorded in the message system , and may contain additional fields such as profile length specifying the length of profile 113 , etc . each caller entry 202 contains a caller id field 204 and a priority field 205 . in the preferred embodiment , five operational modes are defined for playback of stored messages . the current mode is determined by the value in the mode field 203 of sorting profile 113 . the mode values and their meanings are as follows : grouped : messages are grouped according to the caller &# 39 ; s identifier , with the group having the oldest message being played first . grouped prioritized : messages are grouped according to the caller &# 39 ; s identifier , with the group having the highest user - assigned priority being played first . grouped auto prioritized : similar to grouped prioritized , but the system automatically determines priority , without the need for user assignment . prioritized : messages are played back in the order of user - assigned priority , without grouping by caller id . priority field 205 is preferably an integer , which may be assigned by the user or may be determined by the system . when operating in grouped auto prioritized mode , the system determines a priority for messages of each caller , as follows . priority field is effectively a counter , which is incremented and decremented . the priority is incremented each time a call from the corresponding caller is sensed on telephone line 120 . the priority is further incremented each time an outgoing telephone call is made from the user &# 39 ; s line to the telephone number of the corresponding caller . although the amount of increments may be the same in the two cases , preferably an outgoing call results in a larger increment . an incoming call indicates that the caller desires to talk to the user , but the reverse is not definitely indicated , whereas an outgoing call indicates definite interest on the part of the user , and is therefore a surer indication of higher priority . in order to age the priority numbers , the system periodically reduces all priorities by a pre - determined amount . while different formulae can be used , in an example embodiment the system increments priority by 1 for each incoming call , increments priority by 5 for each outgoing call , and divides all priorities in half every month to age the priority information . if the division results in a priority of less than 1 , the corresponding caller entry 202 is deleted from profile 113 , so that caller entries do not accumulate indefinitely . messages from unidentified callers ( i . e ., those who have blocked the caller id function on their telephones , so that a called party can not identify the source of the call ) are assigned a priority of 0 . it will be understood that there are many possible variations in the way in which a system may automatically assign priority to messages . specifically , the system may take into account other or additional factors than the frequency of calling or receiving calls from a particular number . e . g ., the system may take into account the lengths of messages . in the preferred embodiment , caller id field 205 in each caller entry 202 contains the telephone number of the caller . this number is obtained from a caller id signal received over telephone line 120 . however , caller id field 205 could alternatively contain any data which would be used to identify a source of a message . for example , it would alternatively be possible to identify the caller using voice recognition techniques . in this case , a caller id field could contain a voice sample , or some data abstracted from a voice sample from which it would be possible to identify the caller . caller identification using voice recognition has the advantage of identifying a caller personally , regardless of where the call originated . it will be appreciated that , since the present invention involves sorting of messages for presentation , an acceptable message system could tolerate some inaccuracy in caller identification using voice recognition techniques . in the preferred embodiment , one of the caller entries 202 in sorting profile 113 is used for unidentified callers , i . e ., callers who have blocked the caller id function . by default , the priority of this entry is 0 , but it may be assigned a different priority by the user . [ 0030 ] fig3 a and 3b are a flowchart showing the operation at a high level of control program 110 of messaging system 100 , according to the preferred embodiment . the system is initially in an idle state 301 . in the idle state , the control program waits for an indication of an incoming call , an outgoing call , a function selection by the user , or a timeout of a priority aging timer . this idle loop is represented as steps 302 - 305 , and when any of the above events occurs , the control program leaves the idle loop to perform some action . as shown in fig3 a , if an incoming call is detected on telephone line 120 ( the “ y ” branch from step 302 ), the control program checks the mode setting in mode field 203 . if mode is set to anything other than “ grouped auto prioritize ”, the “ n ” branch is taken from step 310 . if the mode is set to “ grouped auto prioritize ”, the system is responsible for automatically assigning priorities to caller messages , and the “ y ” branch is taken from step 310 . the control program then determines whether it is possible to identify the caller using the caller id function ( step 311 ). if so , the program checks sorting profile 113 for the existence of a corresponding caller entry ( step 312 ). if the caller entry exists , the priority of the entry is incremented ( step 313 ); if the caller entry does not exist , a new caller entry is created and initialized with the caller id and an initial priority value ( step 314 ). in any of the above cases , the messaging system then waits for the user to take the call . if the user takes the call within some pre - determined time period ( the “ y ” branch from step 315 ), the program returns to idle . if the user does not take the call , the system plays a pre - recorded greeting from greeting file 111 ( step 316 ), and then records a message from the caller in message file 112 ( step 317 ). the program then returns to idle . if an outgoing call is detected ( the “ y ” branch from step 303 ), the control program checks the mode setting in mode field 203 ( step 320 ). if the mode is anything other than “ grouped auto prioritize ”, the “ n ” branch is taken from step 320 , and the program returns to idle . if the mode is set to “ grouped auto prioritize , the program checks sorting file 113 for the existence of a caller entry corresponding to the destination telephone number of the outgoing call ( step 321 ). if such an entry exists , the priority value is incremented ( step 322 ); if not , a new entry is created for the number of the outgoing call , and its priority set to an initial value ( step 323 ). in either case , the program then returns to idle . if a timeout of the priority aging timer is detected ( the “ y ” branch from step 304 ), then the program checks the mode . if the mode is “ grouped auto prioritize ”, then the system is maintaining priority values , and it is time to age them . in this case , the “ y ” branch is taken from step 325 , and the priority values are aged , which may also require than some caller entries be deleted if the associated priority values drop below some predetermined threshold ( step 326 ). as explained above , in the preferred embodiment they may be aged by dividing each value by 2 , although other forms of aging are possible . the program then returns to idle . if the user has selected some function ( e . g ., through a combination of one or more buttons and switches 107 ), the “ y ” branch from step 305 is taken . the handling of four specific functions is illustrated in fig3 b , it being understood that the system may support many others . if the function is to play all messages , the “ y ” branch from step 330 is taken . in this case , the control program prioritizes the order of messages for presentation to the user and plays the messages over speaker 108 in the determined order . this operation is represented at a high level as step 331 in fig3 b , and is shown in greater detail in fig4 a and 4b . after playing all messages , the control program returns to idle . the user may elect to play only a single group of messages , i . e ., messages originating from a single telephone number . if this option is selected by the user , the “ y ” branch from step 332 is taken . the user then selects a group of messages to be played ( step 333 ). since a group is defined by a telephone number , the user may select a group by entering the telephone number of interest , using some combination of buttons and switches 107 . alternatively , the system can scroll through all groups for which there is at least one message , displaying the telephone number of each in display 106 . once the user has selected a group , the system plays all messages in the group in chronological order ( step 334 ), and then returns to idle . the user may elect to change the ordering mode for playing messages , as illustrated by the “ y ” branch from step 335 . in this case , the user selects one of the modes above described . selection may be accomplished by any of various means , e . g ., the system cycles the various options and displays each on display 106 , allowing the user to select one using an appropriate button . once a mode has been selected , the new value is stored in mode field 203 of profile 113 ( step 337 ). the control program then returns to idle . the user may elect to change some caller entry in profile 113 , which is illustrated as the “ y ” branch from step 338 . in this case , the user first selects a group or telephone number ( step 340 ) using any appropriate means , such as the means described above with respect to step 333 . the user then inputs an integer priority value ( step 341 ). the control program saves the priority value in the corresponding caller entry of profile 112 ( step 342 ). if no such caller entry exists , the program creates one . the program then returns to idle . the exact form of input and user selection will vary depending on available hardware and other design considerations , but it is well known that there are many possible ways to input simple numeric values and make selections from a relatively small number of choices . where the message system is equipped with a numeric keypad ( which would , of course , be the case if it contains an integral telephone handset ), the simplest form of numeric input is to use the keypad . in other cases , an arrow button and a select button can be used to scroll through a sequence of choices or digits . while this mode of data entry is relatively slow , it is expected that a user will only rarely change the profile or the mode . [ 0039 ] fig4 a and 4b are a flowchart showing in greater the steps performed by the control program during the playback function , i . e ., the playing of messages to the user , which is represented in fig3 b as the single block 331 . in the description below , it is assumed that stored messages have a header containing a pointer to the next sequential ( chronological ) message , a marker flag indicating whether the message has been played , a caller id , and other data . referring first to fig4 a , upon entering the playback function all stored messages are marked as unplayed ( step 401 ). the mode field 203 is then examined . if the mode is sequential (“ y ” branch from step 402 ), the control program looks for another unplayed message ( step 403 ), selects the next unplayed message in sequential ( chronological ) order ( step 404 ), and plays the message , marking it as played ( step 405 ). it then returns to step 403 , and when no more unplayed messages remain , it exits the playback function . during playing of a message , the user may interrupt play to either skip or delete the message . this interrupt capability is shown as an “ i ” inside a box , pointing to the various play steps . in the case of sequential mode , only a specific message is skipped or deleted . however , in the case of the other modes , the user may elect to skip all messages remaining in a group , or to delete all messages remaining in a group . in this case , a group skip or group delete flag is set . if the mode is grouped unprioritized , the “ y ” branch from step 410 is taken . in this case , the control program starts at the beginning of the sequential list of messages , and determines if any unplayed messages remain ( step 411 ). if so , the next sequential unplayed message is selected ( step 412 ), and the current group variable ( crt_grp ) is set to the value of the caller id of the selected message ( step 413 ). the selected message is then played and marked ( step 414 ). beginning at the selected message , the program then parses the remaining messages in sequence . if there are any remaining unplayed messages ( the “ y ” branch from step 415 ), the next sequential unplayed message is selected ( step 417 ). the caller id of the selected message is then compared with the crt_grp variable ( step 418 ). if the two are not equal , the message is not in the same group , and the “ n ” branch is taken from step 418 to go on to the next message at step 415 . if the “ y ” branch is taken from step 418 , the selected message is marked ( step 419 ). the program then checks the status of the group skip flag , indicating whether an entire group of messages should be skipped ( step 420 ). if the group skip is set , the “ y ” branch is taken from step 420 , causing the program to skip the selected message and go to step 415 to process the next message . if the group skip is not set , the program checks the group delete flag ( step 421 ). if the group delete is set , the “ y ” branch is taken from step 421 , causing the selected message to be deleted ( step 422 ), after which the program goes to step 415 to process the next message . if the group delete is not set , the selected message is played ( step 423 ), and the program then goes to step 415 to process the next message . when the end of the message sequence has been reached , the “ n ” branch is taken from step 415 . the group skip and group delete flags are then reset , and the program returns to the top of the message sequence at step 411 , to determine the next unplayed message . when no more unplayed messages remain , the “ n ” branch is taken from step 411 , and the playback function terminates . if the mode is neither sequential nor grouped unprioritized , then the “ n ” branch is taken from step 410 . in this case the mode is either grouped prioritized , grouped auto prioritized , or prioritized . the step followed by the control program are similar , and are illustrated in fig4 b . the program first finds the unplayed message having the highest priority ( steps 430 - 438 ), this being used to define a set of messages to be played together . beginning at the start of the message sequence , the program determines whether any unplayed messages remain ( step 430 ). if so , the “ y ” branch is taken , and the next unplayed message is selected ( step 431 ). the priority of this message is then determined . by comparing the caller id of the message with the caller id fields of the caller entries in profile 113 ( step 432 ). the variable hi_pri is then set to the priority value , the crt_grp set to the caller id value , and a selected variable is set to an identifier of the selected message , which may , e . g . be an address ( step 433 ). the program then determines whether any unplayed message remain in the sequence ( step 434 ). if so , the “ y ” branch is taken from step 434 , and the next unplayed message is selected ( step 435 ). the priority of this message is obtain as it was in step 432 ( step 436 ). this priority is then compared with the hi_pri value ( step 437 ). if the priority of the current message is less than or equal to hi_pri , the program goes to step 434 to process the next message . if not , the “ y ” branch from step 437 is taken , and hi_pri is set to the priority of the current message , and the selected and crt_grp are updated accordingly ( step 438 ), after which the program goes to step 434 to process the next message . when the entire sequence of messages has been parsed , the “ n ” branch is taken from step 434 ; at this point , the hi_pri variable contains the highest priority encountered , the selected contains the message id of the first message having this priority , and crt_grp contains the caller id associated with that message . the program then plays the selected message and marks it played ( step 440 ). beginning with the just played message , the program again parses the message sequence for unplayed messages . if any unplayed messages remain , the “ y ” branch is taken from step 441 . the next unplayed message is then selected ( step 442 ). if the mode is “ prioritized ”, then the “ y ” branch is taken from step 443 , and the program compares the priority of the just selected message to hi_pri ( step 444 ). if the priorities are unequal , the program goes to step 441 to process the next message ( the “ n ” branch from step 444 ). if the priorities are equal , the mode setting requires that this message be played with all others of the same priority , and the program continues to step 446 . if , on the other hand , at step 443 , the mode is either “ grouped prioritized ” or “ grouped auto prioritized ”, the “ n ” branch is taken from step 443 , and the program compares the caller id of the just selected message to the crt_grp variable ( step 445 ). if the two are unequal , the program goes to step 441 to process the next message . if the values are equal , the mode setting requires that this message be played together with all others of the same caller id , and the program continues to step 446 . at step 446 , the selected message is marked . the program then checks the skip group flag ( step 447 ), and if set , the “ y ” branch is taken , causing the message to be skipped . the program then checks the delete group flag ( step 448 ) and if set , the “ y ” branch is taken , causing the message to be deleted ( step 449 ). if neither flag is set , the message is played ( step 450 ), and the program continues to step 441 to process the next message . when the entire sequence of messages following a selected high priority message has been traversed , the “ n ” branch is taken from step 441 . the program then resets the group skip and group delete flags ( step 451 ), and returns to step 430 . at step 430 , the program parses the sequence of messages from the beginning . if no more unplayed messages remain , the “ n ” branch is taken from step 430 , and the playback function ends . preferably , the functions described above can be accessed remotely by calling the user &# 39 ; s telephone number from another telephone , and entering an appropriate sequence of digits as a security code . the user then enters digits on the keypad of the remote telephone to invoke functions as above described . as previously explained the caller id function is used to identify a caller in the preferred embodiment , although voice recognition is an optional form of identification . where voice recognition is used to identify callers , it will be understood that appropriate changes may be made to the techniques above described for selecting a particular caller to play back messages of the caller , change the caller &# 39 ; s priority , and so forth . for example , the system may audibly play a small segment of each caller &# 39 ; s speech to allow selection . alternatively , the user could assign a number to each caller for identification purposes , and simply input the number to make a selection . this number could be a telephone number , or a sequence number ( 1 , 2 , 3 , etc . ), or any other number which might be easy for the user to remember . in general , the routines executed to implement the illustrated embodiments of the invention , whether implemented as part of a stand - alone message system or an application program of a larger , general purpose system , program , object , module or sequence of instructions , are referred to herein as a “ control program ” or “ program ”. the programs typically comprise instructions which , when read and executed by one or more processors in the devices or systems consistent with the invention , cause those devices or systems to perform the steps necessary to execute steps or generate elements embodying the various aspects of the present invention . moreover , while the invention has and hereinafter will be described in the context of fully functioning message systems , the various embodiments of the invention are capable of being distributed as a program product in a variety of forms , and the invention applies equally regardless of the particular type of signal - bearing media used to actually carry out the distribution . examples of signal - bearing media include , but are not limited to , recordable type media such as volatile and non - volatile memory devices , floppy disk , hard - disk drives , cd - rom &# 39 ; s , dvd &# 39 ; s , magnetic tape , and transmission - type media such as digital and analog communications links , including wireless communications links . examples of signal - bearing media are illustrated in fig1 as rom 103 . in the preferred embodiment , messages are grouped according to an identify of a single caller . however , it will be recognized that it would be possible to define more complex groupings of callers and associate priorities accordingly . for example , one could define a group having a limited number of enumerated telephone numbers associated therewith . this would be useful , e . g ., where a frequently called person uses several telephones , e . g ., at work , at home , cell phone , etc . one could further define a group of numbers according to some characteristic of the numbers . e . g ., one might define one group as all telephone numbers beginning with a certain sequence , where the beginning sequence identifies numbers originating from a particular company or organization . furthermore , one might define as a group all numbers having an origin outside the area code of the user , or even all numbers of foreign origin , on the theory that long distance or international calls probably deserve special treatment . in the preferred embodiment described above , the telephone message system has been described as a self - contained system operating on a single telephone line . however , it will be understood that the use of caller identification to sort and / or prioritize messages as described herein is equally applicable to larger multi - user systems ( sometimes referred to as “ phone mail ”), in which a single computer stores messages for multiple telephone receivers used by multiple users , and each user retrieves messages from his assigned “ mailbox ” using appropriate function and numeric buttons on his local telephone receiver . in the preferred embodiment described above , a telephone answering message system has multiple functions to assist a user in presenting messages in a logical or convenient order . however , it will be understood that it would alternatively be possible to implement a message system with only some of the functions herein described , or to include additional functions not described herein . for example , a message system might have the capability to play back messages associated with a single selected caller identity , even though it lacks the ability to prioritize multiple caller identities as described herein . although a specific embodiment of the invention has been disclosed along with certain alternatives , it will be recognized by those skilled in the art that additional variations in form and detail may be made within the scope of the following claims :