【角色茶桌】—— 怎样在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
 安装openssl複製代碼# Resource Modules > res_jabber, Channel Drivers >  chan_local chan_jingle
cd /usr/src/asterisk-complete
wget http://packages.sw.be/iksemel/iksemel-devel-1.4-1.el6.rf.i686.rpm
wget http://packages.sw.be/iksemel/iksemel-1.4-1.el6.rf.i686.rpm
rpm -Uvh iksemel-devel-1.4-1.el6.rf.i686.rpm iksemel-1.4-1.el6.rf.i686.rpm
因为只是引述bubblestar部分stript,可以有所缺漏,具体要看他的link。複製代碼yum -y install openssl-devel 
 从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安装是否正确,大家可以参考:
 =================== 之前的帖子开始 =====================複製代碼Troubleshooting
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."
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.
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:
checking for libgnutls-config
checking for libgnutls - version >= 0.1.0
were failing. The fix was to download the source for libgnuTLS and issue a recompile
A3: This works for me, during iksemel source compilation, specify the --with-gnutls option in ./configure.
./configure --with-gnutls
make
make check
make install
A4: This is my testing. Create test.c
$vi test.c
#include <stdlib.h>
#include <stdio.h>
#include <iksemel.h>
int main()
{
printf("test iks_has_tls\n\r");
if(iks_has_tls())
printf("iks_has_tls is 1\n\r");
else
printf("iks_has_tls is 0\n\r");
return 0;
}
$gcc -liksemel -o test test.c
run ./test if out iks_has_tls is 0, then gnutls need recompile .
$wget http://www.gnu.org/software/gnutls/releases/gnutls-1.7.15.tar.bz2
recompile gnutls
$tar -jxvf gnutls-1.7.15.tar.bz2
$cd gnutls-1.7.15
$./configure --prefix=/usr
$make
$make install
get iksemel from svn
$svn checkout http://svn.uludag.org.tr/projeler/iksemel iksemel
$cd iksemel
$./autogen.sh
$./configure --prefix=/usr --with-libgnutls-prefix=/usr --with-gnutls
$make
$make install
Then run ./test ,I get the right out "iks_has_tls is 1". Good luck!!
如果你对在Asterisk 1.8安装Google Voice由问题,欢迎跟帖讨论。
 
 角色
 |