Difference between revisions of "OpenBTS: 2.8 Instalasi Real Time Asterisk"
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) |
||
Line 5: | Line 5: | ||
==Cleaning sebelum Install== | ==Cleaning sebelum Install== | ||
− | sqlite3 dan asterisk | + | Buang sqlite3 dan asterisk. Kita perlu menginstalasi ulang semuanya, |
sudo apt-get remove asterisk sqlite3 | sudo apt-get remove asterisk sqlite3 |
Revision as of 16:28, 26 April 2012
Konfigurasi Asterisk Realtime
Di bawah ini adalah beberapa langkah untuk membuat Sqlite3 dapat bekerja secara realtime di Asterisk. Ini masih dilakukan secara manual semua, belum ada script yang melakukan hal ini.
Cleaning sebelum Install
Buang sqlite3 dan asterisk. Kita perlu menginstalasi ulang semuanya,
sudo apt-get remove asterisk sqlite3 sudo apt-get autoremove
Instalasi Software yang dibutuhkan Sistem Operasi
Lakukan perintah
- Download sqlite3 dari
http://www.sqlite.org/download.html
sqlite3 harus di combile dengan terdefinisikan SQLITE_ENABLE_COLUMN_METADATA
./configure CFLAGS="-DSQLITE_ENABLE_COLUMN_METADATA -O2" make make install sudo apt-get install libsqlite3-dev sudo apt-get install erlang
If you are going to install Erlang anyway, do that now with apt-get install since it includes ODBC. Otherwise: download unixODBC. This is available from the packages branch in SVN. configure, make, make install download sqliteodbc. This is available from the packages branch in SVN. configure, make, make install
(Re)Building Asterisk
Kita perlu membuat ulang Asterisk
./configure --disable-xmldoc make menuselect
Pastikan Sqlite3 dan ODBC dipilih, terutama di "applications", "resource modules" dan "dialplan functions".
Make sure "res_realtime" is selected in "resource modules". You should NOT see "XXX" on the Sqlite3 and ODBC selections anywhere in the configuration menus. If you see "XXX" for Sqlite3 or ODBC features anywhere, that means that those packages are not installed correctly (or at least in the way that Asterisk expects to see them). Look at the config.log file for clues. If you are building a full BTS unit, you will need to install Erlang with apt-get install and that will include an ODBC installation that Asterisk likes. make make install
Yes, you need to rebuild Asterisk. And if you are going to add Speex support, this would be the time to do it. You are supposed to be able to install Speex with apt-get install, but I have not gotten that to work yet. ODBC configuration files
/etc/odbcinst.ini
[SQLite3] Description=SQLite3 ODBC Driver Driver=/usr/local/lib/libsqlite3odbc.so Setup=/usr/local/lib/libsqlite3odbc.so Threading=2
/etc/odbc.ini
[asterisk] Description=SQLite3 database Driver=SQLite3 Database=/var/lib/asterisk/sqlite3dir/sqlite3.db # optional lock timeout in milliseconds Timeout=2000
You will also need symbolic links to the files in the following places:
/usr/local/etc/odbcinst.ini /usr/local/etc/odbc.ini root/.odbcinst.ini /root/.odbc.ini ~openbts/.odbcinst.ini ~openbts/.odbc.ini
Dengan kata lain, sebagai root lakukan
cd /usr/local/etc; ln -s /etc/odbc.ini; ln -s /etc/odbcinst.ini cd /root; ln -s /etc/odbc.ini .odbc.ini; ln -s /etc/odbcinst.ini .odbcinst.ini cd ~openbts; ln -s /etc/odbc.ini .odbc.ini; ln -s /etc/odbcinst.ini .odbcinst.ini
You might also need symbolic links in the asterisk home directory if asterisk is running as user asterisk:
cd ~asterisk; ln -s /etc/odbc.ini .odbc.ini; ln -s /etc/odbcinst.ini .odbcinst.ini
The standard for configured BTS units is actually to put the real files in /usr/local/etc and then put symbolic links in:
/etc ~root
If Asterisk is running, modifying these files might make it crash. Be aware of that. Asterisk configuration files
modules.conf
Autoload must be enabled, plus make sure you're not overriding that by telling it NOT to load particular files, like res_config_odbc.so. The noload is commented out here.
[modules] autoload=yes ; noload => res_config_odbc.so
extconfig.conf
Ini akan meminta asterisk untuk menggunakan odbc untuk realtime sip. Ada sedikit kebingungan apakah kolom ke dua (dalam hal ini, asterisk adalah database, handel odbc database, atau odbc context. Disini dibuat sama agar kita tidak pusing.
[settings] sipusers => odbc,asterisk,sip_buddies sippeers => odbc,asterisk,sip_buddies
res_odbc.conf
Standard konfigirasi odbc. Semua diberi nama "asterisk" untuk menghindari kebingungan.
[asterisk] enabled => yes dsn => asterisk pre-connect => yes
func_odbc.conf
Ini akan memungkinkan kita untuk menggunakan fungsi ODBC_SQL untuk menjalankan perintah SQL di dial plan. Kita menggunakan ini untuk memperoleh nomor SIP setelah diberi extension.
[SQL] dsn=asterisk readsql=${ARG1}
extensions.conf
Here's how the dialplan uses the ODBC_SQL function to get the SIP number from the extension. This is just here as an example, though. Use the extensions.conf file in openbts/trunk/AsteriskConfigs.
[phones] ; This is the context for handsets provisioned through the realtime database. exten => _N.,1,Set(Name=${ODBC_SQL(select dial from dialdata_table where exten = \"${EXTEN}\")}) exten => _N.,n,GotoIf($["${Name}" = ""] ?outbound-trunk,${EXTEN},1) exten => _N.,n,Set(IPAddr=${ODBC_SQL(select ipaddr from sip_buddies where name = \"${Name}\")}) exten => _N.,n,GotoIf($["${IPAddr}" = ""] ?outbound-trunk,${EXTEN},1) exten => _N.,n,Dial(SIP/${Name}@${IPAddr}:5062)
In this example, OpenBTS has it's inbound SIP interface at port 5062 and the context "outbound-trunk" is used for handling phones not provisioned in the realtime database.
Sqlite3 database location
The default path for the Asterisk realtime database file is /var/lib/asterisk/sqlite3dir/sqlite3.db. (Note that this path was referenced above in /etc/odbc.ini.)
The sqlite3 database file must be readable and writable by asterisk, smqueue and sipauthserve, AND the directory in which the sqlite3 database file is located must ALSO be readable and writable by the applications. This is because sqlite3 generates temporary files in the directory.
Referensi
- http://wush.net/trac/rangepublic/wiki/asteriskConfig
- http://www.voip-info.org/wiki/view/Asterisk+RealTime
- http://wush.net/trac/rangepublic/wiki/sqlie3ODBC
Pranala Menarik
Persiapan
- USRP: High Precision Clock
- USRP: Menyambungkan ClockTamer ke USRP1
- USRP: Kalibrasi ClockTamer
- USRP: ClockTamer Control Protocol
- USRP: Instalasi Board
- OpenBTS: GIT Source Code
OpenBTS 2.6
- GNURadio
- GNURadio: Ubuntu Install
- GNURadio: Ubuntu Install GNURadio 3.4.2 *RECOMMENDED*
- GNURadio: Ubuntu Install GNURadio 3.4.2 Clock 52MHz *RECOMMENDED*
- GNURadio: Contoh Aplikasi
- GNURadio: Spectrum Analizer GSM
- GNURadio: Mengubah board RFX1800 menjadi RFX900
- GNURadio: Programming Untuk Pemula
- OpenBTS: Ubuntu Install
- OpenBTS: Ubuntu Install OpenBTS 2.6 Clock 52MHz
- OpenBTS: Konfigurasi
- OpenBTS: Kalibrasi
- OpenBTS: Konfigurasi Asterisk untuk OpenBTS
- OpenBTS: Menjalankan smqueue
- OpenBTS: Mengoperasikan BTS
- OpenBTS: Tampilan di Nokia saat pakai OpenBTS
- OpenBTS: Operasi 1800 MHz
- OpenBTS: Beberapa Tips
- OpenBTS: USRP2
- OpenBTS: Amplifier
- OpenBTS: SMS
- AirProbe
OpenBTS 2.8
- GNURadio: Ubuntu 11.10 Install NOT RECOMMENED
- GNURadio: Ubuntu 11.10 instalasi menggunakan Repo NOT RECOMMENDED
- GNURadio: Download GNURadio
- GNURadio: Ubuntu 11.10 Instal GNURadio 3.3.0
- GNURadio: Ubuntu 11.10 Instal GNURadio 3.4.2
- GNURadio: Ubuntu 11.10 Instal GNURadio 3.5.0 NOT RECOMMENDED
- GNURadio: Ubuntu 11.10 Instal GNURadio 3.5.3.2 NOT RECOMMENDED
- GNURadio: Ubuntu 11.10 Instal GNURadio 3.6.0 NOT RECOMMENDED
- GNURadio: Ubuntu 11.10 Install dari GIT GNURadio NOT RECOMMENDED
- GNURadio: Ubuntu 11.10 cek USRP Daughter Board
- GNURadio: UHD
- GNURadio: UHD Image
- GNURadio: UHD Identifikasi Device
- OpenBTS: Ubuntu 11.10 Install
- OpenBTS: dari GIT ttsou RECOMMENDED
- OpenBTS: 2.8 dari SVN Install RECOMMENDED
- OpenBTS: 2.8 Instalasi Real Time Asterisk
- OpenBTS: 2.8 Konfigurasi
- OpenBTS: Database SQLite
Ettus E110
- OpenBTS: E110 Cara Login
- OpenBTS: E110 Install Image di MicroSD
- OpenBTS: E110 Cek Daughter Board
- OpenBTS: E110 Mengubah Master Clock
- OpenBTS: E110 Kalibrasi Clock
- OpenBTS: E110 Bekerja dengan opkg
- OpenBTS: E110 GNURadio
- OpenBTS: E110 Install UHD Image
- OpenBTS: E110 Instalasi OpenBTS
- OpenBTS: E110 Instalasi OpenBTS 2.6 NOT RECOMMENDED
Lain Lain
- OpenBTS: Materi Magang di ICTWATCH
- OpenBTS: Seminar Outline
- OpenBTS: Workshop Outline
- Membuat Base Station GSM Open Source
- Teknologi Selular
- GSM: Daftar Channel Frekuensi
- Wireless Internet
- OpenBSC
- AirProbe
- Base station subsystem
- GSM
- Asterisk
- Mobile phone
Catatan Legal dan Pendukung
- Siapa Bilang OpenBTS Ilegal?
- OpenBTS: Catatan MNC dan MCC Indonesia
- OpenBTS: Catatan MNC dan MCC COOL
- OpenBTS : Alokasi Frekuensi Operator GSM Indonesia
- GSM: Daftar Channel Frekuensi