Board logo

標題: 教程 OBiApps + Asterisk 成功 autostart ,音質良好 (updated) [打印本頁]

作者: ckleea    時間: 2011-4-2 10:13     標題: 教程 OBiApps + Asterisk 成功 autostart ,音質良好 (updated)

本帖最後由 ckleea 於 2011-4-7 21:07 編輯

My Linux server can now autostart obiapps. Asterisk connects to it automatically after booting.

Tricks are shown below.
作者: 角色    時間: 2011-4-2 10:18

Looking forward to seeing your report very soon!
作者: ckleea    時間: 2011-4-3 14:33

本帖最後由 ckleea 於 2011-4-11 20:25 編輯

To have autostart OBiapps in Linux, you need the following
1. a working linux server
2. install vncserver and have it start upon booting.
e.g. chkconfig on vncserver
3. I am using root to start asterisk and hence, the obiapps should be started by root
There should be other way to start as different users, but I don't know the answer yet.
4. in your favorite x-windows environment, I like gnome. You need to install wine.
In Centos 5.5, yum install wine should do
5. copy the Obiappsetup application from windows PC or download directly from the internet
6. use wine to install obiapp. Using the default program position should be ok
7. use wine to run obiapp the first time to enter your login information.
screenshot.03-04-2011 14.13.17.jpg

8. when login, you can see your status in ObiTalk
screenshot.03-04-2011 14.14.44.jpg

9. in sip.conf, set your asterisk to register obiapps as sip client.
screenshot.03-04-2011 14.14.31.jpg

10. to autostart obiapps, linux x-windows, wine.
use vnc to connect to your root gnome.
locate the session from here

screenshot.03-04-2011 14.15.22.jpg

add the following to the startup program
wine "C:\program files\obihai\obiapp.exe"

screenshot.03-04-2011 14.15.45.jpg

Now you should have your obiapp running automatically after your linux server boots up.

Always check with asterisk to see if you are registered.


If you don't want vnc and gnome, consider to install Xvfb

yum install Xvfb xorg-x11-fonts*

Xvfb :4 -screen 0 800x600x24&
export DISPLAY=localhost:4.0
DISPLAY=localhost:4.0 wine "C:\\Program Files\\OBIHAI\\obiapp.exe" > /dev/null

Or create a scripts to run it as below

#!/bin/bash
Xvfb :4 -screen 0 800x600x24&
export DISPLAY=localhost:4.0 &
DISPLAY=localhost:4.0 wine "C:\\Program Files\\OBIHAI\\obiapp.exe" > /dev/null
sleep 300
asterisk -rx "reload"


Remember sometimes, it takes a while for wine obiapps to start up. Asterisk may show failure to register, timeout or rejected.
Do a "asterisk -rx reload" will update the status

圖片附件: screenshot.03-04-2011 14.13.17.jpg (2011-4-3 14:26, 324.48 KB) / 下載次數 783
http://www.telecom-cafe.com/forum/attachment.php?aid=643&k=885f3af677fd7ddca32141c707fb24ae&t=1714381502&sid=gLQzGT



圖片附件: screenshot.03-04-2011 14.14.31.jpg (2011-4-3 14:27, 19.98 KB) / 下載次數 821
http://www.telecom-cafe.com/forum/attachment.php?aid=644&k=e64ca6ed5f7753adac230d0b02757807&t=1714381502&sid=gLQzGT



圖片附件: screenshot.03-04-2011 14.14.44.jpg (2011-4-3 14:28, 27.6 KB) / 下載次數 802
http://www.telecom-cafe.com/forum/attachment.php?aid=645&k=8705d33d08062a4ecd45c5169786cba8&t=1714381502&sid=gLQzGT



圖片附件: screenshot.03-04-2011 14.15.22.jpg (2011-4-3 14:31, 305.39 KB) / 下載次數 771
http://www.telecom-cafe.com/forum/attachment.php?aid=646&k=46bf6f7a6ad425c59be4b9a8875e8bb3&t=1714381502&sid=gLQzGT



圖片附件: screenshot.03-04-2011 14.15.45.jpg (2011-4-3 14:32, 93.54 KB) / 下載次數 849
http://www.telecom-cafe.com/forum/attachment.php?aid=647&k=a400545303f53efdce8441a4159c6aef&t=1714381502&sid=gLQzGT


作者: ckleea    時間: 2011-4-3 14:44

sip show registry as below

screenshot.03-04-2011 14.28.38.jpg

sip show peers as below

screenshot.3.jpg

Please note that while your asterisk registers the Obiapp soft client as the usual lan IP, but in the outgoing context you need to have another IP address. I.e. what I described before to use webmin to create a virtual network interface for your linux server.

Remark: in webmin, you need to create as below

screenshot.4.jpg

圖片附件: screenshot.03-04-2011 14.28.38.jpg (2011-4-3 14:40, 23.16 KB) / 下載次數 801
http://www.telecom-cafe.com/forum/attachment.php?aid=648&k=0cbcf33dca4250013b4afed15c3aa5d4&t=1714381502&sid=gLQzGT



圖片附件: screenshot.3.jpg (2011-4-3 14:40, 5.76 KB) / 下載次數 835
http://www.telecom-cafe.com/forum/attachment.php?aid=649&k=33192026e8c788ace1929725bc4411bd&t=1714381502&sid=gLQzGT



圖片附件: screenshot.4.jpg (2011-4-3 14:44, 50.08 KB) / 下載次數 794
http://www.telecom-cafe.com/forum/attachment.php?aid=650&k=32931263dd327c5aee6635f342645648&t=1714381502&sid=gLQzGT


作者: ckleea    時間: 2011-4-3 14:47

How to set up your asterisk sip.conf and extensions.conf can be found here

http://www.telecom-cafe.com/foru ... &extra=page%3D3
作者: bubblestar    時間: 2011-4-3 15:22

Great illustrated tutorial with detailed explanation.  Thanks ckleea for so generous sharing such that we can have an easy way to get the OPiAPP work in Linux Server with Asterisk.
作者: ckleea    時間: 2011-4-3 15:36

My pleasure. This is especially for those with a linux server.

I think OBi110 should be placed at place where people not reading understand ATA/VOIP. They pick up the phone and press a few speed dial to connect their friends and relatives.

For us, with an asterisk server or IP01, we should work to integrate into our system.
作者: 角色    時間: 2011-4-3 17:40

How is the performance?

YH
作者: ckleea    時間: 2011-4-3 17:41

In my previous post, I use mobile phone to dial in and just like using asterisk server. Quality is very good.
作者: bubblestar    時間: 2011-4-4 09:56

OPiAPP can autostart with Linux Server boot-up now.  However, it goes back to use its own default sip port 5060 to register every time I reboot the machine.  I still have to manually change it to other port (say 15062) to match my configuration in sip.conf.
作者: ckleea    時間: 2011-4-4 10:01

本帖最後由 ckleea 於 2011-4-4 10:36 編輯

回復 10# bubblestar


No. Mine is always correct in the setting. No idea why you can't but there is thread in forum mentioning this.

You may reinstall the OBiApps again.
作者: bubblestar    時間: 2011-4-4 10:17

Don't get me wrong!  I'm not challenging the correctness to your great tutorial.  It is very useful indeed.  The sound quality is very good and it works smoothly during the course of installation.

I just want to see if OBiApp can remember my port setting changed to the one other than its original port 5060.

I'll try again.  Thanks
作者: ckleea    時間: 2011-4-4 10:36

回復 12# bubblestar


    Sorry. it should be my Obiapps remembers the correct setting.
作者: bubblestar    時間: 2011-4-4 20:45

I did it after 3 more trials to re-install the OBiApp.  It finally remembers my sip ports with unknown reasons.  Above all, it works now.  Try and try and try is the best way to resolve the problem.

Thanks again for ckleea c-hing's tutorial.  For me, the sound quality from OBiApp is of no much difference from that of OBi110.  A very good learning and usage experience.
作者: 角色    時間: 2011-4-4 21:36

I just asked bubblestar CHing for calling me to evalue performance of the Linux + OBiAPP by calling my OBi110. The performance was very good that I did not find any difference between the OBi110 and Linux + OBiAPP. The following figure shows the call status of my OBi110.

0019.gif


YH

圖片附件: 0019.gif (2011-4-4 21:36, 16.56 KB) / 下載次數 806
http://www.telecom-cafe.com/forum/attachment.php?aid=655&k=d8332efceba9c6d10f30c4b47eb40151&t=1714381502&sid=gLQzGT


作者: ckleea    時間: 2011-4-4 22:00

Enjoy your integration. You now have different ways to deal with VOIP.
作者: bubblestar    時間: 2011-4-4 22:59

I highly recommend this thread to be put at the top of the OBi sub-section.  It not only teaches us how to integrate OBiApp in Asterisk environment, it also enpowers the OBiApp in a way that outperforms the stand-alone OBi110.  Added values and Asterisk resources count.
作者: bubblestar    時間: 2011-4-6 17:52

I just notice that when dialing in from Mobile or via internal OBi110 to my OBiAPP 290-XXX-XXX, it uses random Asterisk extension number as the caller ID, which is shown on the IP phone screen.  Strange.
作者: 角色    時間: 2011-4-6 20:12

I believe we have to deliberately set the outbound caller ID.

YH
作者: ckleea    時間: 2011-4-7 21:08

See my updated instruction to eliminate the need for vnc and gnome
作者: ckleea    時間: 2011-4-11 08:11

Updated on 11 april, need some more testing
Autorun not always work by scripts
作者: 楊威利@HGC    時間: 2011-4-11 10:24

sorry, 請教一下OBi110 加多隻Asterisk 有咩用架?

唔好意思
作者: ckleea    時間: 2011-4-11 10:48

你用asterisk 做中心,然後配合obi110 做各樣功能
作者: 楊威利@HGC    時間: 2011-4-11 12:56

我有部T42 有埋build-in modem, 咁一條電話線, 插OBi110 定Asterisk?

THANKS
作者: 雯雯    時間: 2011-4-11 13:03

回復 24# 楊威利@HGC

我記得以前在HKEPC和bubblestar兄跟某位師兄討論過這個問題, 只有一小部分modem可以用來做FXO interface, 建議還是插回OBi110比較好!
作者: ckleea    時間: 2011-4-11 13:48

對大部份soft modem都唔可以對應FXO,只有個別X100p。
作者: 楊威利@HGC    時間: 2011-4-11 13:59

咁要諗諗部t42 有咩用
作者: 雯雯    時間: 2011-4-11 14:02

回復 27# 楊威利@HGC

你可以照樣用部T42來起Asterisk Server, 不過用部OBi110來做Asterisk的FXO interface罷了!
作者: 楊威利@HGC    時間: 2011-4-11 14:19

哦 , 都係一條電話線搞掂?
作者: ckleea    時間: 2011-4-11 14:22

對,但用notebook做server唔係咁好。
作者: 楊威利@HGC    時間: 2011-4-11 14:44

反正擺到冇用, 原本諗住都係用黎做動物機
作者: ckleea    時間: 2011-4-11 15:03

可以試下裝 AsteriskNOW,玩下,不過部分功能需要自己 compile.
作者: ckleea    時間: 2011-4-11 21:39

the set up should be ok now.
作者: 角色    時間: 2011-10-9 09:01

现在我的问题,我只有X Window,而没有Desktop,怎样安装WINE?

还有yum list | grep wine 没有出现。

角色
作者: 角色    時間: 2011-10-9 15:01

现在用wine explorer,安装到OBiapp.exe,

10-9-2011 2-51-30 PM.png

角色

圖片附件: 10-9-2011 2-51-30 PM.png (2011-10-9 15:01, 10.01 KB) / 下載次數 570
http://www.telecom-cafe.com/forum/attachment.php?aid=950&k=8cdcc448168c6e3e79798a4a5437907b&t=1714381502&sid=gLQzGT


作者: 角色    時間: 2011-10-9 21:40

本帖最後由 角色 於 2011-10-10 00:27 編輯

After you have installed the OBiApp.exe, then there is a pop-up window which asks you to the OBiHai login e-mail address and password. Right click the small window, a small window comes out. You select the "Properties", a very big window comes out.

10-9-2011 9-30-06 PM.png

YH

圖片附件: 10-9-2011 9-30-06 PM.png (2011-10-10 00:27, 12.33 KB) / 下載次數 562
http://www.telecom-cafe.com/forum/attachment.php?aid=954&k=22c4294531c6096c6d302cee3a3641ec&t=1714381502&sid=gLQzGT


作者: 角色    時間: 2011-10-9 21:49

回復 3# ckleea

What is the meaning for the word ":4" in the above thread?

YH
作者: 角色    時間: 2011-10-9 21:58

回復 3# ckleea

What is the name of the startup script and where do we place such that it could execute automatically?

YH
作者: ckleea    時間: 2011-10-9 21:59

本帖最後由 ckleea 於 2011-10-9 22:01 編輯

Do you have a file under /root/.config/autostart, called wine.desktop

It has the followings

[Desktop Entry]
Name=No name
Encoding=UTF-8
Version=1.0
Exec=wine "c:\\Program Files\\OBIHAI\\obiapp.exe"
X-GNOME-Autostart-enabled=true


I am not sure if plain x windows how to autostart
作者: ckleea    時間: 2011-10-9 22:01

回復 38# 角色


    :4 is the fourth windows desktop
作者: 雯雯    時間: 2011-12-16 14:14

http://www.playonlinux.com/




歡迎光臨 電訊茶室 (http://www.telecom-cafe.com/forum/) Powered by Discuz! 7.2