Was this page helpful?

Elastix 整合 GTalk

    前言

    要使 Elastix 支援 GTalk 實在是不簡單,雖然 Asterisk 語音交換平台自  1.4.x 起已內建可支援 GTalk,不過 Elastix 釋出的版本並未包含所需要的模組,所以需要作手動安裝,並且還得重新編譯過 Asterisk 才會產生需要的模組,過程有些複雜,看過 Trixbox Forum 相關文章,似乎 Trixbox 新版已包含了那些模組。

    下載安裝 iksemel

    安裝相依性套件

    reference to undefined name 'syntax' Exception of type 'MindTouch.Deki.Script.Runtime.DekiScriptUndefinedNameException' was thrown. (click for details)

    下載 iksemel

    reference to undefined name 'syntax' Exception of type 'MindTouch.Deki.Script.Runtime.DekiScriptUndefinedNameException' was thrown. (click for details)

    或者,不想安裝 SVN,可以直接從另一網站下載

    reference to undefined name 'syntax' Exception of type 'MindTouch.Deki.Script.Runtime.DekiScriptUndefinedNameException' was thrown. (click for details)

    重新編譯 asterisk

    Updated: SRPM 位址變更為 http://repo.elastix.org/elastix/index.php?dir=

    reference to undefined name 'syntax' Exception of type 'MindTouch.Deki.Script.Runtime.DekiScriptUndefinedNameException' was thrown. (click for details)

    重新編譯 source rpm, 然後強制安裝編譯檔。

    reference to undefined name 'syntax' Exception of type 'MindTouch.Deki.Script.Runtime.DekiScriptUndefinedNameException' was thrown. (click for details)
    for Elastix 2.0)

    新增 /etc/yu.conf.d/epel.repo

    [epel]
    name=Extra Packages for Enterprise Linux 5 - $basearch
    #baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch
    mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch
    failovermethod=priority
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
    
    [epel-debuginfo]
    name=Extra Packages for Enterprise Linux 5 - $basearch - Debug
    #baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch/debug
    mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-debug-5&arch=$basearch
    failovermethod=priority
    enabled=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
    gpgcheck=1
    
    [epel-source]
    name=Extra Packages for Enterprise Linux 5 - $basearch - Source
    #baseurl=http://download.fedoraproject.org/pub/epel/5/SRPMS
    mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-source-5&arch=$basearch
    failovermethod=priority
    enabled=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
    gpgcheck=1
    

    關於 EPEL-Extra Packages for Enterprise Linux
    http://fedoraproject.org/wiki/EPEL?s...0000000TAyxAAG

    所需套件:

    編輯 gtalk.conf

    #vi /etc/asterisk/gtalk.conf

    [general]
    context=default         ;;Context to dump call into
    ;allowguest=yes                  ;;Allow calls from people not in
    ;externip=
    ;bindaddr=
    
    ;
    ;[guest]                 ;;special account for options on guest account
    ;disallow=all
    ;allow=ulaw
    ;context=gtalk-in 
    ;connection=asterisk
    
    [gtalk-yourfriend]
    username=yourfriend@gmail.com
    disallow=all
    allow=ulaw
    context=gtalk-in
    connection=mygtalk-yourself

    Tips:

    * 如果 Asterisk 主機是在防火牆內,必須在 general加上以下參數:
    externip=外部IP
    bindaddr=內部IP

    * buddy 的 username 是指對方的 gtalk 帳號,context 是當對方的 gtalk 撥入後會導入的 extension。

    編輯 jabber.conf

    #vi /etc/asterisk/jabber.conf

    [general]
    debug=yes                               ;;Turn on debugging by default.
    autoprune=no                            ;;Auto remove users from buddy list.
    autoregister=yes                        ;;Auto register users from buddy list.
    
    [mygtalk-yourself]
    type=client
    serverhost=talk.google.com
    username=yourself@gmail.com/Talk
    secret=yourpass
    port=5222
    priority=1
    usetls=yes
    usesasl=yes
    statusmessage="I am an Asterisk server"
    timeout=100
    ;buddy=yourbuddy@gmail.com
    

    Tips:

    * statusmessage 你的帳號在對方 gtalk 上顯示的訊息。

    撥入設定

    編輯 extensions_custom.conf

    [gtalk-in]
    exten => s,1,Answer
    exten => s,n,Wait(1)
    exten => s,n,Playback(demo-instruct)
    exten => s,n,Hangup
    

     撥入後會聽到一段語音。

    撥出設定

     

    重啟 asterisk 服務

    reference to undefined name 'syntax' Exception of type 'MindTouch.Deki.Script.Runtime.DekiScriptUndefinedNameException' was thrown. (click for details)

    驗證 GTalk 模組載入

    reference to undefined name 'syntax' Exception of type 'MindTouch.Deki.Script.Runtime.DekiScriptUndefinedNameException' was thrown. (click for details)

    成功時會出現這兩行訊息
    res_jabber.so                  AJI - Asterisk Jabber Interface          0
    chan_gtalk.so                  Gtalk Channel Driver                     0 

    F.A.Q

    1. 重啟 Asterisk 服務後,出現錯誤訊息:undefined symbol: ast_aji_get_client. Module 'res_jabber.so' was not compiled with the same compile-time options as this version of Asterisk.
    Ans: 重編Asterisk後,不要只複製 chan_gtalk.so 及 res_jabber.so,而是要執行完整安裝。

    2. 執行 yum 安裝時,出現錯誤:Error: ptlib conflicts with pwlib.  You could try using --skip-broken to work around the problem.  You could try running: package-cleanup --problems
    Ans: 先移除 ptlib 套件,再安裝一次。

    3. 用其他 gtalk 帳號撥入 Asterisk 時,有進入到 extension 但 gtalk 帳號這邊沒有任何聲音?
    Ans: 如果 Asterisk 至於防火牆內,檢查 gtalk.conf 的 bindaddr=內部ip 及 externip=外部IP
     

    Was this page helpful?
    標籤 (Edit tags)
    查看第3個(總3個)評論: 查看所有
    哈囉 小弟 照著您的方法作 但到這步驟會有問題
    rpm -Uvh --nodep /usr/src/redhat/RPMS/i386/pwlib-*.rpm

    --nodep:unknow option

    想請問怎麼解決問題
    發佈時間 17:57, 15 Jan 2009 ()
    不好意思! 手誤,已更正原文,應該是 --nodeps 。
    發佈時間 04:38, 16 Jan 2009 ()
    小弟已經成功按照您的 教學安裝 謝謝 請問一下 成功後

    要怎麼測試呢......
    發佈時間 19:24, 21 Jan 2009 ()
    查看第3個(總3個)評論: 查看所有
    您必須 登入 才能發佈評論。
    Powered by MindTouch Core