A Smart Telephone Answering Machine with Voice Message Forwarding Capability Chih-Hung Huang 1 Cheng Wen 2 Kuang-Chiung Chang 3 1 Department of Information Management, Lunghwa University of Science and Technology 2 Department of Electrical Engineering, Lunghwa University of Science and Technology Abstract 3 Department of Electrical Engineering, Lunghwa University of Science and Technology The most frequently seen add-ons on home used telephone sets are answering machines, which can answer incoming calls automatically. In this paper, an email capable embedded system is added to a traditional telephone answering machine to turn it into a smart voice message forwarding system. The proposed system utilizes the embedded email technology to automatically forward a voice message left by a caller to the designated recipient via an email. The recipient may, in this regard, listen to the voice message virtually anywhere in the world where Internet access is possible. By using the proposed system, a user, who is expecting an incoming message, will be notified as soon as the voice message has been forwarded instead of polling the answering machine repeatedly. In addition, for users who travel a lot, to listen to the voice message attached in emails saves the expenses of long distance calls. Lastly, the privacy of the personal messages can be preserved. Keywords:Email systems, answering machine, embedded systems, voice messages. 1. INTRODUCTION Without doubts, the most frequently seen add-on function on home used telephone sets is the capability of answering incoming calls automatically. Such an answering device, usually called a telephone answering machine (TAM), is an electronic device that picks up an unanswered telephone call, plays a pre-recorded message, and records voice messages that the caller leaves. In addition to the answering function, there are other features that may also be added to TAMs depending on implementations by different manufacturers. For example, most TAMs allow messages to be played back over the telephone network via a remote command issued by an authorized person, whereas some have the capability to dial a predetermined telephone number and play back a recorded message to that number. A TAM has become a very convenient 81 personal communication device in almost every household when people are not convenient to answer a call. Traditionally, TAM users may play back the messages recorded either on site or remotely. If a user can hand-operate the answering machine directly, the voice messages are played out from the speaker of the TAM; otherwise, while being away from home, the user can issue a remote command to the TAM, and then the messages are played and sent to the user via the telephone network. To listen to the recorded messages remotely takes time. If the signal quality is poor, which frequently happens in the long distance calls, the user may need to play the message more than once. In this regard, the charge of long distance calls could be a burden. In the case when a user is expecting an important message, the user may need to check with TAM over and over again. Moreover, in a household use, where a telephone line is usually shared by all family
龍 華 科 技 大 學 學 報 第 二 十 八 期,2009. 12 members, a message left by a caller could be addressed to any one of them. If the privacy and the security issues have to be taken into account, the traditional TAMs are just not good enough. There are two types of voice messages involved in a TAM operation: a pre-recorded message, usually called a greeting message, and messages left by callers. The pre-recorded message used to inform the caller that the called party is not available to answer the phone. It is automatically played back after a pre-defined number of rings. Both types of the messages are stored in the non-volatile storages, such as tapes or EEPROM. Because the messages stored on tapes can only be sequentially played back, and the quality of recorded voice messages goes down after several record-and-erase cycles, tapes are rarely used now. Instead, on more recent TAMs, messages are stored in EEPROM in digital formats. This makes further messages manipulations possible, such as processing and delivering the message files over Internet. In this paper, a new design of TAM called Smart Telephone Answering Machine (or STAM) is introduced. The STAM enhances the traditional TAM by adding an embedded email system into the device. When a voice message has been recorded, it is encoded and saved in EEPROM as an audio file. Afterwards, the STAM automatically creates an email, attaches the message file to it and delivers the mail to the recipient that the message is originally addressed to. The recipient may access the message virtually anywhere in the world where Internet access is possible. By using STAM, if users are expecting an important message, they will be notified as soon as the message has arrived, instead of polling the answering machine repeatedly. The proposed system not only saves the expenses of listening to the messages remotely but preserves the privacy of personal messages as well. The proposed STAM provides a mechanism that allows users to hear only messages they have rights to access. The remainder of this paper is organized as follows. Section 2 introduces the hardware architecture of the proposed STAM. Section 3 discusses the necessary software components to drive the system especially the embedded email system. Section 4 shows the implementation and experimental results of the STAM. Finally, Section V contains a brief conclusion. 2. HARDWARE ARCHITECTURE Fig. 1 shows the hardware architecture of the proposed STAM. There are two systems in the device: a telephone answering machine and an embedded mail system. The major components of the telephone answering machine include a ring detector, a DTMF (Dual Tone Multiple Frequency) decoder [1], and a voice IC. The embedded system contains an MCU (Micro Controller Unit), a storage module, an Ethernet [2] module, a voice modem [3]. Since Internet connection is indispensable to reach the goal of voice message forwarding, inside the STAM, there are built with two connectors for different Internet connection options. One is the Ethernet module, which is used to connect Internet via a local LAN, and the other is the voice modem module, which is used to dialup to Internet when the local LAN connection is not available. Speaker / Microphone Voice IC Clock Module Storage Module Keypad Coupling Circuit DTMF Decoder MCU Embedded System Telephone Ring Detector Connecting Voice Modem Ethernet Module Fig. 1 Hardware architecture of STAM The STAM records and manipulates a voice message according to the following procedures: LAN 82
1. A ring signal is sensed by the ring detector, which informs the MCU an incoming call. 2. The MCU activates the connecting circuit to connect the telephone line after a pre-defined number of rings. 3. The MCU enables voice IC to play the greeting message that was previously recorded and saved in the storage module. In the greeting message, the recipients and their corresponding ID are enumerated. 4. The caller chooses the party that the voice message is addressed to by using the keypad on the caller s phone set. 5. The keys pressed are decoded by the DTMF and sent to the MCU. The recipient of the message is thus determined. 6. The voice IC finishes playing the greeting message and informs the caller to start leaving the voice message. 7. The message is sampled and digitized by the voice IC and stored in the storage module. 8. The MCU compresses and encodes the voice message into a common audio file format [4], such as WAV, MP3 or WMA. 9. The MCU creates an email, packs the voice message as an attachment of the email, which is finally sent to the email address of the recipient. Telephone Answering Machine STAM Embedded System Ethernet Pots Splitter ADSL Modem Broadband Router PC PC Fig. 2 STAM using LAN-to-Internet connection Telephone Answering Machine STAM Embedded System Modem Fig. 3 STAM using dialup-to-internet connection There are two different Internet connection options for the proposed STAM: LAN-to-Internet and dialup-to-internet connections. Fig. 2 shows the diagram of the LAN-to-Internet connection, which is preferable because the LAN usually provides higher bandwidth and more reliable data transfer than those of the dialup connection. Nowadays, most home users choose ADSL as their primary choice to access Internet. By using a broadband router, ADSL supports multiple users sharing the same bandwidth to get on Internet, if a local LAN is deployed at home. As shown in Fig. 2, where a STAM is added to the local LAN, a UTP cable is used to connect the Ethernet module of the STAM to the broadband router. This makes the STAM a member of the local LAN and the embedded email system of the STAM would use this path to forward voice messages to the recipient. In the case that the local LAN using non-adsl connection to Internet, such as a leased line, there will be a LAN switch replacing the broadband router and ADSL modem in Fig. 2. Alternatively, as shown in Fig 3, if there is no local LAN available, the voice modem inside the embedded system is used to make dialup connection. Although both connection diagrams appear differently, the ways they forward messages are basically the same. Since the voice modem shares the same line with telephone, the message forwarding can only be performed while the telephone line is not in use. The 83
龍 華 科 技 大 學 學 報 第 二 十 八 期,2009. 12 MCU controls the time to dialup and make Internet connection, if there are messages pending to be sent. When all the messages have been forwarded, the voice modem disconnects the connection to leave the line ready for next incoming call. 3. SOFTWARE COMPONENTS Fig 4 shows the software components of the embedded mail system, which are interrupt service routines (ISRs), digital signal processor (DSP), TCP/IP protocols [5] and an SMTP (Simple Mail Transfer Protocol) [6]-[8] client. The ISRs are interrupt handlers to process unsynchronized events. In the embedded system, ISRs are used to detect ring signals, enable the answering function and record the messages left by callers. The DSP program module is responsible to process voice signals sent by the voice IC. The processing includes filtering, sampling, compressing and encoding the voice signals. Fig. 4 Software components of STAM Above all, the STAM needs an email module to forward the voice message to the recipient. The easiest way to meet this requirement is to adopt an SMTP client directly. There are a number of open SMTP clients, also known as email applications, available and they have been widely used for years. The SMTP clients call TCP/IP as transport and data delivery protocols. Therefore, TCP/IP protocols are also required. The SMTP client packs the voice message as an audio attachment into an email and sends out by calling the TCP/IP protocols underneath. Before putting the STAM to work, an initial configuration setup is necessary. There are three configuration items need to be set in advance: (1) IP address, (2) SMTP server information, (3) user accounting information. An IP address is required for SMTP client application to work. If the LAN-to-Internet connection is used, the IP address of the Ethernet module can be configured in either statically assigned by the STAM administrator or dynamically assigned by a DHCP (Dynamic Hosts Configuration Protocol) server on the local LAN. On the other hand, if the dialup-to-internet connection option is used, no IP address configuration is necessary. Instead, ISP will automatically assign an IP address while the dialup connection is established. To setup the SMTP server information is to designate a mail service provider, or a mail server, to deliver the email, which the embedded mail system has prepared, to its destination for SMTP client. Assigning any valid mail server as we usually use in our daily email exchanges will do the job. If a traditional answering machine is shared by multiple home users, messages left by callers could be accessed by any user who knows the access code. Moreover, the actual message recipient, usually hidden inside the message, cannot be determined prior to the message playback. These drawbacks can be overcome by adding a simple accounting mechanism to the proposed STAM. The contents of all user accounts can be entered in advance by the system administrator in one of the two ways, from a web-based interface built in the STAM, if LAN-to-Internet connection is used; or from the numeric keypad of the STAM, otherwise. The user accounting information is saved in the storage module. In most cases, a simple table to store user IDs, names, passwords as well as their email addresses is enough. Since the English letters are inevitable in an email address, the keypad uses a specially designed code-mapping scheme, which could convert a sequence of number keys pressed into English letters. The user names and their 84
corresponding IDs are enumerated and pre-recorded in the greeting message. As the STAM is initiated, the greeting message is played-back. The caller may select the exact recipient from the user list before leaving the message. Afterwards, the message left by the caller will be only sent, by the SMTP client, to the designated recipient. On the other hand, if the messages are to be played-back on site, the user would need to pass an authentication process first. Since the messages left have been stored for each user independently, the messages playback feature plays only messages that are addressed to the user. 4. EXPERIMENTAL RESULTS To implement the proposed STAM, an embedded system chip with a build-in ADC, a voice IC, and a 4x4 keypad were integrated into a traditional TAM, as shown in Fig. 5. Inside the embedded system, the TCP/IP protocols and an SMTP client were installed. In addition, an open source audio application with MP3 encoder was also installed to record and encode the messages. The user accounting information for testing was entered in advance, as the examples shown in Table 1. There are four fields in the table: names, passwords, numeric IDs and email addresses. The names and the IDs are to be read out from the greeting message from which the caller can choose the recipient. The numeric IDs are used to look up the recipient in the table as the caller pressing the keypad. TABLE 1 USER ACCOUNT INFORMATION Name Password ID Email Address John ******** 101 js@ms.abc.com Mary ******** 102 ms@ms.abc.com David ******** 211 ds@ms.abc.com Fig. 6 Waveform of a voice message A test was performed on a local LAN environment with ADSL connection to Internet. As the STAM was plugged into the local LAN, a dynamic IP address was assigned to the STAM by a DHCP server on the same local LAN. A call to initiate the STAM was made by one of our lab staff who left a 3.5-second voice message, as the waveform shown in Fig. 6. The message was sampled, recorded and encoded into MP3 file format (about 60KB in size) and stored in EEPROM. Afterwards, the voice message file was added into an email as an attachment and sent to the designated recipient specified by the caller. Fig. 7 shows the email that had been successfully received. Fig. 5 Prototype of STAM Fig. 7 Voice message forwarded by email system 85
龍 華 科 技 大 學 學 報 第 二 十 八 期,2009. 12 5. CONCLUSIONS This paper presents a smart email capable telephone answering machine, or STAM. The proposed system utilizes the embedded email technology to automatically forward a voice message left by a caller to the designated recipient via the Internet mail. In this regard, the message recipient may listen to the message virtually anywhere in the world where Internet access is possible. Utilizing STAM can not only save the costs of telephone calls but also preserve the privacy of the message receivers. REFERENCES 1. H.248.1: Gateway control protocol: Version 3, Sep, (2005). http://www.itu.int/rec/t-rec-h.248.1-200509-i/en 2. IEEE 802.3 Series, (1983). http://www.ieee802.org/3/ 3. ITU-T V-Series: Data communication over the telephone network, Sep, (2006). http://www.itu.int/rec/t-rec-v/en 4. http://en.wikipedia.org/wiki/audio_file _format, Sep, (2008). 5. RFC 1122: Requirements for Internet Hosts -- Communication Layers, Oct, (1989)http://www.ietf.org/rfc/rfc1122.txt 6. RFC 821: Simple Mail Transfer Protocol, Aug, (1982). http://www.ietf.org/rfc/rfc821.txt 7. RFC 2821: Simple Mail Transfer Protocol, Apr, (2001). http://www.ietf.org/rfc/rfc2821.txt 8. RFC 1123: Requirements for Internet Hosts -- Application and Support, Oct, (1989)http://www.ietf.org/rfc/rfc1123.txt 86
具 語 音 訊 息 傳 遞 功 能 的 智 慧 型 電 話 答 錄 機 黃 志 宏 1 龍 華 科 技 大 學 1 資 訊 管 理 系 溫 成 2 龍 華 科 技 大 學 2 電 機 工 程 系 張 光 瓊 3 龍 華 科 技 大 學 3 電 機 工 程 系 摘 要 家 用 電 話 最 常 見 的 附 加 裝 置 就 非 電 話 答 錄 機 莫 屬 了 它 能 夠 在 受 話 方 無 法 接 聽 來 電 的 情 形 下, 自 動 接 起 由 外 撥 入 的 電 話, 並 且 錄 下 發 話 方 的 留 言 在 本 論 文 中, 我 們 在 這 種 傳 統 的 電 話 答 錄 機 當 中, 加 入 了 電 子 郵 件 的 功 能, 讓 它 成 為 一 台 智 慧 型 的 語 音 訊 息 轉 遞 裝 置 這 個 裝 置 乃 是 整 合 了 嵌 入 式 電 子 郵 件 系 統 的 技 術, 能 將 發 話 方 所 留 下 的 語 音 訊 息, 轉 換 為 語 音 檔, 並 以 電 子 郵 件 夾 檔 的 形 式, 即 時 轉 寄 給 受 話 方 如 此 一 來, 受 話 方 可 以 在 任 可 有 網 際 網 路 連 線 的 地 方, 收 聽 到 發 話 方 的 留 言 利 用 此 一 智 慧 型 裝 置, 如 果 受 話 方 出 門 在 外, 他 就 不 需 要 經 常 回 撥 答 錄 機, 檢 查 是 否 有 留 言 對 於 經 常 旅 行 的 使 用 者 而 言, 採 用 此 種 智 慧 型 裝 置, 的 確 可 以 節 省 一 筆 可 觀 的 長 途 電 話 費 用 此 外, 語 音 訊 息 轉 遞 的 機 制, 只 有 當 事 人 才 能 收 到, 可 以 確 保 訊 息 的 私 密 性 關 鍵 字 : 電 子 郵 件 電 話 答 錄 機 嵌 入 式 系 統 語 音 訊 息 87