200816722 九、發明說明: 【發明所屬之技術領域】 本發明係有關於電話通訊,尤指—種電話間道器、包 含其之電話系統及其執行閘道功能的方法。β 【先前技術】 對於經吊到國外出差或旅遊的人而言,若常以電話和 國内聯絡,需要花費大量的國際通訊費用。例如,若是使 用行動電話,則不論是打電話回國内,或是接國内打來的 電居白而支付國際及遊費;若是使用國外的固網服務, 則就打回國内的部分,亦須支付國際電話冑。雖然,現在 已有網際網路協定(intemet Protocol,簡稱Ιρ)電話(v〇ice200816722 IX. INSTRUCTIONS: TECHNICAL FIELD OF THE INVENTION The present invention relates to telephone communication, and more particularly to a telephone intercommunication device, a telephone system including the same, and a method for performing the same. β [Prior Art] For those who are traveling abroad for business or tourism, it is necessary to spend a lot of international communication fees if they frequently contact the country by telephone. For example, if you use a mobile phone, you will be able to pay for international and travel expenses whether you call back to China or receive electricity from the country. If you use a foreign fixed-line service, you will get back to the domestic part. International calls are also required. Although, there is now an Internet Protocol (referred to as Ιρ) telephone (v〇ice)
_·ΙΡ ’ _ VgIP)的服務’可在國外制Ip電話,經由 網際網路和國内亦使用IP電話之通話者聯絡,以節省話 費。然而,若國内通話者沒有IP電話或不方便使用圯電 話時’國外通話者仍需撥打國内通話者的行動電話或固網 電話。此時,國外通話者若要藉由IP電話和國内通話, 則需另外花錢申請IP電話業者的服務,例如,以目前常 用的IP電話Skype為例,若要從國外利用skype打回國 内之行動電話或固網電話,則需申請SkypeOut的服務; t要在國外接國内之行動電話或固網電話打來的電話,則 需申請Skypein服務。如此,仍須支付skype業者服務費 用。此外’當我方在國外時,若對方撥打我方國内家裡或 公司的固網電話,並無法轉接到我方在國外所使用之IP 200816722 電話,而造成漏接電話。 【發明内容】 有鑑於此’本發明之一目的,在於提供一種電話閘道 器(telephony gateway)、包含其之電話系紙及其執行^ = 功能的綠’可_ IP電話節省話f,且當通話對方非 為IP電„舌時,亦無須另夕卜支付月民務費用給ip電話業者。 本發明之另—目的,在於提供—種電話閘道器、包含 其之電話纽及魏行閘道魏的方法呵將對方撥打至 我方的_電話或行動電話但我方無祕聽之電話經由 :IP網路(例如網際網路)轉接至我方的IP電話。如此, 當我方在世界任何地方,只要可_ IP電話裝置連上該 IP網路,就可不漏接電話。 乂 在本發明之一實施例中,揭露了-種電話閘道器,其 連接於-電觸路與—Ip晴間0該電話騎器包含: 電話網路面’對應於一電話號碼,並從該電話網路接 收-來話(in_ing㈣訊號,其中該來話訊號之目的電 話號碼為㈣話朗;—定料元,賴觸_ ιρ電話 裝置是否連接於該IP網路,其中該ιρ電話裝置具有第一 IP位址,且支援第一 JP電話協定;—轉碼(杜継^㈣) 單元’福接至該電話網路介面與該定位單元,用以在該IP f 4裝置連接於該ip _時,將該絲減轉瑪為符合 第電話協定之第- IP電話訊號,其中該第一 ιρ電 話訊號之目的Π> 4立址為第—Ip位址;以及一 ιρ介面, 200816722 粞接至雜碼單元触定位單元,該^介面對應第二正 位址’並經由該1P、網路將第- IP電話訊號傳送至該ip 電話裝置,以建立一電話連線。 在本發明之另-實施例中,揭露了 一種電話系統,其 包含·一1P電話裝置,連接至一 IP網路,且具有第一 IP 位址’支援第一 IP電話協定;以及一電話閘道器,連接 於一電話網路與該IP網路間,對應於一電話號碼及第二 IP位址,且將接收自該電話網路之一來話訊號轉碼為符 合第一 IP電話協定之第一 IP電話訊號,經由該Ip網路 傳送至該IP電話裝置,以建立一電話連線。其中,該來 話訊號之目的電話號碼為該電話號碼,第一 IP電話訊號 之目的IP位址為第一 IP位址。 在本發明之又一實施例中,揭露了一種執行電話閘道 功能的方法,係用於一電話閘道器,該電話閘道器連接於 一電話網路與一 ip網路間,且對應於一電話號碼及第二 IP位址。該方法包含下列步驟:從該電話網路接收一來 話訊说’其中該來話訊號之目的電話號碼為該電話號瑪· 判斷一 IP電話裝置是否連接於該IP網路,其中該Ip電 話裝置具有第一 ip位址,且支援第一 ip電話協定;當兮 IP電話裝置連接於該IP網路時,將該來話訊號轉碼為^ 合第一 IP電話協定之第一 IP電話訊號,其中第一 Ip電 話訊號之目的IP位址為第一 IP位址;以及經由該逆網 路將第一 IP電話訊號傳送至該IP電話裝置,以建立〜電 話連線。 200816722 【實施方式】 第1圖係本發明之電話系統之第一實施例的架構 圖。如圖所示,電話系統10包含一 IP電話褒置11及一 電話閘道器12。IP電話裝置11係經由一 IP網路13連接 至電話閘道器12,且具有第一 IP位址,支援第一 ip電話 協定(VoIP protocol)。IP網路13泛指任何使用ip位址來 定址與溝通的網路,例如網際網路或使用IP位址之區域 網路(LAN)。第一 IP電話協定並無限定,可泛指任何可 控制官理IP網路上之語音訊號傳輸的通訊協定,例如已 成為業界標準之會議發起協定(Session Initiati()n Protocol ’簡稱SIP)與H.323 ’或是其他業者自行開發之 協定。另外,IP電話裝置11可為任何類型之電子裝置, 只要其可以有線或無線方式連上IP網路13且支援第一 Ip 電話協定。例如,可攜式裝置(行動電話、筆記型電腦、 個人數位助理(PDA)等等)、個人電腦(PC)、附有整合存取 裝置(integrated access device,簡稱IAD)之傳統電話⑼细 old telephone,簡稱POT)等等。電話閘道器12係連接於 -公共電話交換網路(public switehed teleph()ne netwwk, 簡稱PSTN)14與IP網路13間,且對應於一 pSTN電話 號碼及HP 4立址。電話閘道器12可執行以下幾種間道 功月b ·接收PSTN網路14之來話、接收ip網路η之來 話、經由PSTN網路14發話至—受話端裝置(圖未顯示) 以及經由IP網路13發話至另一 Ip電話裝置15。以下分 200816722 別敘述各閘道功能的執行方式: (1) 接收PSTN網路14之來話:當電話閘道器12從 PSTN網路14接收到一來話訊號(其目的電話號碼 為電話閘道器12之PSTN電話號碼)時,會將其轉碼為符 合第一 IP電話協定之第—jp電話訊號(其目的IP位址為 IP電話裝置11之第一 IP位址),並經由IP網路13傳送 至IP電話裝置11 ’以建立一電話連線。 (2) 接收IP網路π之來話:當電話閘道器12&IP 網路13接收到一 IP電話來話訊號(其目的ιρ位址為電話 閘道器12之第二IP位址)時,會將其轉碼為符合第一 ιρ 電話協定之第二IP電話訊號(其目的ιρ位址為第一 1?位 址)’經由IP網路13傳送至第一 Ip電話裝置n,以建立 一電話連線。 換言之,當電話閘道器12是設在使用者國内的家或 辦公室中,則藉由前述(1)及(2)的閘道功能,可將pSTN 網路14或IP網路π之來話轉接至Ip電話裝置u。因此, 當使用者不在家細公㈣,不論他位於哪個地方(國内 或國外),只要他能藉由IP電話裝置u連上lp網路13, 就能接到原本打到他家或辦公室的電話,並且無須支付任 何通話費用。另外,電話閘道!! 12亦可連接_傳統電話 裝置’當使用者在家或辦公室裡時,可直接利用該傳統 話裝置接聽PSTN網14之來話,而不需轉接。、 在一第-較佳實施例中,當IP電話裝置u收到前述 第-或第二IP電話訊號時,會執行—認證動作,以決定 200816722 是否准許建立電話連線。該認證動作係用於確認第一或第 一1p電話訊號是由電話閘道器12所發出,以過濾來源不 明之來話。該認證動作之實施方式並無限制,例如,可藉 由判斷第一或第二IP電話訊號是否包含電話閘道器12之 一特定識別碼來認證,若是則准許建立電話連線,若否則 不准許。 (3)經由PSTN網路14發話至一受話端裝置··當電 話閘道器12從IP網路13收到IP電話裝置u所發出之 第電話發話訊號(其目的IP位址與目的電話號碼分 別為電話閘道H 12之第二1?位址與—受話端電話號碼) 時,會將第一 IP電話發話訊號轉碼為一 pSTN訊號,經 由PSTN網路η傳至該受話端電話號碼所對應之受話端 裝置,以建立一電話連線。請注意,由於PSTN網路14 了-、a共陸地行動網路⑦此如lan(j mobile network,簡稱 PL_)互連’所以該受話端裝置除了可以是PSTN電話裝 置,亦可以是行動電話。 (4)經由ip網路丨3發話至ιρ電話裝置15 :此處Ip 電話裝置15係對應一 IP電話代碼(註:IP電話不-定使 用號碼來識別,所以此處喊碼來涵蓋各獅式之識別 ,)’且支援第二1P電話協定。第二IP電話協定並無限 定,可泛指任何可控制管理IP網路上之語音訊號傳輸的 通訊協疋。當電話閘道器12從IP網路13收到IP電話裝 置Π所發出之第二IP電話發話訊號(其目的吓位址與目 的電話代碼分別為電話閘道器12之第二IP位址與IP電 200816722 話敦置15之IP電話代碼)時,會將第二ip電話發話訊號 轉碼為符合第二IP電話協定之第三IP電話訊號,經由Ip 網路13傳送至ip電話裝置15,以建立一電話連線。 換言之,當電話閘道器12是設在使用者國内的家或 辦a至中’則藉由前述(3)及(4)的閘道功能,當使用者不 在豕或辦公室時,不論他位於哪個地方,只要他能藉由正 電話裴置11連上IP網路13,就能透過電話閘道器12撥 打至其他PSTN電話裝置、行動電話或ip電話裝置。當 使用者位於國外而撥打至國内時,由於係先藉由Ip網路 13連至國内的電話閘道器12再轉接出去,因此使用者僅 需負擔國内部分的話費,而可省下國際部分的話費。 在一第二較佳實施例中,當電話閘道器12收到前述 第或第一 IP電活發話訊號時,會執行一認證動作,以 决疋疋否准許IP電話裝置11與前述受話端裝置或IP電 話裝置15建立電$連線。該認證動作係用於確認第一或 第二ip電話發話訊號是由電話裝置U所發出,以避 免其他未經認證之IP電話裝置盜用電話閘道器12來撥打 電話。該認證動作之實施方式並無限制,例如,可藉由判 斷第一或第二IP電話發話訊號是否包含IP電話裝置11 之-特定識別碼來認證,若是則准許建立電話連線,若否 則不准許。 第2圖係本發明之電話系統之第二實施例的架構 圖,其與第1圖之主要差齡於,電話系統2G所包含之 電話閘道器22係連接於—凡丽網路%與網路13 12 200816722 話號碼(衡繼22 _應於 第一)於别述⑴與(3)的閘道功能,則分別改變 為接收PLMN網路24之來話與經由pLMN網路24發話 至-受話職置,(2)與⑷的職功闕轉不變。在 收PLMN網路24之來話時,電話閘道器22係從孔麵 網路24接收到- PL_來話訊號(其目的電話號碼為電 話閘道11 22之行動電話細),並將其轉碼為符合第一 IP 電話協定之細IP電話峨(其目的ip位址為第-IP位 址),經由1p網路13傳送至IP電話裝置11,以建立一電 話連線。在_ PLMN晴24魏至—綠端裝置時, 電話閘道器22係從ip網路13收到ιρ電話裝置u所發 出之第一 ip電話發話訊號(其目的ip位址與目的電話號 碼分別為第二IP位址與一受話端電話號碼),並將第三Ip 電話發話訊號轉碼為一 PLMN訊號,經由pLMN網路24 傳至該受話端電話號碼所對應之受話端裝置,以建立一電 話連線。 第3圖係本發明之電話系統之第三實施例的架構 圖’其與第1圖之主要差別在於,電話系統3〇除了包含 電話閘道器32與IP電話裝置31外,還包含一連接於ip 網路13之定位伺服器36。在此第三實施例中,IP電話裝 置31與電話閘道器32係分別對應於第一與第二IP位 址。IP電話装置31與電話閘道器32在進行溝通前,需 先互相得知對方的IP位址。當雙方都是固定IP位址時, 可將對方之固定IP位址預先記錄於我方,以便要與對方 13 200816722 溝通時朗。然而,若有任何―方為浮動IP位址(floating IP address)時’另一方便難以如固定ιρ位址般預先記錄。 因,,定位伺服器36之功能在於,當第一與第二吓位址 至>、有其一為浮動IP位址時,可於Ip電話裝置Μ與電 話閘道器32在溝通時,使具浮動Ιρ位址的一方可被另一 方所定位,亦即另一方可得知該浮動IP位址為何。 足位伺服器36包含一對應表361 ,可記錄具浮動jp 位址之一方之特定識別碼與該浮動IP位Μ間的對應關 係,如此,只要另一方預先記錄有該特定識别碼,就可依 據該特定_碼查詢對絲361 ,爾知該雜ΙΡ位址。 例如,當IP電話裝置3丨之第一 Ιρ位址為浮動ιρ位址時, IP電話裝置31即於定位伺服器36進行註冊,以使對應 表361記錄有第一 Ip位址與Ip電話裝置31之第一識別 碼間之對應關係。第一識別碼係預先記錄於電話閘道器 32,而電話閘道器32便可依據第一識別碼查詢對應表 361 ’以得知第一 IP位址。再例如,當電話閘道器32之 第二IP位址為浮動IP位址時,電話閘道器32即於定位 伺服器36進行註冊,以使對應表361記錄有第二圯位址 與電話閘道H 32之第二削碼間之對應嶋。同樣地, 第二識別碼係預先記錄於IP電話裴置31,而ip電話裝置 31便可依據第一識別瑪查詢對應表361,以得知第二ip 也址。前述第一與第二識別碼之形式並無限制,例如,可 使用母個IP網路裝置皆具有之媒介存取位址(media access address,簡稱 MAC address),作為識别碼。 200816722 第4圖係第1圖之電話閘道器12之-較佳實施例的 方塊圖。如第4騎示,電關道ϋ 12包含-pstn介 面m、、-疋位單元122、一轉碼單元123、一認證單元 124/ -通話拒絕㈣丨咖阔處理單元⑵一延伸功 此早疋126及一1P介面127。其中’ PSTN介面121係連 接至PS™網路14,且對應於電話閘道器12之PSTN電 話號碼;定位單元122用以判斷IP電話裝置11是否連接 於IP網路13’轉碼單元123用以進行PSTN tR號與IP電 話訊,間、或不同IP電話協定之Ip電話訊號間之轉碼; 單元124用以執行前述第二較佳實施例中所述之認 證動作;通話拒絕處理單元125 _在電話連線無法建 立時’執行_通話滅料;Ip介面係連接至 IP網路 13 ’且對應電話閘道n 12之第二1?健。延伸功能單元 126則用以提供下列附加功能至少其一:通話錄音、顯示 來話號碼(caller ID)、過據來話、分機功能、會議通話 (c〇nference call)、來話保留、快速撥號及通話資訊統計。 以下分別敘述電話閘道器12在執行前述⑴至(4)的閘 道功能時,其内部的運作方式·· ⑷在接收PSTN網路14來話時,PSTN介面121 從PSTN網路Η接收該pSTN來話訊號,而轉碼單元123 在定位單元122判斷IP電話裝置u係連接於ιρ網路13 時,將該PSTN來話訊號轉蝎為前述之第一 ιρ電話訊號, IP介面127則經由IP網路13將第一 Ip電話訊號傳送至 1P電話裝置11,以建立電話連線。 15 200816722 (B)在接收IP網路13之來話時,ip介面127係從IP 網路13接收邊IP電話來話訊號,而轉碼單元123在定位 早元122判斷IP電活裝置11係連接於ip網路I]時,將 該IP電話來話訊號轉碼為前述之第二IP電話訊號,ip介 面127則將第二IP電話訊號經由ip網路13傳送至ip電 話裝置11,以建立電話連線。 (C)在經由PSTN網路14發話至一受話端裝置時, IP介面127係從IP網路13接收第一 IP電話發話訊號, 而轉碼單元123在經過認證單元124認證後,將第一 ip 電話發話訊號轉碼為前述之PSTN訊號,PSTN介面121 則經由PSTN網路14傳送該PSTN訊號至該受話端裝 置,以建立電話連線。 (D)在經由IP網路13發話至Ip電話裝置15時正 ==係㈣網路13接收第二Ip電話發話訊號,而 碼早7G 123在經過認證單元124認證後,將第二ιρ電 話發話訊號轉碼為歧之第三Ip電話峨,ιρ介面 =經由1P網路13傳送第三IP電話訊號至IP電話裝置 15,以建立電話連線。 絕處中-當電話連線無法建立時,通話拒 置所傳送^拒_ ·記紐話端裝 話端裝置。。。 疋將來話訊號轉接至—預設之受 前述=====财發明執行 万法的實施例。第5圖係執行接 200816722 網路14來話之閘道功能之一實施例的流程圖。 圖所示,此流程包含下列步驟: ,驟5〇 ·從PSTN網路14接收前述⑴之psTN來話 訊说, ,驟5丨·判斷IP電話裝置丨丨是否連接於IP網路13, 若否則跳至步驟55,若是則跳至步驟52; 步驟幻:將該PSTN來話訊號轉碼為第一 電話訊 5^, 步驟53:經由1P網路13將第一 IP電話訊號傳送至 IP電話裝置11,以建立電話連線; 步驟54 ·躺電話連線是^建立,若否舰至步驟 55 ’若是則跳至步驟56; 步驟55:執行通話拒絕程序,並結束流程;以及 步驟56:維持電話連線,直至通話結束。 第6圖係執行接收Ip網路n來話之閘道功能之一 施例的流糊。如第6 _示,此流程包含下列步驟·· 步驟6〇 .。從ίΡ網路13接收前述(2)之IP電話來話訊 , 步驟61 =斷1P電話裝置11是否連接於Ip網路13, 若否則跳至步驟65,若是則跳至步驟62; 步驟62 ·將該1P電話來話訊號轉碼為第二IP電話訊 號; 。 步騾63 ·將第二11>電話訊號經由IP網路13傳送至 IP電話裝置n,以建立電話連線; 17 200816722 步驟64 :判斷電話連線是否建立,若否則跳至步驟 65 ’若是則跳至步驟66; 步驟65 :執行通話拒絕程序,並結束流程;以及 步驟66 :維持電話連線,直至通話結束。 第7圖係執行經由PSTN網路14發話至一受話端裝 置之閘道功能之一實施例的流程圖。如第7圖所示,此流 程包含下列步驟: 步驟70 ·從IP網路13接收前述⑶之第一 ip電話發 話訊號; 步驟71 :決定是否准許ip電話裝置u與該受話端 裝置建立電話連線,若准許則跳至步驟 73,若不准許則跳至步驟72; 步驟72 :執行通話拒絕程序,並結束流程; 步驟73:將第一 IP電話發話訊號轉碼為pSTN訊號; 以及 步驟74 :經由PSTN網路14傳送該pSTN訊號至該 受話端裝置,以建立電話連線。 步驟71中,係依據第一 IP電話發話訊號是否包含ρ 電話裝置11之特定識別碼,決定是否准許ip電話裝置u 與該受話端裝置建立電話連線。 第8圖係執行經由ip網路13發話至ip電話裝置μ 之閘道功能之一實施例的流程圖。如第8圖所示,此流程 包含下列步驟: 步驟80 :從ip網路13接收前述(4)之第二IP電話發 18 200816722 話訊號; 步驟81 :決定是否准許IP電話裝置u與正電話裝 置15建立電話連線,若准許則跳至步驟 83,若不准許則跳至步驟82; 步驟82 :執行通話拒絕程序,並結束流程; 步驟83:將第二IP電話發話訊號轉碼為第三正電話 以及 步驟84 :經由IP網路13傳送第三Ip電話訊號至正 電話裝置15,以建立電話連線。 步驟81中,係依據第二ip電話發話訊號是否包含正 電活裝置11之特疋識別碼’決定是否准許ip電話裝詈1】 與IP電話裝置15建立電話連線。 以上所述係利用較佳實施例詳細說明本發明,而非限 制本發明之範圍。凡熟知此類技藝人士皆能明瞭,可根據 以上實施例之揭示而做出諸多可能變化,仍不脫離本發明 之精神和範圍。 【圖式簡單說明】 第1圖係本發明之電話系統之第一實施例的架構圖。 第2圖係本發明之電話系統之第二實施例的架構圖。 第3圖係本發明之電話系統之第三實施例的架構圖。 第4圖係第1圖之電話閘道器之一較佳實施例的方塊圖。 第5圖係執行接收pstn網路來話之閘道功能之一實施例 的流程圖。 200816722 第6圖係執行接收IP網路來話之閘道功能之一實施例的 流程圖。 第7圖係執行經由PSTN網路發話至一受話端裝置之閘道 功能之一實施例的流程圖。 第8圖係執行經由ip網路發話至另一正電話裝置之閘道 功能之一實施例的流程圖。 【主要元件符號說明】 11、15、31 ·· IP電話裝置 121 : PSTN 介面 123 :轉碼單元 125 ··通話拒絕處理單元 127 : IP介面 Μ ·β PSTN 網路 36 :定位伺服器 10、20、30 :電話系統 12、22、32:電話閘道器 122 :定位單元 124 :認證單元 126 :延伸功能單元 13 : IP網路 24 : PLMN 網路 361 :對應表 50〜56 :執行接收PSTN網路來話之閘道功能之一實施 例流程 60〜66 ··執行接收IP網路來話之閘道功能之一實施例流 程 70〜74 ··執行經由PSTN網路發話至一受話端裝置之閘 道功能之一實施例流程 80〜84 :執行經由IP網路發話至另一 ip電話裝置之閘 道功能之一實施例流程 20_·ΙΡ ’ _ VgIP)'s service can make Ip calls abroad, and use the Internet to communicate with the domestic callers who use IP phones to save money. However, if the domestic caller does not have an IP phone or is inconvenient to use the phone, the foreign caller still needs to call the domestic caller's mobile phone or fixed line phone. At this time, if foreign callers want to use IP phones and domestic calls, they need to pay for IP phone operators' services. For example, take the current popular IP phone Skype as an example. If you want to use skype from abroad, If you want to return to the domestic mobile phone or fixed line phone, you need to apply for SkypeOut service. If you want to receive a domestic mobile phone or fixed-line phone call from abroad, you need to apply for Skypein service. In this way, the skype operator service fee is still payable. In addition, when we are abroad, if the other party calls the fixed-line telephone of our domestic home or company, and cannot transfer to the IP 200816722 telephone used by us abroad, it will result in missed calls. SUMMARY OF THE INVENTION In view of the present invention, it is an object of the present invention to provide a telephony gateway, a telephone paper containing the same, and a green 'can be used to perform ^= function, and When the other party is not an IP phone, there is no need to pay the monthly civil service fee to the ip phone operator. Another object of the present invention is to provide a telephone gateway device, a telephone button including the same, and Wei Xing. The method of the gateway Wei will call the other party to our _ phone or mobile phone but we have no secret phone call: IP network (such as the Internet) to transfer to our IP phone. So, when I In any part of the world, as long as the IP telephone device can be connected to the IP network, the telephone can be omitted. In one embodiment of the invention, a telephone gateway is disclosed, which is connected to the electrical contact. Road and - Ip Qing 0 The telephone rider includes: The telephone network side 'corresponds to a telephone number and receives an incoming call from the telephone network (in_ing (four) signal), wherein the destination telephone number of the incoming signal is (4); - the fixed material, the touch _ ιρ telephone device is Connected to the IP network, wherein the mobile phone device has a first IP address and supports the first JP phone protocol; the transcoding (Du Fu ^ (4)) unit is connected to the telephone network interface and the positioning unit And when the IP f 4 device is connected to the ip _, the wire is deducted into a first IP phone signal conforming to the first telephone agreement, wherein the first ιρ telephone signal is Π> - an Ip address; and an ιρ interface, 200816722 is connected to the cryptographic unit touch positioning unit, the interface corresponds to the second positive address 'and transmits the first IP telephone signal to the ip telephone device via the 1P, the network To establish a telephone connection. In another embodiment of the present invention, a telephone system is disclosed that includes a 1P telephone device connected to an IP network and having a first IP address 'supporting the first An IP telephony protocol; and a telephone gateway connected between a telephone network and the IP network, corresponding to a telephone number and a second IP address, and received from one of the telephone networks The code is the first IP phone signal that complies with the first IP telephony agreement. And transmitting to the IP telephone device via the IP network to establish a telephone connection, wherein the destination telephone number of the incoming signal is the telephone number, and the destination IP address of the first IP telephone signal is the first IP address. In another embodiment of the present invention, a method for performing a telephone gateway function is disclosed for a telephone gateway connected between a telephone network and an IP network, and Corresponding to a telephone number and a second IP address. The method comprises the steps of: receiving a message from the telephone network saying that the destination telephone number of the incoming signal is the telephone number, determining an IP telephone device. Whether it is connected to the IP network, wherein the IP telephone device has a first IP address and supports the first IP telephone protocol; when the IP telephone device is connected to the IP network, the incoming signal is transcoded to ^ a first IP telephone signal of the first IP telephone protocol, wherein the destination IP address of the first IP telephone signal is a first IP address; and the first IP telephone signal is transmitted to the IP telephone device via the reverse network, To establish ~ phone connection200816722 [Embodiment] Fig. 1 is a block diagram showing a first embodiment of a telephone system of the present invention. As shown, the telephone system 10 includes an IP telephone set 11 and a telephone gateway 12. The IP telephone device 11 is connected to the telephone gateway 12 via an IP network 13 and has a first IP address to support the first VoIP protocol. IP network 13 refers to any network that uses ip addresses to address and communicate, such as the Internet or a local area network (LAN) using IP addresses. The first IP telephony agreement is not limited and can generally refer to any communication protocol that can control the transmission of voice signals on the official IP network, such as the Session Initiati () n Protocol (SIP) and H, which have become the industry standard. .323 'Or an agreement developed by other operators. In addition, the IP telephone device 11 can be any type of electronic device as long as it can be connected to the IP network 13 in a wired or wireless manner and supports the first IP telephone protocol. For example, portable devices (mobile phones, notebook computers, personal digital assistants (PDAs), etc.), personal computers (PCs), traditional telephones with integrated access devices (IAD) (9), fine old Telephone, referred to as POT) and so on. The telephone gateway 12 is connected to a public telephone exchange network (public switehed teleph (nenetwwk, PSTN for short) 14) and the IP network 13, and corresponds to a pSTN telephone number and an HP 4 address. The telephone gateway 12 can execute the following inter-channel power cycles b. Receiving incoming calls from the PSTN network 14, receiving incoming calls from the ip network η, and transmitting via the PSTN network 14 to the receiving device (not shown) And speaking via the IP network 13 to another IP telephone device 15. The following is a description of the implementation of each gateway function: (1) Receiving incoming PSTN network 14: When the telephone gateway 12 receives an incoming signal from the PSTN network 14, its destination telephone number is a telephone gate. When the PSTN telephone number of the router 12 is transcoded, it will be transcoded to the first IP telephone protocol--the jp telephone signal (the destination IP address is the first IP address of the IP telephone device 11), and is transmitted via IP. The network 13 is transmitted to the IP telephone device 11' to establish a telephone connection. (2) Receiving an incoming IP network π: When the telephone gateway 12&IP network 13 receives an IP telephone incoming signal (the destination IP address is the second IP address of the telephone gateway 12) When it is transcoded to the second IP telephone signal conforming to the first ιρ telephone agreement (the destination address of which is the first address of the first address) is transmitted to the first IP telephone device n via the IP network 13 to Establish a telephone connection. In other words, when the telephone gateway 12 is located in the home or office of the user, the pSTN network 14 or the IP network can be used by the gateway functions of the above (1) and (2). The call is transferred to the Ip telephone device u. Therefore, when the user is not at home (four), no matter where he is located (domestic or foreign), as long as he can connect to the lp network 13 via the IP telephone device, he can receive the original call to his home or The office phone does not have to pay for any calls. In addition, the telephone gateway!! 12 can also be connected to the conventional telephone device. When the user is at home or in the office, the traditional telephone device can be directly used to answer the incoming call of the PSTN network 14 without being transferred. In a first preferred embodiment, when the IP telephone device u receives the aforementioned first or second IP telephone signal, an authentication action is performed to determine whether 200816722 is permitted to establish a telephone connection. The authentication action is used to confirm that the first or first 1p telephone signal was sent by the telephone gateway 12 to filter incoming sources of unknown origin. The implementation manner of the authentication action is not limited. For example, it may be authenticated by determining whether the first or second IP telephone signal includes a specific identification code of the telephone gateway 12, and if so, permitting the establishment of a telephone connection, if not Permitted. (3) Sending a message to the receiving terminal device via the PSTN network 14 · When the telephone gateway device 12 receives the first telephone call signal from the IP network 13 from the IP network 13 (its destination IP address and destination telephone number) When the second address of the telephone gateway H 12 and the telephone number of the called terminal are respectively, the first IP telephone call signal is transcoded into a pSTN signal, and transmitted to the telephone number of the called terminal via the PSTN network η. The corresponding terminating device is connected to establish a telephone connection. Please note that since the PSTN network 14 has a - land mobile network 7 such as lan (j mobile network, PL_) interconnection, the terminating device can be a mobile phone in addition to the PSTN telephone device. (4) Sending via ip network 丨3 to ιρ telephone device 15: Here Ip telephone device 15 corresponds to an IP phone code (Note: IP phone does not use the number to identify, so here the code calls to cover each lion Identification,) 'and support the second 1P telephone agreement. The second IP telephony agreement is unlimited and can refer to any communication protocol that can control the transmission of voice signals over a managed IP network. When the telephone gateway 12 receives the second IP telephone call signal sent by the IP telephone device from the IP network 13, the destination address and the destination telephone code are respectively the second IP address of the telephone gateway 12 and When the IP phone 200816722 calls the IP phone code of 15), the second IP phone call signal is transcoded into a third IP phone signal conforming to the second IP phone protocol, and transmitted to the IP phone device 15 via the IP network 13. To establish a telephone connection. In other words, when the telephone gateway 12 is located in the home of the user or in the middle of the office, the gateway functions of the above (3) and (4) are used, regardless of whether the user is absent from the office or the office. Where it is located, as long as he can connect to the IP network 13 by means of the telephone set 11, it can be dialed through the telephone gateway 12 to other PSTN telephone devices, mobile phones or IP telephone devices. When the user is located abroad and dialed to the country, since the user first connects to the domestic telephone gateway 12 via the IP network 13, the user only needs to pay the domestic part of the call. Can save the international part of the phone bill. In a second preferred embodiment, when the telephone gateway 12 receives the first or first IP live voice signal, an authentication action is performed to determine whether the IP telephone device 11 and the aforementioned call end are permitted. The device or IP telephone device 15 establishes an electrical connection. The authentication action is for confirming that the first or second IP telephone call signal is sent by the telephone device U to prevent other unauthenticated IP telephone devices from stealing the telephone gateway 12 to make a call. The implementation manner of the authentication action is not limited. For example, it may be authenticated by determining whether the first or second IP telephone call signal includes a specific identification code of the IP telephone device 11, and if so, permission to establish a telephone connection, if not Permitted. Figure 2 is a block diagram of a second embodiment of the telephone system of the present invention, which is different from the main one of Figure 1 in that the telephone gateway 22 included in the telephone system 2G is connected to the The network 13 12 200816722 voice number (balanced 22 _ should be the first) in the gateway functions (1) and (3), respectively, is changed to the incoming PLMN network 24 incoming call and the voice via the pLMN network 24 - Received positions, (2) and (4) are not changed. Upon receipt of the incoming PLMN network 24, the telephone gateway 22 receives the -PL_ incoming signal from the aperture network 24 (the destination telephone number is the mobile telephone of the telephone gateway 11 22) and will The code is transcoded to the fine IP phone number (the destination IP address of which is the first IP address) conforming to the first IP telephony protocol, and transmitted to the IP telephone device 11 via the IP network 13 to establish a telephone connection. In the _ PLMN Qing 24 Wei to the green end device, the telephone gateway 22 receives the first ip telephone call signal sent by the ιρ telephone device u from the ip network 13 (the destination ip address and the destination telephone number are respectively Transmitting the third IP address and a receiving telephone number to a PLMN signal, and transmitting the signal to the receiving device corresponding to the telephone number of the receiving terminal via the pLMN network 24 to establish A telephone connection. Figure 3 is a block diagram of a third embodiment of the telephone system of the present invention. The main difference from the first embodiment is that the telephone system 3 includes a connection in addition to the telephone gateway 32 and the IP telephone device 31. The location server 36 of the ip network 13. In this third embodiment, the IP telephone device 31 and the telephone gateway 32 correspond to the first and second IP addresses, respectively. Before the IP telephone device 31 and the telephone gateway 32 communicate, they need to know each other's IP address. When both parties are fixed IP addresses, the fixed IP address of the other party can be pre-recorded to us in order to communicate with the other party 13 200816722. However, if any of the parties is a floating IP address, another convenience is difficult to pre-record as a fixed IP address. Therefore, the function of the positioning server 36 is that when the first and second scary addresses are >, one of them is a floating IP address, when the Ip telephone device is communicating with the telephone gateway 32, The party with the floating address can be located by the other party, that is, the other party can know the floating IP address. The footer server 36 includes a correspondence table 361, which can record a correspondence between a specific identification code having one of the floating jp addresses and the floating IP bit, so that the other party can record the specific identification code in advance. According to the specific _ code query for the wire 361, the chowder address is known. For example, when the first IP address of the IP telephone device 3 is a floating IP address, the IP telephone device 31 registers with the positioning server 36 to record the correspondence table 361 with the first IP address and the IP telephone device. The correspondence between the first identification codes of 31. The first identification code is pre-recorded in the telephone gateway 32, and the telephone gateway 32 can query the correspondence table 361' according to the first identification code to learn the first IP address. For another example, when the second IP address of the telephone gateway 32 is a floating IP address, the telephone gateway 32 registers with the positioning server 36 so that the correspondence table 361 records the second address and the telephone number. The corresponding 嶋 between the second coders of the gate H 32 . Similarly, the second identification code is pre-recorded in the IP telephone device 31, and the IP telephone device 31 can query the correspondence table 361 according to the first identification horse to know the second ip address. The form of the foregoing first and second identification codes is not limited. For example, a media access address (MAC address) which is provided by the parent IP network device can be used as the identification code. 200816722 Figure 4 is a block diagram of a preferred embodiment of the telephone gateway 12 of Figure 1. For example, in the fourth riding, the switch 12 includes a -pstn interface m, a clamping unit 122, a transcoding unit 123, an authentication unit 124/-call rejection (four), and a processing unit (2).疋 126 and a 1P interface 127. The 'PSTN interface 121 is connected to the PSTM network 14 and corresponds to the PSTN telephone number of the telephone gateway 12; the positioning unit 122 is used to determine whether the IP telephone device 11 is connected to the IP network 13' transcoding unit 123. The transcoding between the PSTN tR number and the IP telephony, or the Ip telephone signal of the different IP telephony protocol; the unit 124 is configured to perform the authentication action described in the foregoing second preferred embodiment; the call rejection processing unit 125 _ When the telephone connection cannot be established, 'execution_calling is extinguished; the Ip interface is connected to the IP network 13' and corresponds to the second 1st of the telephone gateway n12. The extension function unit 126 is configured to provide at least one of the following additional functions: call recording, display caller ID, caller ID, extension function, c〇nference call, incoming call reservation, speed dial And call information statistics. The following describes the internal operation mode of the telephone gateway 12 when performing the above-mentioned (1) to (4) gateway functions. (4) When receiving the incoming PSTN network 14, the PSTN interface 121 receives the PSTN network from the PSTN network. The pSTN incoming signal, and the transcoding unit 123, when the positioning unit 122 determines that the IP telephone device u is connected to the ιρ network 13, converts the PSTN incoming signal to the first ιρ telephone signal, and the IP interface 127 is The IP network 13 transmits the first IP telephone signal to the 1P telephone device 11 to establish a telephone connection. 15 200816722 (B) When receiving the incoming call of the IP network 13, the ip interface 127 receives the incoming IP telephone incoming signal from the IP network 13, and the transcoding unit 123 determines the IP live device 11 in the positioning early element 122. When connected to the ip network I], the IP telephone incoming signal is transcoded into the aforementioned second IP telephone signal, and the ip interface 127 transmits the second IP telephone signal to the ip telephone device 11 via the ip network 13 to Establish a telephone connection. (C) When transmitting to the receiving device via the PSTN network 14, the IP interface 127 receives the first IP telephone call signal from the IP network 13, and the transcoding unit 123 will be the first after being authenticated by the authentication unit 124. The ip phone voice signal is transcoded into the aforementioned PSTN signal, and the PSTN interface 121 transmits the PSTN signal to the terminating device via the PSTN network 14 to establish a telephone connection. (D) When the voice is sent to the IP telephone device 15 via the IP network 13, the positive == system (4) network 13 receives the second IP telephone call signal, and the code early 7G 123 after the authentication unit 124 is authenticated, the second mobile phone The outgoing signal is transcoded into a third Ip phone, and the ιρ interface = transmits a third IP telephone signal to the IP telephone device 15 via the 1P network 13 to establish a telephone connection. In the middle of the sneak - when the telephone connection cannot be established, the call is rejected. . .疋 疋 疋 — — — — — — — — 预设 预设 预设 预设 预设 预设 预设 预设 预设 预设 预设 预设 预设 预设 预设 预设 预设Figure 5 is a flow diagram of an embodiment of one of the gateway functions of the network 14 incoming call. As shown in the figure, the flow includes the following steps: Step 5: Receiving the psTN of the above (1) from the PSTN network 14 to speak, and then determining whether the IP telephone device is connected to the IP network 13, if Otherwise, skip to step 55, if yes, go to step 52; Step Magic: Transcode the PSTN incoming signal into the first telephone 5^, Step 53: Transfer the first IP telephone signal to the IP telephone via the 1P network 13. Device 11 to establish a telephone connection; Step 54: The lying telephone connection is established, if no ship to step 55 'If yes, then go to step 56; Step 55: Perform a call rejection procedure, and end the process; and Step 56: Keep your phone connected until the call ends. Figure 6 is a flow diagram of one of the gateway functions for receiving an incoming IP network. As shown in the sixth _, this process contains the following steps... Step 6〇 . Receiving the IP phone of the above (2) from the Ρ network 13 to receive the call, step 61 = disconnecting the 1P telephone device 11 is connected to the IP network 13, if otherwise, skipping to step 65, if yes, skip to step 62; Transcoding the 1P telephone incoming signal into a second IP telephone signal; Step 63: The second 11> telephone signal is transmitted to the IP telephone device n via the IP network 13 to establish a telephone connection; 17 200816722 Step 64: Determine whether the telephone connection is established, otherwise skip to step 65 'If yes Go to step 66; Step 65: Perform a call rejection procedure and end the process; and Step 66: Maintain the phone connection until the call ends. Figure 7 is a flow diagram of one embodiment of a gateway function for performing a call to a terminating device via the PSTN network 14. As shown in FIG. 7, the flow includes the following steps: Step 70: Receive the first IP phone call signal of (3) above from the IP network 13; Step 71: Decide whether to permit the IP phone device u to establish a phone connection with the caller device If yes, go to step 73, if not, go to step 72; Step 72: Perform call rejection procedure, and end the process; Step 73: Transcode the first IP phone call signal into pSTN signal; and Step 74 : transmitting the pSTN signal to the terminating device via the PSTN network 14 to establish a telephone connection. In step 71, it is determined whether the IP telephone device u is allowed to establish a telephone connection with the called terminal device according to whether the first IP telephone call signal includes the specific identification code of the telephone device 11. Figure 8 is a flow diagram of one embodiment of a gateway function for performing a call to the IP telephone device μ via the ip network 13. As shown in FIG. 8, the flow includes the following steps: Step 80: Receive the second IP telephone call 18 200816722 voice signal of the foregoing (4) from the ip network 13; Step 81: Determine whether to permit the IP telephone device u and the positive telephone The device 15 establishes a telephone connection, and if yes, skips to step 83, if not, then skips to step 82; Step 82: performs a call rejection procedure, and ends the process; Step 83: transcodes the second IP telephone transmission signal into the first The three positive telephones and step 84: transmit the third IP telephone signal to the positive telephone device 15 via the IP network 13 to establish a telephone connection. In step 81, a telephone connection is established with the IP telephone device 15 according to whether the second IP telephone call signal includes the special identification code of the positive mobile device 11 to determine whether to permit the IP telephone device to be installed. The above description of the present invention is intended to be illustrative of the preferred embodiments of the invention. It is apparent to those skilled in the art that various changes may be made without departing from the spirit and scope of the invention. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is an architectural diagram of a first embodiment of a telephone system of the present invention. Figure 2 is a block diagram of a second embodiment of the telephone system of the present invention. Figure 3 is a block diagram of a third embodiment of the telephone system of the present invention. Figure 4 is a block diagram of a preferred embodiment of the telephone gateway of Figure 1. Figure 5 is a flow diagram of one embodiment of a gateway function for receiving incoming pstn network calls. 200816722 Figure 6 is a flow diagram of one embodiment of a gateway function for receiving an incoming call to an IP network. Figure 7 is a flow diagram of one embodiment of a gateway function for performing a call to a terminating device over a PSTN network. Figure 8 is a flow diagram of one embodiment of a gateway function for performing a call to another positive telephone device over an IP network. [Description of main component symbols] 11, 15, 31 · IP telephone device 121 : PSTN interface 123 : Transcoding unit 125 · Call rejection processing unit 127 : IP interface Μ · β PSTN Network 36 : Positioning servers 10 , 20 30: telephone system 12, 22, 32: telephone gateway 122: positioning unit 124: authentication unit 126: extension function unit 13: IP network 24: PLMN network 361: correspondence table 50 to 56: implementation of receiving PSTN network One of the gateway functions of the incoming call, the flow 60~66 ··Implementing the gateway function of receiving the incoming call of the IP network, the flow of the embodiment 70~74 ··Executing the call to the receiving device via the PSTN network One of the gateway functions, an embodiment 80 to 84: one of the gateway functions for performing a call to another IP telephone device via an IP network.