返回列表 發帖

【角色茶桌】—— 怎样在Asterisk 1.8安装Google Voice呢?

本帖最後由 角色 於 2011-10-11 07:29 編輯

安装在Asterisk 1.8的Google Voice总结:

1) 要在Asterisk 1.8安装Google Voice,你需要的软件

Channel Drivers
===============
chan_gtalk (iksemel, res_jabber, openssl)
chan_jingle (iksemel, res_jabber, openssl)

Resource Modules
================
res_jabber (iksemel, openssl)

从上面的Channel Drivers和Resource Modules得知,要运行Google Voice,大家需要chan_gtalk, chan_jingle, and res_jabber,而这些东西在建立前需要的东西是iksmel和openssl。

2)怎样安装iksmel和openssl呢?

在bubblestar提供的link,可以安装到iksmel和openssl,具体指令如下:

安装iksmel
  1. # Resource Modules > res_jabber, Channel Drivers >  chan_local chan_jingle
  2. cd /usr/src/asterisk-complete
  3. wget http://packages.sw.be/iksemel/iksemel-devel-1.4-1.el6.rf.i686.rpm
  4. wget http://packages.sw.be/iksemel/iksemel-1.4-1.el6.rf.i686.rpm
  5. rpm -Uvh iksemel-devel-1.4-1.el6.rf.i686.rpm iksemel-1.4-1.el6.rf.i686.rpm
複製代碼
安装openssl
  1. yum -y install openssl-devel
複製代碼
因为只是引述bubblestar部分stript,可以有所缺漏,具体要看他的link。

从iksmel的source code安装
大家先看下面的link:
http://www.voip-info.org/wiki/view/Asterisk+Google+Talk
然后在里面的link下载:
http://code.google.com/p/iksemel/downloads/list

不要看里面的README去安装,要看http://www.voip-info.org/wiki/view/Asterisk+Google+Talk这里,因为在安装时需要明示一些switch。


下面有个test.c program,我就是用这个program去检测我的liraries安装是否正确,大家可以参考:
  1. Troubleshooting
  2. Q: I see these error message in the CLI, what is wrong? "res_jabber.c:1504 aji_recv_loop: JABBER: socket read error" and "res_jabber.c:482 aji_act_hook: gnuTLS not installed."

  3. A1: I had installed iksemel (XML parsing library for Jabber) from an rpm package, and i guess it had been compiled without GNUTLS being included. i wrote a test program calling a gnutls function call and it failed. So I downloaded iksemel source, compiled it and ran the same test program again, and this time it returned the int value from the function call that i was expecting. Now, "jabber show connected" shows the google talk account as connected.

  4. A2: I was getting a similar problem on ubuntu. It keep saying GnuTLS not installed. After much debugging, we checked the config.log for iksemel-1.2 and observed that the following:
  5. checking for libgnutls-config
  6. checking for libgnutls - version >= 0.1.0
  7. were failing. The fix was to download the source for libgnuTLS and issue a recompile

  8. A3: This works for me, during iksemel source compilation, specify the --with-gnutls option in ./configure.

  9. ./configure --with-gnutls
  10. make
  11. make check
  12. make install

  13. A4: This is my testing. Create test.c
  14. $vi test.c

  15. #include <stdlib.h>
  16. #include <stdio.h>
  17. #include <iksemel.h>
  18. int main()
  19. {
  20. printf("test iks_has_tls\n\r");
  21. if(iks_has_tls())
  22. printf("iks_has_tls is 1\n\r");
  23. else
  24. printf("iks_has_tls is 0\n\r");
  25. return 0;
  26. }

  27. $gcc -liksemel -o test test.c
  28. run ./test if out iks_has_tls is 0, then gnutls need recompile .

  29. $wget http://www.gnu.org/software/gnutls/releases/gnutls-1.7.15.tar.bz2
  30. recompile gnutls
  31. $tar -jxvf gnutls-1.7.15.tar.bz2
  32. $cd gnutls-1.7.15
  33. $./configure --prefix=/usr
  34. $make
  35. $make install

  36. get iksemel from svn
  37. $svn checkout http://svn.uludag.org.tr/projeler/iksemel iksemel
  38. $cd iksemel
  39. $./autogen.sh
  40. $./configure --prefix=/usr --with-libgnutls-prefix=/usr --with-gnutls
  41. $make
  42. $make install

  43. Then run ./test ,I get the right out "iks_has_tls is 1". Good luck!!
複製代碼
=================== 之前的帖子开始 =====================
如果你对在Asterisk 1.8安装Google Voice由问题,欢迎跟帖讨论。

角色

TOP

回復 2# 角色

check for your have the following modules - chan_gtalk, res_jabber and chan_jingle

Then follow the links to add the corresponding config
How many GV accounts you have? Better to have several more to test.
You can use your GV linked to OBi110 to call asterisk server

TOP

本帖最後由 角色 於 2011-9-23 23:24 編輯

Thanks for your advice.

I have three GV accounts and only one GV is installed in my OBi110 device.

YH

TOP

回復 4# 角色

Good, you can test out incoming and outgoing calls

TOP

Do I need to re-compile the Asterisk source code to get the GV function working?

YH

TOP

If you have installed all the modules mentioned by ckleea C-hing before compilation of Asterisk, it is not necessary to re-compile again.

TOP

I am able to install libssl-dev which does not exist using yum. Therefore I am not able to enable chan_gtalk and res_jabber. If you know how to install Asterisk 1.8, please let me know.

YH

TOP

A bit surprised that your chan_gtalk and res_jabber not enable. They are required.

Did you find them in  /usr/lib/asterisk/modules?

See my post before
http://www.telecom-cafe.com/foru ... ight=asterisk%2B1.8

TOP

The problem comes from the missing iksemel library, which can be otainable from the following link:

http://code.google.com/p/iksemel/source/checkout

Procedure:

Step 1:
command: cd /usr/src/asterisk/asterisk-complete

Step 2:
# Non-members may check out a read-only working copy anonymously over HTTP.
command: svn checkout http://iksemel.googlecode.com/svn/trunk/ iksemel-read-only

Step 3:
Read the README and follow the instruction

Step 4:
Change to Asterisk directory, run ./configure command, and make menuselect. You are able to see the chan_gtalk and res_jabber

YH

TOP

回復 10# 角色


    You missed out the installation of this library in the previous installation. I think bubblestar script did include.

TOP

You are right! I did not follow bubblestar script exactly.
  1. # Resource Modules > res_jabber, Channel Drivers >  chan_local chan_jingle
  2. cd /usr/src/asterisk-complete
  3. wget http://packages.sw.be/iksemel/iksemel-devel-1.4-1.el6.rf.i686.rpm
  4. wget http://packages.sw.be/iksemel/iksemel-1.4-1.el6.rf.i686.rpm
  5. rpm -Uvh iksemel-devel-1.4-1.el6.rf.i686.rpm iksemel-1.4-1.el6.rf.i686.rpm
複製代碼
Now the problem is fixed.

YH

TOP

回復 12# 角色

Bubblestar script is the most complete I have seen.

TOP

回復 4# 角色


    Create few more for tests. You need several
one for Obi110
one for asterisk
one for your ipad
one for your testing

If you use gmail to call, you need another account/

Once you are in this asterisk 1.8, you need to carefully think about which account to put into where

TOP

本帖最後由 角色 於 2011-9-24 23:50 編輯

Finally I am able to configure my Asterisk box to get the GV outbound call working.

I just followed the following thread to make it work.
http://www.voip-info.org/wiki/view/Asterisk+Google+Talk



YH

TOP

返回列表