DNS IPv6 yaitu DNS yang menyediakan servis untuk memetakan alamat heksadesimal IPv6 ke huruf abjad selain memetakan alamat IPv4.
1. Langkah pertama (seperti biasa)install dulu aplikasi DNSnya:
user@desktop#sudo apt-get install bind9
2. Selesai install, kita langsung menuju file /etc/bind/named.conf.local (untuk file named.conf tidak usah diubah-ubah)
user@desktop# sudo vi /etc/bind/named.conf.local
3. Edit, masukkan zone file yang nantinya akan dibaca sebagai referensi pemetaan alamat IPnya…
#contoh zone file
zone “sembarangdomain.com” {
type master;
file “/etc/bind/db.sembarang”;
};
4. kemudian kita buat file referensinya, BIND akan membaca pemetaan alamat IPv4 dar record “A” dan untuk alamat IPv6 melalui record “AAAA”.
user@desktop#sudo vi /etc/bind/db.sembarang
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA ns1.sembarangdomain.com. admin.sembarangdomain.com. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ; Negative Cache TTL
IN NS ns1.sembarangdomain.com.
IN MX 10 sembarangdomain.com.
www IN A 192.168.1.1
www IN AAAA 2002:c0a8:102::1
simpan…
5. Lalu edit lagi file “/etc/bind/named.conf.options” dan tambahkan baris dibawah:
options {
directory “/var/cache/bind”;
listen-on {any; };
listen-on-v6 {any; };
auth-nxdomain no; # conform to RFC1035
};
tambahan baris diatas dimaksudkan agar DNS server nantinya dapat mendengar permintaan pemetaan IPv6 dari protokol IPv6 karena secara default aplikasi BIND hanya mendengar permintaan pemetaan IP dari IPv4.
6. Sebelum kita coba check, kita perlu untuk mengkonfigurasi alamat IPv6 disamping alamat IPv4 pada DNS server dgn perintah vi pada file /etc/network/interfaces, kemudian tambahkan baris di bawah:
iface eth0 inet6 static
address 2002:c0a8:102::1
netmask 96
kemudian jalankan perintah “/etc/init.d/network restart” untuk membaca ulang konfigurasi yang baru.
7. Lalu pada sisi klien…kita juga harus mengkonfigurasi alamat IPv6 nya dengan cara mengedit file pada /etc/network/interfaces, kemudian tambahkan baris di bawah:
iface eth0 inet6 static
address 2002:c0a8:102::100
netmask 96
kemudian jalankan perintah “/etc/init.d/network restart” untuk membaca ulang konfigurasi yang baru.
8. Terakhir kita arahkan klien untuk meminta resolve alamat IP ke DNS server yang akan dipakai di /etc/resolv.conf
#alamat server dns yang akan dipakai dari klien IPv6
nameserver 2002:c0a8:102::1
simpan…
9. untuk mengeceknya konektivitas dns klien dengan server kita gunakan perintah “ping6“, yaitu (hasil dibawah akan muncul jika konektivitas antara klien-server telah sukses):
root@desktop#ping6 2002:c0a8:102::1
PING 2002:c0a8:102::1(2002:c0a8:102::1) 56 data bytes
64 bytes from 2002:c0a8:102::1: icmp_seq=1 ttl=64 time=0.042 ms
64 bytes from 2002:c0a8:102::1: icmp_seq=2 ttl=64 time=0.048 ms
64 bytes from 2002:c0a8:102::1: icmp_seq=3 ttl=64 time=0.049 ms
— 2002:c0a8:102::1 ping statistics —
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 0.042/0.046/0.049/0.006 ms
setelah sukes terkoneksi…kita bisa mencoba query alamat www.sembarangdomain.com ke alamat IP dari klien dengan perintah:
root@desktop#host -6 www.sembarangdomain.com
atau lewat browser dengan mengetik www.sembarangdomain.com (asalkan kompi www.sembarangdomain telah terinstall web server)
Kamis, 08 Mei 2014
Rabu, 07 Mei 2014
Installasi Billing Pada Server Voip
#Step1 : Install Trixbox Pada Linux
#Step2 : Download a2billing
#cd /usr/src
#mkdir a2billing
#cd a2billing
#wget www.asterisk2billing.org/downloads/A2Billing_1.6.0.tar.gz
#tar -xzf A2Billing_1.6.0.tar.gz
#chown -R root:root /usr/src/a2billing
#Step3 : Membuat Database
# cd /usr/src/a2billing/DataBase/mysql/Mysql-3.x_4.x
# mysql -u root -ppassw0rd < a2billing-MYSQL-createdb-user.sql
# mysql -u root -ppassw0rd mya2billing < a2billing-mysql-schema-MYSQL.3.X-4.X_v1.2.3.sql
#Step4 : Install Web Interface A2billing
#cp -rf /usr/src/a2billing/customer /var/www/html/a2customer
#chmod 777 /var/www/html/a2customer/templates_c
#cp -rf /usr/src/a2billing/agent /var/www/html
#chmod 777 /var/www/html/agent/templates_c
#cp -rf /usr/src/a2billing/admin /var/www/html/a2billing
#chmod 777 /var/www/html/a2billing/templates_c
#cp -Rf /usr/src/a2billing/common /var/www/html
#cp /usr/src/a2billing/AGI/a2billing.php /var/lib/asterisk/agi-bin/
#cp -rf /usr/src/a2billing/common/lib /var/lib/asterisk/agi-bin/
#chmod +x /var/lib/asterisk/agi-bin/a2billing.php
#chown -R asterisk:asterisk /var/lib/asterisk/agi-bin
#Step5 : Konfigurasi File A2billing
#cp /usr/src/a2billing/a2billing.conf /etc/asterisk
#chown asterisk:asterisk /etc/asterisk/a2billing.conf
#ln -sf /etc/asterisk/a2billing.conf /etc/a2billing.conf
#sed -i "s/\(port *= *\)\(.*\)/\13306/" /etc/asterisk/a2billing.conf
#sed -i "s/\(user *= *\)\(.*\)/\1a2billinguser/" /etc/asterisk/a2billing.conf
#sed -i "s/\(password *= *\)\(.*\)/\1a2billing/" /etc/asterisk/a2billing.conf
#sed -i "s/\(dbname *= *\)\(.*\)/\1mya2billing/" /etc/asterisk/a2billing.conf
#A2billing Extra sounds
#cd /usr/src/a2billing/addons/sounds
#./install_a2b_sounds.sh
# Step6 : Asterisk files
#cd /etc/asterisk/
#touch additional_a2billing_iax.conf
#touch additional_a2billing_sip.conf
#touch extensions_a2billing.conf
#echo "#include additional_a2billing_sip.conf" >> /etc/asterisk/sip_custom.conf
#echo "#include additional_a2billing_iax.conf" >> /etc/asterisk/iax_custom.conf
#echo -e >> /etc/asterisk/extensions_custom.conf
#echo "#include extensions_a2billing.conf" >> /etc/asterisk/extensions_custom.conf
# Step7 : A2billing file permissions
#chmod 666 /etc/asterisk/additional_a2billing_iax.conf
#chmod 666 /etc/asterisk/additional_a2billing_sip.conf
#chmod 666 /etc/asterisk/extensions_a2billing.conf
#chown -R asterisk:asterisk /etc/asterisk/
#chown -R asterisk:asterisk /var/www/html/common
#chown -R asterisk:asterisk /var/www/html/a2billing
#chown -R asterisk:asterisk /var/www/html/a2customer
#chown -R asterisk:asterisk /var/www/html/agent
#chown -R asterisk:asterisk /var/lib/asterisk/
#Step8 : Agar asterisk berkomunikasi dengan a2billing, ada yang di perhatikan di file extensions_a2billing.conf
[a2billing]
exten => _X.,1,Answer
exten => _X.,n,Wait(1)
exten => _X.,n,DeadAGI(a2billing.php,1)
exten => _X.,n,Hangup
[custom-a2billing]
exten => _X.,1,Answer
exten => _X.,n,Wait(1)
exten => _X.,n,DeadAGI(a2billing.php,1,did)
exten => _X.,n,Hangup
Selesai, tinggal kita buka lewat browser http://localhost/a2billing
User : root
Password : changepassword
#Step2 : Download a2billing
#cd /usr/src
#mkdir a2billing
#cd a2billing
#wget www.asterisk2billing.org/downloads/A2Billing_1.6.0.tar.gz
#tar -xzf A2Billing_1.6.0.tar.gz
#chown -R root:root /usr/src/a2billing
#Step3 : Membuat Database
# cd /usr/src/a2billing/DataBase/mysql/Mysql-3.x_4.x
# mysql -u root -ppassw0rd < a2billing-MYSQL-createdb-user.sql
# mysql -u root -ppassw0rd mya2billing < a2billing-mysql-schema-MYSQL.3.X-4.X_v1.2.3.sql
#Step4 : Install Web Interface A2billing
#cp -rf /usr/src/a2billing/customer /var/www/html/a2customer
#chmod 777 /var/www/html/a2customer/templates_c
#cp -rf /usr/src/a2billing/agent /var/www/html
#chmod 777 /var/www/html/agent/templates_c
#cp -rf /usr/src/a2billing/admin /var/www/html/a2billing
#chmod 777 /var/www/html/a2billing/templates_c
#cp -Rf /usr/src/a2billing/common /var/www/html
#cp /usr/src/a2billing/AGI/a2billing.php /var/lib/asterisk/agi-bin/
#cp -rf /usr/src/a2billing/common/lib /var/lib/asterisk/agi-bin/
#chmod +x /var/lib/asterisk/agi-bin/a2billing.php
#chown -R asterisk:asterisk /var/lib/asterisk/agi-bin
#Step5 : Konfigurasi File A2billing
#cp /usr/src/a2billing/a2billing.conf /etc/asterisk
#chown asterisk:asterisk /etc/asterisk/a2billing.conf
#ln -sf /etc/asterisk/a2billing.conf /etc/a2billing.conf
#sed -i "s/\(port *= *\)\(.*\)/\13306/" /etc/asterisk/a2billing.conf
#sed -i "s/\(user *= *\)\(.*\)/\1a2billinguser/" /etc/asterisk/a2billing.conf
#sed -i "s/\(password *= *\)\(.*\)/\1a2billing/" /etc/asterisk/a2billing.conf
#sed -i "s/\(dbname *= *\)\(.*\)/\1mya2billing/" /etc/asterisk/a2billing.conf
#A2billing Extra sounds
#cd /usr/src/a2billing/addons/sounds
#./install_a2b_sounds.sh
# Step6 : Asterisk files
#cd /etc/asterisk/
#touch additional_a2billing_iax.conf
#touch additional_a2billing_sip.conf
#touch extensions_a2billing.conf
#echo "#include additional_a2billing_sip.conf" >> /etc/asterisk/sip_custom.conf
#echo "#include additional_a2billing_iax.conf" >> /etc/asterisk/iax_custom.conf
#echo -e >> /etc/asterisk/extensions_custom.conf
#echo "#include extensions_a2billing.conf" >> /etc/asterisk/extensions_custom.conf
# Step7 : A2billing file permissions
#chmod 666 /etc/asterisk/additional_a2billing_iax.conf
#chmod 666 /etc/asterisk/additional_a2billing_sip.conf
#chmod 666 /etc/asterisk/extensions_a2billing.conf
#chown -R asterisk:asterisk /etc/asterisk/
#chown -R asterisk:asterisk /var/www/html/common
#chown -R asterisk:asterisk /var/www/html/a2billing
#chown -R asterisk:asterisk /var/www/html/a2customer
#chown -R asterisk:asterisk /var/www/html/agent
#chown -R asterisk:asterisk /var/lib/asterisk/
#Step8 : Agar asterisk berkomunikasi dengan a2billing, ada yang di perhatikan di file extensions_a2billing.conf
[a2billing]
exten => _X.,1,Answer
exten => _X.,n,Wait(1)
exten => _X.,n,DeadAGI(a2billing.php,1)
exten => _X.,n,Hangup
[custom-a2billing]
exten => _X.,1,Answer
exten => _X.,n,Wait(1)
exten => _X.,n,DeadAGI(a2billing.php,1,did)
exten => _X.,n,Hangup
Selesai, tinggal kita buka lewat browser http://localhost/a2billing
User : root
Password : changepassword
Selasa, 06 Mei 2014
Cara Mudah Seting Hotspot dengan Mikrotik
Saya pengen berbagi pengalaman dalam hal seting hotspot di mikrotik. OK dah, langsung aja kita mulai yah….. Yang perlu disiapkan adalah :
1. Mikrotik box, dengan minimal paketnya adalah :
* System
* DHCP
* Wireless
* Hotspot
* Proxy
* User Manager (optional)
* Security (optional - recomended)
* Advanced Tools (optional)
2. Dua buah eth dan satu wlan card (kalo misal ga ada wlan card, bisa diganti dgn eth); Untuk memudahkan kita, kita kasih nama masing-masing eth dgn nama sebagai berikut : UpLink, Lokal, HotSpot.
3. Kemudian beri IP masing-masing eth tersebut :
* [admin@Mikrotik] > ip address add address=192.168.0.2/30 interface=UpLink
[admin@Mikrotik] > ip address add address=192.168.1.1/24 interface=Lokal [admin@Mikrotik] > ip address add address=192.168.2.1/24 interface=HotSpot
4. Masukkan default routenya :
* [admin@MikroTik] > ip route add gateway 192.168.0.1
5. Kemudian Seting untuk HotSpotnya :
* [admin@MikroTik] > ip hotspot setup
hotspot interface: HotSpot
local address of network: 192.168.2.1/24
masquerade network: yes
address pool of network: 192.168.2.2-192.168.2.99
select certificate: none
ip address of smtp server: 0.0.0.0
dns servers: 192.168.2.1
dns name: hotspot.mydomain.net
name of local hotspot user: user
password for the user: password
* Untuk user & password terserah mau di isi dgn apa.
Dengan setingan itu saja, kita dapat menggunakan fasilitas HotSpot, untuk lebih nyaman lagi, kita dapat menambahkan fasilitas User Manager.
Sebelum seting User Manager, periksa user hotspot yang ada, dan hapus semua jika ada
[admin@MikroTik] > ip hotspot user print
Flags: X - disabled, D - dynamic
# SERVER NAME ADDRESS PROFILE UPTIME
0 fred default 0s
[admin@MikroTik] > ip hotspot user remove 0
Agar User Manager dapat bekerja, pertama kita harus meng-add customer login dulu, ini digunakan untuk login ke User Manager Web Administration. (Ubahlah dengan keinginan anda untuk font yang italic)
[admin@MikroTik] > tool user-manager customer add login=hs_admin password=password
Sekarang kita seting HotSpot kita sebagai RADIUS client, jika User Manager kita dalam satu mesin dengan HotSpot, gunakan 127.0.0.1 untuk IP Addressnya :
[admin@MikroTik] > tool user-manager router add ip-address=hotspot-ip shared-secret=12345 subscriber=hs_admin
Sekarang kita seting untuk RADIUS-nya :
[admin@MikroTik] > radius add service=hotspot address=ip-address secret=12345
Sekarang kita seting profile HotSpotnya agar menggunakan RADIUS :
[admin@MikroTik] > ip hotspot profile print
Cari profile HotSpot yang digunakan, contoh :
[admin@MikroTik] > ip hotspot profile set 1 use-radius=yes
Done.
Untuk menggunakan fasilitas User Manager, gunakan jalur dari eth Lokal, gunakan Browser apapun, kemudian ketik : http://192.168.1.1/userman
1. Mikrotik box, dengan minimal paketnya adalah :
* System
* DHCP
* Wireless
* Hotspot
* Proxy
* User Manager (optional)
* Security (optional - recomended)
* Advanced Tools (optional)
2. Dua buah eth dan satu wlan card (kalo misal ga ada wlan card, bisa diganti dgn eth); Untuk memudahkan kita, kita kasih nama masing-masing eth dgn nama sebagai berikut : UpLink, Lokal, HotSpot.
3. Kemudian beri IP masing-masing eth tersebut :
* [admin@Mikrotik] > ip address add address=192.168.0.2/30 interface=UpLink
[admin@Mikrotik] > ip address add address=192.168.1.1/24 interface=Lokal [admin@Mikrotik] > ip address add address=192.168.2.1/24 interface=HotSpot
4. Masukkan default routenya :
* [admin@MikroTik] > ip route add gateway 192.168.0.1
5. Kemudian Seting untuk HotSpotnya :
* [admin@MikroTik] > ip hotspot setup
hotspot interface: HotSpot
local address of network: 192.168.2.1/24
masquerade network: yes
address pool of network: 192.168.2.2-192.168.2.99
select certificate: none
ip address of smtp server: 0.0.0.0
dns servers: 192.168.2.1
dns name: hotspot.mydomain.net
name of local hotspot user: user
password for the user: password
* Untuk user & password terserah mau di isi dgn apa.
Dengan setingan itu saja, kita dapat menggunakan fasilitas HotSpot, untuk lebih nyaman lagi, kita dapat menambahkan fasilitas User Manager.
Sebelum seting User Manager, periksa user hotspot yang ada, dan hapus semua jika ada
[admin@MikroTik] > ip hotspot user print
Flags: X - disabled, D - dynamic
# SERVER NAME ADDRESS PROFILE UPTIME
0 fred default 0s
[admin@MikroTik] > ip hotspot user remove 0
Agar User Manager dapat bekerja, pertama kita harus meng-add customer login dulu, ini digunakan untuk login ke User Manager Web Administration. (Ubahlah dengan keinginan anda untuk font yang italic)
[admin@MikroTik] > tool user-manager customer add login=hs_admin password=password
Sekarang kita seting HotSpot kita sebagai RADIUS client, jika User Manager kita dalam satu mesin dengan HotSpot, gunakan 127.0.0.1 untuk IP Addressnya :
[admin@MikroTik] > tool user-manager router add ip-address=hotspot-ip shared-secret=12345 subscriber=hs_admin
Sekarang kita seting untuk RADIUS-nya :
[admin@MikroTik] > radius add service=hotspot address=ip-address secret=12345
Sekarang kita seting profile HotSpotnya agar menggunakan RADIUS :
[admin@MikroTik] > ip hotspot profile print
Cari profile HotSpot yang digunakan, contoh :
[admin@MikroTik] > ip hotspot profile set 1 use-radius=yes
Done.
Untuk menggunakan fasilitas User Manager, gunakan jalur dari eth Lokal, gunakan Browser apapun, kemudian ketik : http://192.168.1.1/userman
Selasa, 06 Desember 2011
Connecting Two Asterisk Boxes Together via SIP
Connecting Two Asterisk Boxes Together via SIP
There may come a time when you have a pair of Asterisk boxes, and you’d like to pass calls between them. Luckily this isn’t very difficult, although it does have some oddities that we need to deal with, but from the configuration viewpoint it isn’t really all that difficult.
Configuring a Local Firewall
If you’re running iptables on the same machine as the Asterisk box, then you
can run the following commands to open port 5060 for SIP signaling, and
ports 10,000 through 20,000 for the RTP traffic. You can also narrow the
range of RTP ports in the rtp.conf file
located in /etc/asterisk. An excellent book on
iptables firewalls is Linux Firewalls by Steve Suehring
and Robert Ziegler (Novell Press):#Be aware that this will allow all UDP traffic from any source access to ports 5060 and 10,000 through 20,000.iptables -I RH-Firewall-1-INPUT -p udp --dport 5060 -j ACCEPT#iptables -I RH-Firewall-1-INPUT -p udp --dport 10000:20000 -j ACCEPT#service iptables save
Figure 4.5. SIP trunking topology
Configuring Our Asterisk Boxes
Here is the configuration for the Toronto box:
[general] register => toronto:welcome@192.168.1.101/osaka [osaka] type=friend secret=welcome context=osaka_incoming host=dynamic disallow=all allow=ulawAnd the configuration for the Osaka box:
[general] register => osaka:welcome@192.168.2.202/toronto [toronto] type=friend secret=welcome context=toronto_incoming host=dynamic disallow=all allow=ulawMany of the previous options may be familiar to you by now, but let’s take a look at them further just in case they are not.
The second line of the file tells our Asterisk box to register to the other box, with the purpose of telling the remote Asterisk box where to send calls when it wishes to send a call to our local Asterisk box. Remember how we mentioned a little oddity in the configuration? Notice that at the end of the registration line we tag on a forward slash and the username of the remote Asterisk box? What this does is tell the remote Asterisk box what digest name to use when it wants to set up a call. If you forget to add this, then when the far end tries to send you a call, you’ll see the following at your Asterisk CLI:
[Apr 22 18:52:32] WARNING[23631]: chan_sip.c:8117 check_auth: username mismatch,
have <toronto>, digest has <s>
So
by adding the forward slash and username, we tell the other end what to
place in the Digest username of the Proxy Authorization field in the SIP
INVITE message.The rest of the file is the authorization block we use to control the incoming and outgoing calls from the other Asterisk box. On the Toronto box, we have the
[osaka] authorization block,
and on the Osaka box, we have the [toronto] block. We
define the type as a friend, which allows us to both
receive and place calls from the other Asterisk box. The
secret is the password the other system should use
when authenticating. The context is where incoming
calls are processed in the dialplan
(extensions.conf). We set the
host parameter to dynamic, which
tells our Asterisk box that the other endpoint will register to us,
thereby telling us what IP address to set up calls when we want to send
a call to the other end. Finally, the disallow and
allow parameters control the codecs we wish to use
with the other end.If you save the file and reload the SIP channel on both Asterisk boxes (
sip reload from the
Asterisk console), you should see something like the following, which
will tell you the remote box successfully registered:*CLI> -- Saved useragent "Asterisk PBX" for peer toronto
You should see the status of the Host change from (
Unspecified) to the IP address of the remote box
when you run sip show peers:*CLI> sip show peers
Name/username Host Dyn Nat ACL Port Status
toronto/osaka 192.168.2.202 D 5060 Unmonitored
You
can verify that your own registration was successful by running
sip showregistry from the Asterisk
console:*CLI> sip show registry
Host Username Refresh State Reg.Time
192.168.1.101:5060 osaka 105 Registered Sun, 22 Apr 2007 19:13:20
Now
that our Asterisk boxes are happy with each other, let’s configure a
couple of SIP phones so we can call between the boxes.SIP Phone Configuration
Toronto sip.conf:
[1000] type=friend host=dynamic context=phonesOsaka sip.conf:
[1001] type=friend host=dynamic context=phonesYou should now have extension 1000 registered to Toronto, and extension 1001 registered to Osaka. You can verify this with the
sip show peers command from the Asterisk
console. Next, we’re going to configure the dialplan logic that will
allow us to call between the extensions.Configuring the Dialplan
extensions.conf file. We are going to build
up a dialplan based on this simple configuration. The dialplan for each
server will be very similar to the other one, but for clarity we will
show both. The new lines we’re adding to the file will be
italicized.Toronto
extensions.conf:[globals] [general] autofallthrough=yes [default] [incoming_calls] [phones] include => internal include => remote [internal] exten => _2XXX,1,NoOp() exten => _2XXX,n,Dial(SIP/${EXTEN},30) exten => _2XXX,n,Playback(the-party-you-are-calling&is-curntly-unavail) exten => _2XXX,n,Hangup() [remote] exten => _1XXX,1,NoOp() exten => _1XXX,n,Dial(SIP/osaka/${EXTEN}) exten => _1XXX,n,Hangup() [osaka_incoming] include => internalOsaka
extensions.conf:[globals] [general] autofallthrough=yes [default] [incoming_calls] [phones] include => internal include => remote [internal] exten => _1XXX,1,NoOp() exten => _1XXX,n,Dial(SIP/${EXTEN},30) exten => _1XXX,n,Playback(the-party-you-are-calling&is-curntly-unavail) exten => _1XXX,n,Hangup() [remote] exten => _2XXX,1,NoOp() exten => _2XXX,n,Dial(SIP/toronto/${EXTEN}) exten => _2XXX,n,Hangup() [toronto_incoming] include => internalOnce you’ve configured your
extensions.conf file, you can reload it from
the Asterisk console with the dialplan reload
command. Verify your dialplan loaded with the dialplan
show command.And that’s it! You should be able to place calls between your two Asterisk servers now.
Connecting FreeSWITCH and Asterisk using SIP
Connecting FreeSWITCH and Asterisk using SIP
With ACLs
These are the steps and how I did to connect FreeSWITCH and Asterisk.I first tried to use auth gateways to do the job, but was VERY tedious to resolve some issues, so I decided to do it using ACLs in both ways.
Lets assume you have asterisk box using IP 2.2.2.2 and FS using IP 1.1.1.1.
You need to add a acl list to ${FREESWITCH_HOME}/conf/autoload_configs/acl.conf.xml
<list name="asterisk_box" default="deny"> <node type="allow" cidr="2.2.2.2/32"/> </list>In the [settings] section of ${FREESWITCH_HOME}/conf/sip_profiles/external.xml
<param name="apply-inbound-acl" value="asterisk_box"/>Create the exten in ${FREESWITCH_HOME}/conf/dialplan/default.xml with the pattern to call asterisk extensions
<extension name="ast_extens">
<condition field="destination_number" expression="^(2\d{3})$">
<action application="set" data="hangup_after_bridge=true"/>
<action application="bridge" data="sofia/external/$1@2.2.2.2"/>
<action application="hangup"/>
</condition>
</extension>
In the Asterisk box on /etc/asterisk/sip.conf
[general] ... allowguest=no [freeswitch_1] type=peer host=1.1.1.1 port=5080 disallow=all allow=ulaw trustrpid=yes sendrpid=yes ; if using elastix you need the following or all phones will ring when a sip call comes in context=from-internalIn /etc/asterisk/extensions.conf
exten => _1XXX,1,Dial(SIP/freeswitch_1/${EXTEN})
exten => _1XXX,n,Hangup
exten => _2XXX,1,Dial(SIP/${EXTEN})
exten => _2XXX,n,Hangup
Using Authentication
This howto is based on FreeSWITCH Version 1.0.trunk (10906) with default configuration. We assume that booth servers have static IPs and don't need to register. To set up the trunk we are going to utilize the use case predefined in default configuration for default gateway.FreeSWITCH Side
In vars.xml you will find 6 variables which define your default gateway:<X-PRE-PROCESS cmd="set" data="default_provider=HOSTNAME.DOMAIN.COM"/> <X-PRE-PROCESS cmd="set" data="default_provider_username=USER_NAME"/> <X-PRE-PROCESS cmd="set" data="default_provider_password=BOOTH_WAY_PASSWORD"/> <X-PRE-PROCESS cmd="set" data="default_provider_from_domain=HOSTNAME.DOMAIN.COM"/> <X-PRE-PROCESS cmd="set" data="default_provider_register=false"/> <X-PRE-PROCESS cmd="set" data="default_provider_contact=5000"/>Note: default_provider_password is used to authenticate calls from and to Asterisk and HOSTNAME.DOMAIN.COM is the DNS name of Asterisk server.
Those variables are used in two configuration files:
- directory/default/example.com.xml which describes:
- the user for authentication of calls coming from Asterisk to FreeSWITCH. The ID on this user will be the same as value of variable default_provider.
- the gateway for authentication of calls outgoing from FreeSWITCH to Asterisk. The ID of this gateway will be the same as ID of the user.
- dialplan/default//01_example.com.xml which contains routes utilizing the gateway. Probably you should customize expression parameter of <condition field="destination_number" ... > to your needs. Only calls to destination number matching expression will go through the gateway.
<extension name="public_extensions">
<condition field="destination_number" expression="^(6969)$">
<action application="transfer" data="$1 XML default"/>
</condition>
</extension>
After setting variables and tuning routes(see above) type on FS console sofia profile restart all reloadxml to activate changes.
Asterisk Side
You have to define sip peer and dialplan extension.In sip.conf add:
[freeswitch] type=peer host=IP_ADDRESS_OF_FREESWITCH_SERVER username=HOSTNAME.DOMAIN.COM port=5080 fromdomain=IP_ADDRESS_OF_FREESWITCH_SERVER secret=BOOTH_WAY_PASSWORDIn extensions.conf, probably in your internal context, add:
exten => _1XXX,1,Dial(SIP/${EXTEN}@freeswitch)
So you will be able to call to default phones (1000-1019) configured on FS.
One Asterisk console type: sip reload and extensions reload to activate changes.
The Easy Way
Assume 10.1.1.1 is FreeSWITCH with extensions of 1000-1019 and 10.1.1.2 is Asterisk with extensions in the range 2000-2019.FreeSWITCH Side
We need to route calls made on freeswitch to the 2000-2019 extensions to the asterisk box, we'll use our external sip profile for this but internal should work, as well.Create $FREESWITCH_HOME/conf/dialplan/default/00_asterisk_extensions.xml:
<extension name="to_asterisk">
<condition field="destination_number" expression="^(20[01]\d)$">
<action application="set" data="hangup_after_bridge=true"/>
<action application="bridge" data="sofia/external/$1@10.1.1.2"/>
</condition>
</extension>
Now we have to handle calls coming from asterisk, which by default hit the 'public' dialplan.
Create $FREESWITCH_HOME/conf/dialplan/public/00_from_asterisk.xml:
<extension name="from_asterisk">
<condition field="network_addr" expression="10.1.1.2" />
<condition field="destination_number" expression="^(10[01]\d)$">
<action application="transfer" data="$1 XML default" />
</condition>
</extension>
Asterisk Side
We'll make freeswitch a peer in asterisk Add an entry in /etc/asterisk/sip.conf:[freeswitch_1] type=peer host=10.1.1.1 port=5080 deny=0.0.0.0/0.0.0.0 permit=10.1.1.1/255.255.255.255 jbenable=no disallow=all allow=ulaw trustrpid=yes sendrpid=yes ; if using elastix you need the following or all phones will ring when a sip call comes in, in general set this a context where your internal extensions are included context=from-internalAnd route calls to the appropriate place based on the extension In /etc/asterisk/extensions.conf:
exten => _10XX,1,Dial(SIP/freeswitch_1/${EXTEN})
exten => _10XX,n,Hangup
exten => _20XX,1,Dial(SIP/${EXTEN})
exten => _20XX,n,Hangup
You should now be able to make calls from the 1000s on FreeSWITCH to
the 2000s on asterisk, and vice-versa. If that's all you wanted/needed
to do between them, you're Done!
A little more advanced
Instead of routing the calls to freeswitch's public dialplan from asterisk and having to create an appropriate transfer to the default XML dialplan, you could instead allow asterisk calls to directly hit the default XML dialplan on freeswitch. There are a few ways to do this, in this case we're just going to make the internal sip profile on freeswitch use the default context instead of the public context, then set an acl to allow asterisk to use that internal sip profile without authenticating.First the ACL,
Edit $FREESWITCH_HOME/conf/autoload_configs/acl.conf.xml, adding:
<list name="asterisks" default="deny"> <node type="allow" cidr="10.1.1.2/32"/> </list>Now, to apply it, In the [settings] section of $FREESWITCH_HOME/conf/sip_profiles/internal.xml, add:
<param name="apply-inbound-acl" value="asterisks"/>Also in $FREESWITCH_HOME/conf/sip_profiles/internal.xml, edit the context to make it default:
<param name="context" value="default"/>Now you can remove the public/00_from_asterisk.xml file and change the port from 5080 to 5060 in asterisk's sip.conf and you should be able to call any freeswitch extension that you set a route for in asterisk.
Kamis, 01 Desember 2011
INSTALLASI VYATTA ROUTER OPENSOURCE
Vyatta Quick Setup
This is a quick guide setup guide for the Vyatta open source router. This article assumes that you have already installed Vyatta either on physical hardware or in a virtual machine. For more information on creating a private network in ESXi Server see this article.
Vyatta can be downloaded from http://www.vyatta.org
Version 6.3 has a new LiveCD installer so there is a little work to get it going.
I used the VI Client to create a new VM. Select File, then New Virtual Machine.
Choose the following Settings:
Configuration: Custom
Name: "MyVyatta" Note: This name is whatever you want it to be.
Datastore: Choose the datsstore you wish Vyatta to install on.
Virtual Machine Version: 7
Guest OS: Linux/Other 2.6x Linux
CPU: "1"
Memory: "512"
Network: "2" / vmxnet3
SCSI Controller: keep the defaults
Select a Disk: keep the default
Create a Disk: "4"GB then select thin provisioning
Select the box to customize the configuration prior to completing the VM creation and do the following:
Click CD/DVD Drive 1
Select "Connect at power on"
Select Device Type: "Datastore ISO File"
Click "Browse..." and choose the LiveCD ISO file that you got from Vyatta.org
Start the new VM.
When it boots to the login prompt, login with a user and a password of "vyatta"
Now its time to install. Do this type
#install-image
Choose all of the defaults and when the install is complete type
#shutdown
Once it's shutdown, go back to the VI Client and select the Vyatta VM. Go to Edit Setting and do the following.
Click CD/DVD Drive 1
Unselect "Connect at power on"
Select Device Type: "Client Device"
Start the Vyatta VM and once it powers up, log back in.
Once you are logged into the Vyatta console you need to enter configuration mode, this is done by typing “configure” in the console.
#configure
Next use the show interfaces command to see the network configuration of your Vyatta router.
By using the MAC address of your network card you should be able to match your network card to the correct Vyatta ethernet interface.
You must set the IP address range for the Private Network in Vyatta. Because my private network is on eth1 I will use the following command to give it a static IP address.
#set interfaces ethernet eth1 address 192.168.1.1/24
Then commit the IP address by using the commit command
#commit
If you have a PC with a statically assigned IP address on the private network, you can test if the IP address took by pinging the IP address of your router inside of a virtual machine on the private network, if not, just continue.
Give the router a hostname and domain name by entering the following commands
#set system host-name <your-router-name>
#set system domain-name <your.domain.name>
Set up the Timzone by typing
#set system time-zone <your-time-zone>
Hit the tab key for timezone options.
#commit
Now we setup external interface to gets its address from a DHCP server. Please note, if you need PPPOE for your internet provider you will need to take other steps. My internet provider uses DHCP so I don't have the ability to test any other configuration
#set interfaces ethernet eth0 address dhcp
Now that the hostname, domain name, and IP information is set, its time to configure the private network to have a DHCP server.
The process below enables the DHCP server for the 192.168.1.0/24 network. It will distribute IP addresses at 50 and stop at 100. I also setup the outside DNS server and the default router for the DHCP server to give to clients.
This command names the network PRIVATE and sets the DHCP address range to start at 192.168.1.50
#set service dhcp-server shared-network-name PRIVATE subnet 192.168.1.0/24 start 192.168.1.50
Now we tell the DHCP server to stop handing out addresses at 100
#set service dhcp-server shared-network-name Home subnet 192.168.10.0/24 start 192.168.1.50 stop 192.168.1.100
Now setup the DNS and Default gateway. I use OpenDNS for my all of my DNS needs, it's free and allows for content filtering.
#set service dhcp-server shared-network-name PRIVATE subnet 192.168.1.0/24 dns-server 208.67.222.222
#set service dhcp-server shared-network-name PRIVATE subnet 192.168.1.0/24 dns-server 208.67.222.222
#set service dhcp-server shared-network-name PRIVATE subnet 192.168.1.0/24 default-router 192.168.1.1
The last step to setup connectivity for the private network is to setup NAT. NAT will allow you to connect to the internet from any device on the private network.
#Set service nat rule 10 type masquerade
#Set service nat rule 10 source address 192.168.1.0/24
#Set service nat rule 10 outbound-interface eth0
#commit
#save
#exit
Once you have added NAT, check to see if your private network PC can access the internet. At this point, there should be full access from the private network to anywhere on your network.
This is a quick guide setup guide for the Vyatta open source router. This article assumes that you have already installed Vyatta either on physical hardware or in a virtual machine. For more information on creating a private network in ESXi Server see this article.
Vyatta can be downloaded from http://www.vyatta.org
Version 6.3 has a new LiveCD installer so there is a little work to get it going.
I used the VI Client to create a new VM. Select File, then New Virtual Machine.
Choose the following Settings:
Configuration: Custom
Name: "MyVyatta" Note: This name is whatever you want it to be.
Datastore: Choose the datsstore you wish Vyatta to install on.
Virtual Machine Version: 7
Guest OS: Linux/Other 2.6x Linux
CPU: "1"
Memory: "512"
Network: "2" / vmxnet3
SCSI Controller: keep the defaults
Select a Disk: keep the default
Create a Disk: "4"GB then select thin provisioning
Select the box to customize the configuration prior to completing the VM creation and do the following:
Click CD/DVD Drive 1
Select "Connect at power on"
Select Device Type: "Datastore ISO File"
Click "Browse..." and choose the LiveCD ISO file that you got from Vyatta.org
Start the new VM.
When it boots to the login prompt, login with a user and a password of "vyatta"
Now its time to install. Do this type
#install-image
Choose all of the defaults and when the install is complete type
#shutdown
Once it's shutdown, go back to the VI Client and select the Vyatta VM. Go to Edit Setting and do the following.
Click CD/DVD Drive 1
Unselect "Connect at power on"
Select Device Type: "Client Device"
Start the Vyatta VM and once it powers up, log back in.
Once you are logged into the Vyatta console you need to enter configuration mode, this is done by typing “configure” in the console.
#configure
Next use the show interfaces command to see the network configuration of your Vyatta router.
By using the MAC address of your network card you should be able to match your network card to the correct Vyatta ethernet interface.
You must set the IP address range for the Private Network in Vyatta. Because my private network is on eth1 I will use the following command to give it a static IP address.
#set interfaces ethernet eth1 address 192.168.1.1/24
Then commit the IP address by using the commit command
#commit
If you have a PC with a statically assigned IP address on the private network, you can test if the IP address took by pinging the IP address of your router inside of a virtual machine on the private network, if not, just continue.
Give the router a hostname and domain name by entering the following commands
#set system host-name <your-router-name>
#set system domain-name <your.domain.name>
Set up the Timzone by typing
#set system time-zone <your-time-zone>
Hit the tab key for timezone options.
#commit
Now we setup external interface to gets its address from a DHCP server. Please note, if you need PPPOE for your internet provider you will need to take other steps. My internet provider uses DHCP so I don't have the ability to test any other configuration
#set interfaces ethernet eth0 address dhcp
Now that the hostname, domain name, and IP information is set, its time to configure the private network to have a DHCP server.
The process below enables the DHCP server for the 192.168.1.0/24 network. It will distribute IP addresses at 50 and stop at 100. I also setup the outside DNS server and the default router for the DHCP server to give to clients.
This command names the network PRIVATE and sets the DHCP address range to start at 192.168.1.50
#set service dhcp-server shared-network-name PRIVATE subnet 192.168.1.0/24 start 192.168.1.50
Now we tell the DHCP server to stop handing out addresses at 100
#set service dhcp-server shared-network-name Home subnet 192.168.10.0/24 start 192.168.1.50 stop 192.168.1.100
Now setup the DNS and Default gateway. I use OpenDNS for my all of my DNS needs, it's free and allows for content filtering.
#set service dhcp-server shared-network-name PRIVATE subnet 192.168.1.0/24 dns-server 208.67.222.222
#set service dhcp-server shared-network-name PRIVATE subnet 192.168.1.0/24 dns-server 208.67.222.222
#set service dhcp-server shared-network-name PRIVATE subnet 192.168.1.0/24 default-router 192.168.1.1
The last step to setup connectivity for the private network is to setup NAT. NAT will allow you to connect to the internet from any device on the private network.
#Set service nat rule 10 type masquerade
#Set service nat rule 10 source address 192.168.1.0/24
#Set service nat rule 10 outbound-interface eth0
#commit
#save
#exit
Once you have added NAT, check to see if your private network PC can access the internet. At this point, there should be full access from the private network to anywhere on your network.
INSTALLASI VSFTPD PADA CENTOS SERVER 5.3
Ya udahlah tanpa basa-basi dan banyak cincong ,nih berikut settingan konfigurasi pada saat saya menginstall ftp server pada server saya , cekidot :
1. Langkah pertama Instalasi Paket vsftpd nya terlebih dahulu dengan menggunakan perintah yum
[root@my-centos]# yum install vsftpd
2. Lalu Konfigurasi file vsftpd.conf nya
[root@my-centos]# vim /etc/vsftpd/vsftpd.conf
Yang perlu dirubah adalah:
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
ascii_upload_enable=YES
ascii_download_enable=YES
ftpd_banner=Welcome to FTP Server K-Place.
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/chroot_list
listen=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
3. Kemudian buat user lokal dengan nama ozotmacho
[root@my-centos]# adduser rivkhi
[root@my-centos]# passwd rivkhi
Changing password for user rivkhi.
New UNIX password:
BAD PASSWORD: it is too simplistic/systematic
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
4. Membuat file chroot_list
File ini berisi daftar user yang bisa mengakses FTP server.
[root@my-centos]# vim /etc/vsftpd/chroot_list
Isinya adalah :
rivkhi
5. Restart Service FTP
[root@my-centos]# service vsftpd restart
[root@my-centos]# chkconfig vsftpd on
6. Cek konfigurasi FTP
[root@my-centos]# getsebool -a | grep ftp
nah dibagian ini saya mendapatkan status : getsebool: SELinux is disabled
maka untuk mengatasi hal tersebut saya edit file :
[root@my-centos]# vi /etc/selinux/config
dimana sebelumnya filenya :
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing – SELinux security policy is enforced.
# permissive – SELinux prints warnings instead of enforcing.
# disabled – SELinux is fully disabled.
SELINUX=disable
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted – Only targeted network daemons are protected.
# strict – Full SELinux protection.
SELINUXTYPE=targeted
saya edit menjadi :
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing – SELinux security policy is enforced.
# permissive – SELinux prints warnings instead of enforcing.
# disabled – SELinux is fully disabled.
SELINUX=permisive
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted – Only targeted network daemons are protected.
# strict – Full SELinux protection.
SELINUXTYPE=targeted
lalu aku reboot komputernya. Setelah komputer di reboot aku jalan kembali command :
[root@my-centos]# getsebool -a | grep ftp
allow_ftpd_anon_write –> off
allow_ftpd_full_access –> off
allow_ftpd_use_cifs –> off
allow_ftpd_use_nfs –> off
allow_tftp_anon_write –> off
ftp_home_dir –> on
ftpd_disable_trans –> off
ftpd_is_daemon –> on
httpd_enable_ftp_server –> off
tftpd_disable_trans –> off
apabila ftp_home_dir masih berstatus off, maka jalankan perintah :
[root@lmy-centos]# setsebool -P ftp_home_dir on
[root@my-centos]# iptables –F
[root@bluebox ~]# setsebool -P allow_ftpd_full_access on
Sekian dulu dah postingan dari saya, soalnya mata udah berat banget mau di shutdown dulu
1. Langkah pertama Instalasi Paket vsftpd nya terlebih dahulu dengan menggunakan perintah yum
[root@my-centos]# yum install vsftpd
2. Lalu Konfigurasi file vsftpd.conf nya
[root@my-centos]# vim /etc/vsftpd/vsftpd.conf
Yang perlu dirubah adalah:
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
ascii_upload_enable=YES
ascii_download_enable=YES
ftpd_banner=Welcome to FTP Server K-Place.
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/chroot_list
listen=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
3. Kemudian buat user lokal dengan nama ozotmacho
[root@my-centos]# adduser rivkhi
[root@my-centos]# passwd rivkhi
Changing password for user rivkhi.
New UNIX password:
BAD PASSWORD: it is too simplistic/systematic
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
4. Membuat file chroot_list
File ini berisi daftar user yang bisa mengakses FTP server.
[root@my-centos]# vim /etc/vsftpd/chroot_list
Isinya adalah :
rivkhi
5. Restart Service FTP
[root@my-centos]# service vsftpd restart
[root@my-centos]# chkconfig vsftpd on
6. Cek konfigurasi FTP
[root@my-centos]# getsebool -a | grep ftp
nah dibagian ini saya mendapatkan status : getsebool: SELinux is disabled
maka untuk mengatasi hal tersebut saya edit file :
[root@my-centos]# vi /etc/selinux/config
dimana sebelumnya filenya :
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing – SELinux security policy is enforced.
# permissive – SELinux prints warnings instead of enforcing.
# disabled – SELinux is fully disabled.
SELINUX=disable
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted – Only targeted network daemons are protected.
# strict – Full SELinux protection.
SELINUXTYPE=targeted
saya edit menjadi :
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing – SELinux security policy is enforced.
# permissive – SELinux prints warnings instead of enforcing.
# disabled – SELinux is fully disabled.
SELINUX=permisive
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted – Only targeted network daemons are protected.
# strict – Full SELinux protection.
SELINUXTYPE=targeted
lalu aku reboot komputernya. Setelah komputer di reboot aku jalan kembali command :
[root@my-centos]# getsebool -a | grep ftp
allow_ftpd_anon_write –> off
allow_ftpd_full_access –> off
allow_ftpd_use_cifs –> off
allow_ftpd_use_nfs –> off
allow_tftp_anon_write –> off
ftp_home_dir –> on
ftpd_disable_trans –> off
ftpd_is_daemon –> on
httpd_enable_ftp_server –> off
tftpd_disable_trans –> off
apabila ftp_home_dir masih berstatus off, maka jalankan perintah :
[root@lmy-centos]# setsebool -P ftp_home_dir on
[root@my-centos]# iptables –F
[root@bluebox ~]# setsebool -P allow_ftpd_full_access on
Sekian dulu dah postingan dari saya, soalnya mata udah berat banget mau di shutdown dulu
INSTALLASI FREESWITCH PADA UBUNTU SERVER 11.04
FreeSwitch merupakan open source lintas-platform skalalabel platform telepon yang dirancang untuk rute dan interkoneksi protokol komunikasi yang populer menggunakan audio, video, teks atau bentuk media lainnya.
CARA MENGINSTALL FREESWITCH DI LINUX UBUNTU SERVER 11.04
1. Persyaratan
Prasyarat ini wajib menyediakan untuk mengkompilasi instalasi standar FreeSWITCH dan menguji konfigurasi yang disertakan dan IVR sampel. Berikut syarat-syarat package yang harus terinstal agar proses kompilasi berjalan dengan baik :
a. GIT atau WGET
b. AUTOCONF
c. AUTOMAKE
d. GCC-C ++
e. LIBJPEG-DEVEL
f. LIBTOOL
g. MAKE
h. NCURSES-DEVEL
Lalu ketikkan di terminal ubuntu : #sudo apt-get install git-core build-essential autoconf automake libtool libncurses5 libncurses5-dev make libjpeg-dev
Ada modul opsional yang dapat di bangun dan jika demikian mungkin memerlukan satu atau lebih hal berikut :
a. Curl-devel
b. Expat-devel
c. GnuTLS
d. Libtiff
e. Libx11-devel
f. ODBC or UNIX-ODBC and ODBC-devel
g. Open SSL
h. Python-devel
i. ZLIB and ZLIB-devel
j. Libzrtp
Lalu ketikkan lagi di terminal : #sudo apt-get install libcurl4-openssl-dev libexpat1-dev libgnutls-dev libtiff4-dev libx11-dev unixodbc-dev libssl-dev python2.6-dev \
zlib1g-dev libzrtpcpp-dev libasound2-dev libogg-dev libvorbis-dev libperl-dev libgdbm-dev libdb-dev python-dev \
uuid-dev
2. INSTALASI FREESWITCH
a. Masuk ke : #cd /usr/local/src
a. Lalu kita bisa memilih proses download melalui Git atau Wget. Bila mau mendownload melalui Git ketik : #git clone git://git.freeswitch.org/freeswitch.git setelah itu ketik : #cd freeswitch lalu ketik lagi : #./bootstrap.sh
Bila mau mendownload melalui Wget ketik : #wget http://files.freeswitch.org/freeswitch-1.0.6.tar.gz . setelah itu ekstrak file dengan perintah : #tar xvfz freeswitch-1.0.6.tar.gz Lalu kita konfigurasi file freeswitch dengan perintah : #./configure
b. Setelah kita mendownload dan mengekstrak, lalu edit file modules.conf terlebih dahulu dan menghilangkan tanda “#” di kata kunci “flite” setelah itu save.
c. Sehabis kita mengedit file modules.conf, lakukan perintah #./configure lalu #make setelah itu #make install untuk proses pendownloadan menggunakan Git. Untuk yang menggunakan pendownloadan Wget langsung dengan perintah #make dan #make install
d. Lalu kompilasi dan install sound dengan perintah : #make all cd-sounds-install cd-moh-install
e. Setelah itu jalankan service freeswitch dengan perintah : #/usr/local/freeswitch/bin/freeswitch
f. Instalasi sudah selesai. Tinggal mengedit di bagian extension dan SIP Phone nya.
KONFIGURASI FREESWITCH
Membuat start up Freeswitch
Menambahkan user dan group, dan mengubah hak akses yang diperlukan:
adduser freeswitch
addgroup freeswitch
chown -R freeswitch:freeswitch /usr/local/freeswitch
Kemudian membuat file / etc / init.d / freeswitch dengan script berikut:
#! /bin/sh
### BEGIN INIT INFO
# Provides: skeleton
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Freeswitch debian init script.
# Author: Matthew Williams
#
### END INIT INFO
# Do NOT "set -e"
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin
DESC="Freeswitch"
NAME=freeswitch
DAEMON=/usr/local/freeswitch/bin/$NAME
DAEMON_ARGS="-nc"
PIDFILE=/usr/local/freeswitch/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
FS_USER=freeswitch
FS_GROUP=freeswitch
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions
#
# Function that sets ulimit values for the daemon
#
do_setlimits() {
ulimit -c unlimited
ulimit -d unlimited
ulimit -f unlimited
ulimit -i unlimited
ulimit -n 999999
ulimit -q unlimited
ulimit -u unlimited
ulimit -v unlimited
ulimit -x unlimited
ulimit -s 240
ulimit -l unlimited
return 0
}
#
# Function that starts the daemon/service
#
do_start()
{
# Set user to run as
if [ $FS_USER ] ; then
DAEMON_ARGS="`echo $DAEMON_ARGS` -u $FS_USER"
fi
# Set group to run as
if [ $FS_GROUP ] ; then
DAEMON_ARGS="`echo $DAEMON_ARGS` -g $FS_GROUP"
fi
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null -- \
|| return 1
do_setlimits
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
$DAEMON_ARGS \
|| return 2
# Add code here, if necessary, that waits for the process to be ready
# to handle requests from services started subsequently which depend
# on this one. As a last resort, sleep for some time.
}
#
# Function that stops the daemon/service
#
do_stop()
{
# Return
# 0 if daemon has been stopped
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
RETVAL="$?"
[ "$RETVAL" = 2 ] && return 2
# Wait for children to finish too if this is a daemon that forks
# and if the daemon is only ever run from this initscript.
# If the above conditions are not satisfied then add some other code
# that waits for the process to drop all resources that could be
# needed by services started subsequently. A last resort is to
# sleep for some time.
start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
[ "$?" = 2 ] && return 2
# Many daemons don't delete their pidfiles when they exit.
rm -f $PIDFILE
return "$RETVAL"
}
#
# Function that sends a SIGHUP to the daemon/service
#
do_reload() {
#
# If the daemon can reload its configuration without
# restarting (for example, when it is sent a SIGHUP),
# then implement that here.
#
start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
return 0
}
case "$1" in
start)
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
stop)
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
#reload|force-reload)
#
# If do_reload() is not implemented then leave this commented out
# and leave 'force-reload' as an alias for 'restart'.
#
#log_daemon_msg "Reloading $DESC" "$NAME"
#do_reload
#log_end_msg $?
#;;
restart|force-reload)
#
# If the "reload" option is implemented then remove the
# 'force-reload' alias
#
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
case "$?" in
0|1)
do_start
case "$?" in
0) log_end_msg 0 ;;
1) log_end_msg 1 ;; # Old process is still running
*) log_end_msg 1 ;; # Failed to start
esac
;;
*)
# Failed to stop
log_end_msg 1
;;
esac
;;
*)
#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
exit 3
;;
esac
Kemudian jangan lupa untuk melakukan perintah berikut:
chmod +x /etc/init.d/freeswitch
update-rc.d freeswitch defaults
Setelah selesei restart untuk menguji start up.
Menambah extension
Untuk menambahkan ekstensi baru, salin 1000.xml Anda ke file dengan nomor ekstensi dengan nama selain "1000". Contoh: Jadi jika Anda ingin menambahkan ekstensi 8989 dengan password 2424, Anda harus melakukan perintah sebagai berikut:
cd /usr/local/freeswitch/conf/directory/default
cp 1000.xml 8989.xml
nano 8989.xml
<include>
<user id="8989" mailbox="8989">
<params>
<param name="password" value="2424"/>
<param name="vm-password" value="1000"/>
</params>
<variables>
<variable name="toll_allow" value="domestic,international,local"/>
<variable name="accountcode" value="8989"/>
<variable name="user_context" value="default"/>
<variable name="effective_caller_id_name" value="Extension 8989"/>
<variable name="effective_caller_id_number" value="8989"/>
<variable name="outbound_caller_id_name" value="$${outbound_caller_name}"/>
<variable name="outbound_caller_id_number" value="$${outbound_caller_id}"/>
<variable name="callgroup" value="techsupport"/>
</variables>
</user>
</include>
Installasi web based (bluebox)
Install paket untuk bluebox :
#apt-get install mysql-server
#apt-get install apache2
#apt-get install php5
Sekarang kita perlu mendownload software bluebox dan kemudian menjalankannya :
#cd /var/www (pindah direktori ke web root)
#wget http://www.bluebox.co.za/?download&global[option]=quick_setup (download bluebox)
#cd .. (kembali ke direktori sebelumnya)
#chmod -R 777 www (mengatur direktori untuk bias akses Read & Write)
Buka web browser dan browse ke alamat IP dari server (contoh: http://192.168.0.1/setup.php). Kemudian akan meminta untuk mengkonfirmasi download bluebox. Selanjutnya ikuti petunjuknya.
Isi di host mysql pengguna rincian Server DatabaseName "bluebox", User Name "root", Password "bluebox", Host “localhost”, Port “3306”, Type (dirver) “mysql”.
Setelah itu membuat account untuk akses bluebox.
Kemudian pilih klik update “Config File”
Database baru sekarang dibuat. Kemudian situs ini akan mengarahkan kembali ke homepage(http://192.168.0.1/bluebox) dan sistem web base bluebox siap untuk digunakan.
CARA MENGINSTALL FREESWITCH DI LINUX UBUNTU SERVER 11.04
1. Persyaratan
Prasyarat ini wajib menyediakan untuk mengkompilasi instalasi standar FreeSWITCH dan menguji konfigurasi yang disertakan dan IVR sampel. Berikut syarat-syarat package yang harus terinstal agar proses kompilasi berjalan dengan baik :
a. GIT atau WGET
b. AUTOCONF
c. AUTOMAKE
d. GCC-C ++
e. LIBJPEG-DEVEL
f. LIBTOOL
g. MAKE
h. NCURSES-DEVEL
Lalu ketikkan di terminal ubuntu : #sudo apt-get install git-core build-essential autoconf automake libtool libncurses5 libncurses5-dev make libjpeg-dev
Ada modul opsional yang dapat di bangun dan jika demikian mungkin memerlukan satu atau lebih hal berikut :
a. Curl-devel
b. Expat-devel
c. GnuTLS
d. Libtiff
e. Libx11-devel
f. ODBC or UNIX-ODBC and ODBC-devel
g. Open SSL
h. Python-devel
i. ZLIB and ZLIB-devel
j. Libzrtp
Lalu ketikkan lagi di terminal : #sudo apt-get install libcurl4-openssl-dev libexpat1-dev libgnutls-dev libtiff4-dev libx11-dev unixodbc-dev libssl-dev python2.6-dev \
zlib1g-dev libzrtpcpp-dev libasound2-dev libogg-dev libvorbis-dev libperl-dev libgdbm-dev libdb-dev python-dev \
uuid-dev
2. INSTALASI FREESWITCH
a. Masuk ke : #cd /usr/local/src
a. Lalu kita bisa memilih proses download melalui Git atau Wget. Bila mau mendownload melalui Git ketik : #git clone git://git.freeswitch.org/freeswitch.git setelah itu ketik : #cd freeswitch lalu ketik lagi : #./bootstrap.sh
Bila mau mendownload melalui Wget ketik : #wget http://files.freeswitch.org/freeswitch-1.0.6.tar.gz . setelah itu ekstrak file dengan perintah : #tar xvfz freeswitch-1.0.6.tar.gz Lalu kita konfigurasi file freeswitch dengan perintah : #./configure
b. Setelah kita mendownload dan mengekstrak, lalu edit file modules.conf terlebih dahulu dan menghilangkan tanda “#” di kata kunci “flite” setelah itu save.
c. Sehabis kita mengedit file modules.conf, lakukan perintah #./configure lalu #make setelah itu #make install untuk proses pendownloadan menggunakan Git. Untuk yang menggunakan pendownloadan Wget langsung dengan perintah #make dan #make install
d. Lalu kompilasi dan install sound dengan perintah : #make all cd-sounds-install cd-moh-install
e. Setelah itu jalankan service freeswitch dengan perintah : #/usr/local/freeswitch/bin/freeswitch
f. Instalasi sudah selesai. Tinggal mengedit di bagian extension dan SIP Phone nya.
KONFIGURASI FREESWITCH
Membuat start up Freeswitch
Menambahkan user dan group, dan mengubah hak akses yang diperlukan:
adduser freeswitch
addgroup freeswitch
chown -R freeswitch:freeswitch /usr/local/freeswitch
Kemudian membuat file / etc / init.d / freeswitch dengan script berikut:
#! /bin/sh
### BEGIN INIT INFO
# Provides: skeleton
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Freeswitch debian init script.
# Author: Matthew Williams
#
### END INIT INFO
# Do NOT "set -e"
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin
DESC="Freeswitch"
NAME=freeswitch
DAEMON=/usr/local/freeswitch/bin/$NAME
DAEMON_ARGS="-nc"
PIDFILE=/usr/local/freeswitch/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
FS_USER=freeswitch
FS_GROUP=freeswitch
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions
#
# Function that sets ulimit values for the daemon
#
do_setlimits() {
ulimit -c unlimited
ulimit -d unlimited
ulimit -f unlimited
ulimit -i unlimited
ulimit -n 999999
ulimit -q unlimited
ulimit -u unlimited
ulimit -v unlimited
ulimit -x unlimited
ulimit -s 240
ulimit -l unlimited
return 0
}
#
# Function that starts the daemon/service
#
do_start()
{
# Set user to run as
if [ $FS_USER ] ; then
DAEMON_ARGS="`echo $DAEMON_ARGS` -u $FS_USER"
fi
# Set group to run as
if [ $FS_GROUP ] ; then
DAEMON_ARGS="`echo $DAEMON_ARGS` -g $FS_GROUP"
fi
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null -- \
|| return 1
do_setlimits
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
$DAEMON_ARGS \
|| return 2
# Add code here, if necessary, that waits for the process to be ready
# to handle requests from services started subsequently which depend
# on this one. As a last resort, sleep for some time.
}
#
# Function that stops the daemon/service
#
do_stop()
{
# Return
# 0 if daemon has been stopped
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
RETVAL="$?"
[ "$RETVAL" = 2 ] && return 2
# Wait for children to finish too if this is a daemon that forks
# and if the daemon is only ever run from this initscript.
# If the above conditions are not satisfied then add some other code
# that waits for the process to drop all resources that could be
# needed by services started subsequently. A last resort is to
# sleep for some time.
start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
[ "$?" = 2 ] && return 2
# Many daemons don't delete their pidfiles when they exit.
rm -f $PIDFILE
return "$RETVAL"
}
#
# Function that sends a SIGHUP to the daemon/service
#
do_reload() {
#
# If the daemon can reload its configuration without
# restarting (for example, when it is sent a SIGHUP),
# then implement that here.
#
start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
return 0
}
case "$1" in
start)
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
stop)
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
#reload|force-reload)
#
# If do_reload() is not implemented then leave this commented out
# and leave 'force-reload' as an alias for 'restart'.
#
#log_daemon_msg "Reloading $DESC" "$NAME"
#do_reload
#log_end_msg $?
#;;
restart|force-reload)
#
# If the "reload" option is implemented then remove the
# 'force-reload' alias
#
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
case "$?" in
0|1)
do_start
case "$?" in
0) log_end_msg 0 ;;
1) log_end_msg 1 ;; # Old process is still running
*) log_end_msg 1 ;; # Failed to start
esac
;;
*)
# Failed to stop
log_end_msg 1
;;
esac
;;
*)
#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
exit 3
;;
esac
Kemudian jangan lupa untuk melakukan perintah berikut:
chmod +x /etc/init.d/freeswitch
update-rc.d freeswitch defaults
Setelah selesei restart untuk menguji start up.
Menambah extension
Untuk menambahkan ekstensi baru, salin 1000.xml Anda ke file dengan nomor ekstensi dengan nama selain "1000". Contoh: Jadi jika Anda ingin menambahkan ekstensi 8989 dengan password 2424, Anda harus melakukan perintah sebagai berikut:
cd /usr/local/freeswitch/conf/directory/default
cp 1000.xml 8989.xml
nano 8989.xml
<include>
<user id="8989" mailbox="8989">
<params>
<param name="password" value="2424"/>
<param name="vm-password" value="1000"/>
</params>
<variables>
<variable name="toll_allow" value="domestic,international,local"/>
<variable name="accountcode" value="8989"/>
<variable name="user_context" value="default"/>
<variable name="effective_caller_id_name" value="Extension 8989"/>
<variable name="effective_caller_id_number" value="8989"/>
<variable name="outbound_caller_id_name" value="$${outbound_caller_name}"/>
<variable name="outbound_caller_id_number" value="$${outbound_caller_id}"/>
<variable name="callgroup" value="techsupport"/>
</variables>
</user>
</include>
Installasi web based (bluebox)
Install paket untuk bluebox :
#apt-get install mysql-server
#apt-get install apache2
#apt-get install php5
Sekarang kita perlu mendownload software bluebox dan kemudian menjalankannya :
#cd /var/www (pindah direktori ke web root)
#wget http://www.bluebox.co.za/?download&global[option]=quick_setup (download bluebox)
#cd .. (kembali ke direktori sebelumnya)
#chmod -R 777 www (mengatur direktori untuk bias akses Read & Write)
Buka web browser dan browse ke alamat IP dari server (contoh: http://192.168.0.1/setup.php). Kemudian akan meminta untuk mengkonfirmasi download bluebox. Selanjutnya ikuti petunjuknya.
Isi di host mysql pengguna rincian Server DatabaseName "bluebox", User Name "root", Password "bluebox", Host “localhost”, Port “3306”, Type (dirver) “mysql”.
Setelah itu membuat account untuk akses bluebox.
Kemudian pilih klik update “Config File”
Database baru sekarang dibuat. Kemudian situs ini akan mengarahkan kembali ke homepage(http://192.168.0.1/bluebox) dan sistem web base bluebox siap untuk digunakan.
Reset Password Webmin
Gara-gara update dari centos 5 ke 5.3 eh malah webmin ngga mau
dibuka. Akhirnya harus reset password nya. Pertama2 masuk ke serverk
menggunakan user root. Selanjutnya, jika menggunakan distro redhat
(Centos, Fedora, Gentoo) maka lakukan perintah sebagai berikut :
#/usr/src/libexec/webmin/changepass.pl /etc/webmin username password
Jika menggunakan distro debian, perintahnya sbb:
#/usr/share/webmin/changepass.pl /etc/webmin username password
Selanjutnya silahkan login dengan username dan password yang sudah di reset.
#/usr/src/libexec/webmin/changepass.pl /etc/webmin username password
Jika menggunakan distro debian, perintahnya sbb:
#/usr/share/webmin/changepass.pl /etc/webmin username password
Selanjutnya silahkan login dengan username dan password yang sudah di reset.
Rabu, 30 November 2011
network configuration in ubuntu
Ethernet Interfaces
Ethernet interfaces are identified by the system using the naming convention of ethX, where X represents a numeric value. The first Ethernet interface is typically identified as eth0, the second as eth1, and all others should move up in numerical order.Identify Ethernet Interfaces
ifconfig -a | grep eth
eth0 Link encap:Ethernet HWaddr 00:15:c5:4a:16:5a
Another application that can help identify all network interfaces available to your system
is the lshw command. In the example below, lshw
shows a single Ethernet interface with the logical name of eth0
along with bus information, driver details and all supported capabilities.
sudo lshw -class network
*-network
description: Ethernet interface
product: BCM4401-B0 100Base-TX
vendor: Broadcom Corporation
physical id: 0
bus info: pci@0000:03:00.0
logical name: eth0
version: 02
serial: 00:15:c5:4a:16:5a
size: 10MB/s
capacity: 100MB/s
width: 32 bits
clock: 33MHz
capabilities: (snipped for brevity)
configuration: (snipped for brevity)
resources: irq:17 memory:ef9fe000-ef9fffff
Ethernet Interface Logical Names
/etc/udev/rules.d/70-persistent-net.rules. If you would
like control which interface receives a particular logical name, find the line
matching the interfaces physical MAC address and modify the value of
NAME=ethX to the desired logical name.
Reboot the system to commit your changes.
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:15:c5:4a:16:5a", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:15:c5:4a:16:5b", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
Ethernet Interface Settings
sudo apt-get install ethtool
The following is an example of how to view supported features and configured
settings of an Ethernet interface.
sudo ethtool eth0
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: g
Wake-on: d
Current message level: 0x000000ff (255)
Link detected: yes
Changes made with the ethtool command are temporary
and will be lost after a reboot. If you would like to retain settings, simply add
the desired ethtool command to a pre-up
statement in the interface configuration file /etc/network/interfaces.
The following is an example of how the interface identified as eth0 could be permanently configured with a port speed of 1000Mb/s running in full duplex mode.
auto eth0 iface eth0 inet static pre-up /usr/sbin/ethtool -s eth0 speed 1000 duplex full
|
|
| Although the example above shows the interface configured to use the static method, it actually works with other methods as well, such as DHCP. The example is meant to demonstrate only proper placement of the pre-up statement in relation to the rest of the interface configuration. |
IP Addressing
Temporary IP Address Assignment
To temporarily configure an IP address, you can use the ifconfig command in the following manner. Just modify the IP address and subnet mask to match your network requirements.
sudo ifconfig eth0 10.0.0.100 netmask 255.255.255.0
To verify the IP address configuration of eth0,
you can use the ifconfig command in the following manner.
ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:15:c5:4a:16:5a
inet addr:10.0.0.100 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::215:c5ff:fe4a:165a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:466475604 errors:0 dropped:0 overruns:0 frame:0
TX packets:403172654 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2574778386 (2.5 GB) TX bytes:1618367329 (1.6 GB)
Interrupt:16
To configure a default gateway, you can use the route
command in the following manner. Modify the default gateway address to match
your network requirements.
sudo route add default gw 10.0.0.1 eth0
To verify your default gateway configuration, you can use the route
command in the following manner.
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0
0.0.0.0 10.0.0.1 0.0.0.0 UG 0 0 0 eth0
If you require DNS for your temporary network configuration, you can add DNS server
IP addresses in the file /etc/resolv.conf. The example below
shows how to enter two DNS servers to /etc/resolv.conf, which
should be changed to servers appropriate for your network. A more lengthy description
of DNS client configuration is in a following section.
nameserver 8.8.8.8 nameserver 8.8.4.4If you no longer need this configuration and wish to purge all IP configuration from an interface, you can use the ip command with the flush option as shown below.
ip addr flush eth0
|
|
Flushing the IP configuration using the ip command does not clear the
contents of /etc/resolv.conf. You must remove or modify those entries manually.
|
Dynamic IP Address Assignment (DHCP Client)
/etc/network/interfaces.
The example below assumes you are configuring your first Ethernet interface identified as
eth0.
auto eth0 iface eth0 inet dhcpBy adding an interface configuration as shown above, you can manually enable the interface through the ifup command which initiates the DHCP process via dhclient.
sudo ifup eth0
To manually disable the interface, you can use the ifdown
command, which in turn will initiate the DHCP release process and shut down the
interface.
sudo ifdown eth0
Static IP Address Assignment
/etc/network/interfaces.
The example below assumes you are configuring your first Ethernet interface identified as
eth0. Change the address,
netmask, and gateway
values to meet the requirements of your network.
auto eth0 iface eth0 inet static address 10.0.0.100 netmask 255.255.255.0 gateway 10.0.0.1By adding an interface configuration as shown above, you can manually enable the interface through the ifup command.
sudo ifup eth0
To manually disable the interface, you can use the ifdown
command.
sudo ifdown eth0
Loopback Interface
ifconfig lo
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2718 errors:0 dropped:0 overruns:0 frame:0
TX packets:2718 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:183308 (183.3 KB) TX bytes:183308 (183.3 KB)
By default, there should be two lines in /etc/network/interfaces
responsible for automatically configuring your loopback interface. It is recommended that you
keep the default settings unless you have a specific purpose for changing them. An example of
the two default lines are shown below.
auto lo iface lo inet loopback
Name Resolution
DNS Client Configuration
/etc/resolv.conf.
You can also add an optional DNS suffix search-lists to match your network domain names.
Below is an example of a typical configuration of
/etc/resolv.conf
for a server on the domain "example.com" and using
two public DNS servers.
search example.com nameserver 8.8.8.8 nameserver 8.8.4.4The search option can also be used with multiple domain names so that DNS queries will be appended in the order in which they are entered. For example, your network may have multiple sub-domains to search; a parent domain of example.com, and two sub-domains, sales.example.com and dev.example.com.
If you have multiple domains you wish to search, your configuration might look like the following.
search example.com sales.example.com dev.example.com nameserver 8.8.8.8 nameserver 8.8.4.4If you try to ping a host with the name of server1, your system will automatically query DNS for its Fully Qualified Domain Name (FQDN) in the following order:
-
server1.example.com
-
server1.sales.example.com
-
server1.dev.example.com
Static Hostnames
/etc/hosts.
Entries in the hosts file will have precedence over DNS by default. This means that if your
system tries to resolve a hostname and it matches an entry in /etc/hosts, it will not attempt to look up the
record in DNS. In some configurations, especially when Internet access is not required, servers that
communicate with a limited number of resources can be conveniently set to use static hostnames instead of DNS.
The following is an example of a
hosts file where a number of local servers
have been identified by simple hostnames, aliases and their equivalent Fully Qualified Domain Names (FQDN's).
127.0.0.1 localhost 127.0.1.1 ubuntu-server 10.0.0.11 server1 vpn server1.example.com 10.0.0.12 server2 mail server2.example.com 10.0.0.13 server3 www server3.example.com 10.0.0.14 server4 file server4.example.com
|
|
| In the above example, notice that each of the servers have been given aliases in addition to their proper names and FQDN's. Server1 has been mapped to the name vpn, server2 is referred to as mail, server3 as www, and server4 as file. |
Name Service Switch Configuration
/etc/nsswitch.conf.
As mentioned in the previous section, typically static hostnames defined in the systems
/etc/hosts file have precedence over names resolved from DNS. The following
is an example of the line responsible for this order of hostname lookups in the file
/etc/nsswitch.conf.
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
-
files first tries to resolve static hostnames located in
/etc/hosts.
-
mdns4_minimal attempts to resolve the name using Multicast DNS.
-
[NOTFOUND=return] means that any response of
notfound by the preceeding
mdns4_minimal process should be treated as
authoritative and that the system should not try to continue hunting for an answer.
-
dns represents a legacy unicast DNS query.
-
mdns4 represents a Multicast DNS query.
/etc/nsswitch.conf
as shown below.
hosts: files dns [NOTFOUND=return] mdns4_minimal mdns4
Bridging
Before configuring a bridge you will need to install the bridge-utils package. To install the package, in a terminal enter:
sudo apt-get install bridge-utils
Next, configure the bridge by editing /etc/network/interfaces:
auto lo
iface lo inet loopback
auto br0
iface br0 inet static
address 192.168.0.10
network 192.168.0.0
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.1
bridge_ports eth0
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off
|
|
| Enter the appropriate values for your physical interface and network. |
sudo /etc/init.d/networking restart
The new bridge interface should now be up and running. The brctl provides useful information
about the state of the bridge, controls which interfaces are part of the bridge, etc. See man brctl
for more information.
Konfigurasi static di Centos
sedikit ringkasan jika kita ingin mengkonfigurasi TCP/IP manual di
centos. disini kita akan mengubah jaringan dari dhcp menjadi static.
berikut ini konfigurasi untuk dhcp :
1. langsung saja perintah untuk mengkonfigurasi seperti dibawah ini:
[root@localhost LJK03]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
hanya merubah bootproto nya saja dan menambahkan Broadcast, netmask, network, Ipadrres dan gateway.
2. merestart service network
hasilnya seperti ini :
berikut ini konfigurasi untuk dhcp :
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=dhcp
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes1. langsung saja perintah untuk mengkonfigurasi seperti dibawah ini:
[root@localhost LJK03]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
# Realtek Semiconductor Co., Ltd. RTL-8169 Gigabit Ethernet
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes
BROADCAST=192.168.4.255
NETWORK=192.168.4.0
NETMASK=225.225.225.0
IPADDR=192.168.4.65
GATEWAY=192.168.4.1hanya merubah bootproto nya saja dan menambahkan Broadcast, netmask, network, Ipadrres dan gateway.
2. merestart service network
[root@localhost LJK03]# /sbin/service network restarthasilnya seperti ini :
[root@localhost LJK03]# /sbin/service network restart
Shutting down interface eth0: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]INSTALLASI A2BILLING DI TRIXBOX
Instalasi ini telah diuji pada versi Trixbox 2.2, versi sebelumnya dari Trixbox perlu memiliki A2Billing dihapus.
Peringatan biasa berlaku, misalnya penulis tidak bertanggung jawab atas kerusakan dilakukan untuk instalasi yang sudah ada.
Ini juga mengasumsikan bahwa ini adalah instalasi default dalam hal password database.
Panduan ini akan membawa Anda sejauh membuat panggilan pada A2Billing dan menyediakan dasar untuk eksperimentasi dan belajar, tetapi untuk topik yang lebih maju seperti panggilan balik, routing dan penagihan DID, dan penyesuaian lainnya, maka ada dokumentasi yang tersedia, link ke beberapa yang di bagian bawah halaman ini.
Untuk menggunakan jenis berikut setelah login ke Trixbox:
Direktori dan file yang akan dihapus adalah sebagai berikut: -
http://a2billing.net/download.php?get=a2billing-v1-3-Beta.tar.gz
Salin file ke / root / kemudian Untar itu: -
NB. Sebuah aplikasi yang berguna untuk memindahkan, menyalin dan mengedit file pada mesin linux dan memindahkan file dari Windows ke Linux adalah WinSCP http://winscp.net
File ini dapat diedit dengan menggunakan editor favorit Anda, seperti vi, melalui WinSCP atau melalui Config Mengedit disertakan dengan Trixbox.
remove the ; from ;dbtype = mysql
akan terlihat seperti ini:
Nilai di sini harus ditetapkan untuk sama seperti yang di manager.conf, dan file yang terkait. Dalam kasus Trixbox, kita memiliki sebuah entri untuk a2billinguser di manager_custom.conf. Parameter yang ada: -
Ada banyak pilihan lain yang bisa diubah dalam a2billing.conf, dan mereka cukup baik didokumentasikan dan berkomentar dalam file.
Edit / etc / asterisk / sip.conf dan termasuk additional_a2billing_sip.conf sehingga beberapa baris terakhir terlihat sip.conf seperti ini:
sip_custom.conf, yang harus berisi # include additional_a2billing_sip.conf
dan
iax_custom.conf yang berisi # include additional_a2billing_iax.conf
Anda kemudian harus mengatur kepemilikan:
Extensions_custom.conf mengedit dan menambahkan # include extensions_a2billing.conf bawah lainnya termasuk, sehingga terlihat seperti ini:
Simpan file ini, dan mengeluarkan kembali pada Asterisk untuk menerapkan file konfigurasi baru tanda bintang.
Anda sekarang memiliki platform A2Billing dasar mengatur, jadi kita perlu membuat beberapa default di A2Billing GUI.
Ini set instruksi hanya menyediakan sistem kerja dasar tanpa embel-embel.
Jika petunjuk di atas telah berjalan dengan baik, Anda harus bisa login ke portal Administrasi A2Billing yang akan ditemukan di http:// <your_ip_address> / A2Billing_UI /
Anda akan disajikan dengan username dan password masukkan: -
Klik Administrator pada sidebar, administrator menunjukkan -> mengedit
Hal ini diasumsikan bahwa Anda sudah memiliki batang yang bekerja di Trixbox / FreePBX, dan koper ini dapat digunakan dalam A2Billing.
Mengidentifikasi nama batang di FreePBX - dalam hal ini, kita akan berasumsi MYIAXTEL disebut dengan
Kami sekarang harus membuat ratecard baru. Untuk tujuan demonstrasi, kita akan menyebutnya StandardRates
Kembali dan klik "Daftar Rencana Panggilan" dan jika semuanya berjalan dengan baik masih, Anda akan melihat StandardCallPlan terdaftar. Klik Edit pada akhir baris, dan pada boittom halaman, dalam dropdown, pilih StandardRates dibuat sebelumnya Klik Add, dan konfirmasi data.
Ketika Anda mendapatkan harga dari penyedia yang berbeda, mereka dapat ditambahkan ke dalam rencana panggilan dan dipilih atas dasar harga.
Tambahkan Beberapa Tarif
Kami sekarang harus menambahkan beberapa tingkat. Harga dapat diimpor dalam jumlah besar dari file CSV, atau diketik dalam satu pada suatu waktu. Jika tingkat untuk tujuan tidak ada, maka A2Billing tidak dapat memberikan panggilan.
Setiap kode panggilan untuk setiap tujuan perlu ditambahkan. Hal ini penting untuk akurat dengan kode panggilan. Sebagai contoh, jika ada tujuan, katakanlah premium dinilai kode panggilan di Afrika Timur bahwa Anda berada di bawah pengisian, seseorang dapat membuat banyak uang dengan biaya Anda.
Sayangnya, tidak ada daftar kode definitif panggilan dengan rincian yang memadai yang bisa saya temukan di internet. Namun, operator seluler Anda harus dapat menyediakan Anda dengan daftar kode panggilan dan biaya yang mereka buat.
Daftar negara dengan kode panggilan disertakan dengan A2Billing bawah Misc - Awalan> Browse. Namun daftar ini, tidak memperhitungkan tujuan akun seperti Bilangan Nilai Handphone dan Premium.
Jadi untuk saat ini, kami uji melalui VoIP, kami penyedia VoIP menuntut agar kita mengirim mereka digit dalam format IETF, dan kami ingin membuat panggilan keluar pertama atas A2Billing ke nomor nasional Inggris. Nasional Inggris nomor hanya dimulai dengan baik 441 atau 442
Jadi kita akan menambahkan tingkat pertama. Asumsikan penagihan ke detik terdekat, biaya adalah 1 US sen per menit dan kami menjual pada 2 sen per menit. Kita mengasumsikan semuanya dalam dolar AS untuk saat ini karena kita tidak mengubah mata uang default.
NB. Untuk mengubah mata uang default, Edit base_currency a2billing.conf <currency = dari choice> Anda Setiap mata uang memiliki pengenal 3 huruf unik. Untuk menemukan identitas, klik Penagihan -> Daftar Mata Uang di sidebar, kemudian berburu untuk negara Anda. Ketika a2billing.conf disimpan, Anda dapat memperbarui nilai tukar mata uang di layar.
Dalam rangka untuk menciptakan pelanggan dari halaman pendaftaran, email keluar harus bekerja (tipe setup-mail dari command line)
Dalam contoh ini - kita akan menciptakan pelanggan baru dari antarmuka admin.
Dial nomor yang ingin mencoba - dalam contoh kita, Anda hanya dapat memanggil nomor yang diawali dengan 441, dan 442 atau 00441 atau 00442. Pengaturan panggilan Rencananya akan strip nomor awalan internasional dari panggilan, jika mereka ada.
Tekan mengirim, dan Anda akan mendengar keseimbangan Anda saat ini, jumlah menit Anda dapat memanggil tujuan itu, dan kemudian jika semuanya telah berjalan dengan baik, maka Anda harus terhubung ke ujung jauh.
Kami menangkap panggilan Rute Inbound di Trixbox / FreePBX dan kirim ke A2Billing.
Karena FreePBX hanya memungkinkan Anda untuk mengirim panggilan ke konteks kustom yang diawali dengan "Custom" dalam kita perlu menambahkan konteks kustom dalam ekstensi-a2billing.conf
Jadi dalam mengedit konfigurasi, vi atau editor teks favorit Anda, tambahkan baris berikut ke ekstensi-a2billing.conf sehingga seluruh file terlihat seperti ini: -
Anda harus dapat memanggil nomor tersebut, dan Anda akan mendengar, "Silakan masukkan nomor rekening Anda" Ketik nomor kartu Anda. Itu adalah bidang pertama dalam A2Billing -> Pelanggan -> Daftar Pelanggan -> Edit
Saldo Anda kemudian akan membacakan kepada Anda, maka Anda dapat memanggil nomor tersebut, durasi maksimal akan membacakan kepada Anda, maka Anda harus terhubung ke nomor yang dipanggil.
NB. Anda harus menambahkan nomor akses Anda ke no_auth_dnid di a2billing.conf, sehingga A2B tahu untuk tidak pernah mencoba untuk menghubungi nomor ini keluar.
Peringatan biasa berlaku, misalnya penulis tidak bertanggung jawab atas kerusakan dilakukan untuk instalasi yang sudah ada.
Ini juga mengasumsikan bahwa ini adalah instalasi default dalam hal password database.
Panduan ini akan membawa Anda sejauh membuat panggilan pada A2Billing dan menyediakan dasar untuk eksperimentasi dan belajar, tetapi untuk topik yang lebih maju seperti panggilan balik, routing dan penagihan DID, dan penyesuaian lainnya, maka ada dokumentasi yang tersedia, link ke beberapa yang di bagian bawah halaman ini.
Scripted Trixbox Instal
Jika Anda memilih untuk menggunakan installer script ini akan mengkonfigurasi menginstal FRESH Trixbox dengan A2b v1.3 BetaUntuk menggunakan jenis berikut setelah login ke Trixbox:
cd ~ / wget http://www.efirehost.com/a2b_trixbox_2.2_installer_FRESH.sh sh a2b_trixbox_2.2_installer_FRESH.shSetelah script yang selesai Anda HARUS lanjutkan dengan mengklik DI SINI (jangan gulir ke bawah)
Hapus sisa-sisa menginstal A2Billing tua di Trixbox
Dalam versi sebelumnya dari 2,2 Trixbox, versi yang jauh lebih tua dari A2Billing telah terinstal, dan sebelum melanjutkan dengan langkah-langkah berikut, sisa-sisa A2Billing lama harus dihapus.Direktori dan file yang akan dihapus adalah sebagai berikut: -
- / var/www/html/a2billing /
- / var/www/html/a2customer /
- / var/lib/asterisk/agi-bin/a2billing.php
- / var/lib/asterisk/agi-bin/libs_a2billing /
- / etc/asterisk/additional_a2billing_iax.conf
- / etc/asterisk/additional_a2billing_sip.conf
rm / etc/asterisk/a2billing.conf
Drop database lama (jika ada) mysqladmin drop-mya2billing-u root-ppassw0rd
Instal PHP-PCNTL - sebuah persyaratan A2Billing
wget http://dfn.dl.sourceforge.net/sourceforge/phprpms/php-pcntl-4.3.11-2.5.1.i386.rpm rpm-iv php-4.3.11-pcntl-2.5.1.i386.rpm
Dapatkan A2Billing
Sekarang versi terbaru dari A2Billing. Pada saat penulisan ini adalah 1,3 Beta 1http://a2billing.net/download.php?get=a2billing-v1-3-Beta.tar.gz
Salin file ke / root / kemudian Untar itu: -
NB. Sebuah aplikasi yang berguna untuk memindahkan, menyalin dan mengedit file pada mesin linux dan memindahkan file dari Windows ke Linux adalah WinSCP http://winscp.net
tar zxfv a2billing-v1-3-Beta.tar.gz
Instal Database A2Billing
cd 1.3.0-Beta/DataBase/mysql/Mysql-3.x_4.x/ echo "GRANT ALL PRIVILEGES ON *.* TO 'a2billinguser'@'localhost' IDENTIFIED BY 'a2billing' WITH GRANT OPTION;" | mysql -ppassw0rd mysqladmin create mya2billing -u a2billinguser -pa2billing mysql mya2billing -u a2billinguser -pa2billing < a2billing-mysql-schema-MYSQL.3.X-4.X_v1.3.0.sql
Instal User Interface
cd .. cd .. cd .. mv ./A2Billing_UI / var/www/html/A2Billing_UI mv ./A2BCustomer_UI / / var/www/html/A2BCustomer_UI
Menginstal file konfigurasi default a2billing
mv a2billing.conf / etc/asterisk/a2billing.conf
Instal AGI yang
cd A2Billing_AGI mv a2billing.php /var/lib/asterisk/agi-bin/a2billing.php libs_a2billing mv /var/lib/asterisk/agi-bin
Instal suara tambahan yang diperlukan.
cd .. cd /addons/sound/ mv * /var/lib/asterisk/sound/
Setup dan file conf IAX SIP
cd /etc/asterisk/ touch additional_a2billing_iax.conf touch additional_a2billing_sip.conf touch extensions_a2billing.conf
Mengatur hak akses dan ownersip
chmod 666 / etc/asterisk/additional_a2billing_iax.conf chmod 666 / etc/asterisk/additional_a2billing_sip.conf chmod 666 / etc/asterisk/extensions_a2billing.conf chown-R asterisk:asterisk /etc/asterisk/ chown-R asterisk:asterisk /var/www/html/ chown-R asterisk:asterisk /var/lib/asterisk/Tugas berikutnya adalah mengedit file conf agar sesuai dengan instalasi Trixbox
Mengedit File Conf ke Setelan A2Billing
Ini mengasumsikan instalasi Trixbox standarMengedit A2Billing.conf
Para a2billing.conf file, yang terletak di / etc / asterisk / adalah di mana semua default yang ditetapkan untuk sistem A2Billing. Disarankan bahwa sebagian besar default yang tersisa sebagai adalah, kecuali jika Anda mencoba untuk mencapai sesuatu yang spesifik. Perubahan ke file tersebut, ketika disimpan memiliki efek instan pada perilaku A2Billing.File ini dapat diedit dengan menggunakan editor favorit Anda, seperti vi, melalui WinSCP atau melalui Config Mengedit disertakan dengan Trixbox.
Bagian database
comment out dbtype = postgresremove the ; from ;dbtype = mysql
akan terlihat seperti ini:
[Database] hostname = localhost port = 5432 user = a2billinguser password = a2billing dbname = mya2billing ; Dbtype = postgres dbtype = mysql
Parameter Connection Manager
Pada bagian webui, mengidentifikasi parameter Manajer sambungan. Hal ini memungkinkan A2Billing untuk berkomunikasi dengan Asterisk.Nilai di sini harus ditetapkan untuk sama seperti yang di manager.conf, dan file yang terkait. Dalam kasus Trixbox, kita memiliki sebuah entri untuk a2billinguser di manager_custom.conf. Parameter yang ada: -
- username = a2billinguser
- secret = a2billing
; MANAGER CONNECTION PARAMETERS manager_host = localhost manager_username = a2billinguser manager_secret = a2billingSekarang simpan a2billing.conf
Ada banyak pilihan lain yang bisa diubah dalam a2billing.conf, dan mereka cukup baik didokumentasikan dan berkomentar dalam file.
Termasuk
Selama proses instalasi, tiga file baru diciptakan: -- additional_a2billing_sip.conf - SIP friends
- additional_a2billing_iax.conf - IAX Friends
- extensions_a2billing.conf - A2Billing contexts
Edit / etc / asterisk / sip.conf dan termasuk additional_a2billing_sip.conf sehingga beberapa baris terakhir terlihat sip.conf seperti ini:
; #, in this configuration file, is NOT A COMMENT. This is exactly
; how it should be.
#include sip_nat.conf
#include sip_custom.conf
#include sip_additional.conf
#include additional_a2billing_sip.conf
Kemudian lakukan yang sama untuk iax.conf sehingga terlihat seperti ini#include iax_registrations_custom.conf #include iax_registrations.conf #include iax_custom.conf #include iax_additional.conf #include additional_a2billing_iax.confNB - Jika menggunakan FreePBX 2.3, maka jangan mengedit iax.conf, tapi menciptakan dua file baru: -
sip_custom.conf, yang harus berisi # include additional_a2billing_sip.conf
dan
iax_custom.conf yang berisi # include additional_a2billing_iax.conf
Anda kemudian harus mengatur kepemilikan:
chown asterisk:asterisk /etc/asterisk/iax_custom.conf chown asterisk:asterisk /etc/asterisk/sip_custom.conf
Akhirnya, kita perlu menyertakan extensions_a2billing.conf di extensions_custom.conf
Extensions_custom.conf mengedit dan menambahkan # include extensions_a2billing.conf bawah lainnya termasuk, sehingga terlihat seperti ini:
# Include extensions_trixbox.conf # Include extensions_hud.conf # Include extensions_a2billing.conf
A2Billing Konteks
Dalam extensions_a2billing.conf, tambahkan baris berikut: -[a2billing] exten => _X.,1,Answer exten => _X.,n,Wait(1) exten => _X.,n,DeadAGI(a2billing.php|1) exten => _X.,n,HangupNB. Perhatikan 1 setelah a2billing.php - The 1 mengacu pada yang agi-conf untuk digunakan dalam a2billing.conf jika Anda ingin a2billing bereaksi dengan cara yang berbeda untuk segalanya standar, menyalin dari agi-conf1 ke akhir file, dan paste pada akhir file, kemudian mengubah nama baru agi-conf untuk agi-conf2. Default baru Anda kemudian dapat disebut dengan (a2billing.php | 2)
Simpan file ini, dan mengeluarkan kembali pada Asterisk untuk menerapkan file konfigurasi baru tanda bintang.
Anda sekarang memiliki platform A2Billing dasar mengatur, jadi kita perlu membuat beberapa default di A2Billing GUI.
Menyiapkan A2Billing_UI
Sebelum kita dapat mulai menambahkan account ke sistem, kita perlu mengatur beberapa default dasar dalam Graphical User Interface.Ini set instruksi hanya menyediakan sistem kerja dasar tanpa embel-embel.
Jika petunjuk di atas telah berjalan dengan baik, Anda harus bisa login ke portal Administrasi A2Billing yang akan ditemukan di http:// <your_ip_address> / A2Billing_UI /
Anda akan disajikan dengan username dan password masukkan: -
- username = root
- sandi - myroot
Klik Administrator pada sidebar, administrator menunjukkan -> mengedit
Trunks
Untuk membuat panggilan keluar, maka perlu untuk menciptakan sebuah batang.Hal ini diasumsikan bahwa Anda sudah memiliki batang yang bekerja di Trixbox / FreePBX, dan koper ini dapat digunakan dalam A2Billing.
Mengidentifikasi nama batang di FreePBX - dalam hal ini, kita akan berasumsi MYIAXTEL disebut dengan
- Pada Sidebar, Trunks -> Add trunk
- Berikan bagasi nama yang berguna - misalnya dalam kasus ini, MYIAXTEL_Trunk
- Masukkan jenis batang yang Anda gunakan di FreePBX (SIP / IAX2 / ZAP) dan masukkan jenis bagasi di "Tek Provider" Dalam kasus ini, kita akan menganggap itu sebuah batang IAX, jadi masukkan IAX2.
- Pada bagian IP Provider, cukup ketik nama bagasi Anda telah didirikan di FreePBX. Dalam contoh MYIAXTEL
- Klik "mengkonfirmasi data" di sudut kanan bawah layar
Buat Beberapa Tarif
Ada sejumlah langkah untuk menciptakan tingkat. Hubungan adalah sebagai berikut.- Satu pelanggan / Kartu memiliki satu rencana panggilan
- Rencana Panggilan dapat memiliki banyak Kartu Tingkat
- Kartu Tingkat dapat memiliki Tarif Banyak.
- Pada sidebar, klik Ratecard -> Buat rencana panggilan
- Berikan rencana panggilan nama, misalnya StandardCallPlan
- Anda memiliki dua pilihan, LCR dan LCD - LCR akan rute panggilan di tingkat termurah untuk Anda, dan LCD akan rute panggilan pada tingkat termurah bagi pelanggan.
- Tinggalkan Paket set "Tidak Tawarkan Paket" karena kami belum membuat satu belum.
- Hapus Awalan Inter harus di set ke yes jika Anda penyedia VoIP menuntut bahwa angka-angka akan diputar dalam format IETF. Serahkan saja NO jika Anda hanya ingin panggilan keluar seperti.
- Kami akan menganggap dalam kasus ini bahwa Anda memiliki penyedia VoIP misalnya yang menuntut format yang IETF untuk dial Inggris Anda akan panggil 44 xxx xxx xxx daripada 0044 ... atau 01144 ... sehingga mengatur Awalan Inter Hapus untuk YES dan klik konfirmasi data.
Kami sekarang harus membuat ratecard baru. Untuk tujuan demonstrasi, kita akan menyebutnya StandardRates
- Klik "Buat Ratecard baru" di sidebar.
- Dalam TariffName masukkan StandardRates
- Pilih MYIAXTEL_trunk di bidang bagasi dan konfirmasi data.
Kembali dan klik "Daftar Rencana Panggilan" dan jika semuanya berjalan dengan baik masih, Anda akan melihat StandardCallPlan terdaftar. Klik Edit pada akhir baris, dan pada boittom halaman, dalam dropdown, pilih StandardRates dibuat sebelumnya Klik Add, dan konfirmasi data.
Ketika Anda mendapatkan harga dari penyedia yang berbeda, mereka dapat ditambahkan ke dalam rencana panggilan dan dipilih atas dasar harga.
Tambahkan Beberapa Tarif
Kami sekarang harus menambahkan beberapa tingkat. Harga dapat diimpor dalam jumlah besar dari file CSV, atau diketik dalam satu pada suatu waktu. Jika tingkat untuk tujuan tidak ada, maka A2Billing tidak dapat memberikan panggilan.
Setiap kode panggilan untuk setiap tujuan perlu ditambahkan. Hal ini penting untuk akurat dengan kode panggilan. Sebagai contoh, jika ada tujuan, katakanlah premium dinilai kode panggilan di Afrika Timur bahwa Anda berada di bawah pengisian, seseorang dapat membuat banyak uang dengan biaya Anda.
Sayangnya, tidak ada daftar kode definitif panggilan dengan rincian yang memadai yang bisa saya temukan di internet. Namun, operator seluler Anda harus dapat menyediakan Anda dengan daftar kode panggilan dan biaya yang mereka buat.
Daftar negara dengan kode panggilan disertakan dengan A2Billing bawah Misc - Awalan> Browse. Namun daftar ini, tidak memperhitungkan tujuan akun seperti Bilangan Nilai Handphone dan Premium.
Jadi untuk saat ini, kami uji melalui VoIP, kami penyedia VoIP menuntut agar kita mengirim mereka digit dalam format IETF, dan kami ingin membuat panggilan keluar pertama atas A2Billing ke nomor nasional Inggris. Nasional Inggris nomor hanya dimulai dengan baik 441 atau 442
Jadi kita akan menambahkan tingkat pertama. Asumsikan penagihan ke detik terdekat, biaya adalah 1 US sen per menit dan kami menjual pada 2 sen per menit. Kita mengasumsikan semuanya dalam dolar AS untuk saat ini karena kita tidak mengubah mata uang default.
NB. Untuk mengubah mata uang default, Edit base_currency a2billing.conf <currency = dari choice> Anda Setiap mata uang memiliki pengenal 3 huruf unik. Untuk menemukan identitas, klik Penagihan -> Daftar Mata Uang di sidebar, kemudian berburu untuk negara Anda. Ketika a2billing.conf disimpan, Anda dapat memperbarui nilai tukar mata uang di layar.
- Klik Ratecard -> Tambahkan Tingkat
- Pilih ratecard yang Anda menambahkan tingkat ke dalam dropdown ratecard
- Masukkan awalan panggilan sebagai 441-442. Hal ini akan memungkinkan setiap panggilan keluar sebagai 441 ... dan 442 ...
- Masukkan nama untuk tujuan - Inggris Nasional
- Mengatur tingkat membeli - dalam hal ini 0,01
- Mengatur durasi minimal - mengasumsikan 1 seperti dalam 1 detik
- Mengatur Blok Penagihan Buyrate, asumsikan 1 lagi. Jika Anda chaged ke menit terdekat, kemudian meletakkan 60.
- Taruh dalam tingkat penjualan - 0,02
- Durasi Sellrate min - 1
- Blok sellrate Penagihan - 1 untuk penagihan per detik.
- Biaya menghubungkan dan melepaskan muatan dapat dibiarkan kosong untuk saat ini
- Biarkan Trunk untuk tidak didefinisikan, seperti yang kita definisikan sebelumnya untuk ratecard secara keseluruhan.
- dan akhirnya mengkonfirmasi data.
Menciptakan Pelanggan Pertama
Pelanggan dapat dibuat satu per satu dari antarmuka Admin, dibuat dalam massal dari layar admin, atau dibuat dari pelanggan pendaftaran halaman di http:// <Your_IP_Address>> / A2Billing_UI/SignupDalam rangka untuk menciptakan pelanggan dari halaman pendaftaran, email keluar harus bekerja (tipe setup-mail dari command line)
Dalam contoh ini - kita akan menciptakan pelanggan baru dari antarmuka admin.
- Pelanggan Klik -> Buat Pelanggan
- Tambahkan keseimbangan, misalnya 10
- Pilih StandardCallPlan kita buat sebelumnya
- Diaktifkan = yes
- Signup Konfirmasi = yes
- Masukkan Nama Anda dan alamat email di bidang yang sesuai
- dan mengkonfirmasi data.
Buat Account SIP
Asumsikan kita menggunakan telepon SIP untuk tujuan demonstrasi. Prinsip yang sama berlaku untuk telepon IAX juga.- Dalam pelanggan Daftar, klik tombol SIP
- Klik "Hasilkan Additional_A2Billing.conf
- Klik untuk reload server asterisk.
- Klik Pelanggan -> Daftar Teman SIP, dan harus ada entri baru di sana.
- Klik edit di akhir baris.
- Hostname adalah Alamat IP dari Trixbox Anda
- Ekstensi Anda / Nama pengguna akan menjadi angka di Bidang "Username"
- Rahasia Anda akan menjadi angka di Bidang "Rahasia"
- Dan memastikan bahwa modus DTMF adalah sama pada telepon Anda seperti di bidang DTMFMODE.
Membuat panggilan
Ada satu perubahan kecil untuk dibuat untuk a2billing.conf dalam aplikasi ini - set "use_dnid = yes" di a2billing.conf dan menyimpan file.Dial nomor yang ingin mencoba - dalam contoh kita, Anda hanya dapat memanggil nomor yang diawali dengan 441, dan 442 atau 00441 atau 00442. Pengaturan panggilan Rencananya akan strip nomor awalan internasional dari panggilan, jika mereka ada.
Tekan mengirim, dan Anda akan mendengar keseimbangan Anda saat ini, jumlah menit Anda dapat memanggil tujuan itu, dan kemudian jika semuanya telah berjalan dengan baik, maka Anda harus terhubung ke ujung jauh.
Membuat A2Billing diakses dari dunia luar
Dalam rangka untuk panggilan ke A2Billing dari dunia luar, kita akan membutuhkan DID menunjuk Trixbox, atau bahkan saluran telepon biasa.Kami menangkap panggilan Rute Inbound di Trixbox / FreePBX dan kirim ke A2Billing.
Karena FreePBX hanya memungkinkan Anda untuk mengirim panggilan ke konteks kustom yang diawali dengan "Custom" dalam kita perlu menambahkan konteks kustom dalam ekstensi-a2billing.conf
Jadi dalam mengedit konfigurasi, vi atau editor teks favorit Anda, tambahkan baris berikut ke ekstensi-a2billing.conf sehingga seluruh file terlihat seperti ini: -
[a2billing] exten => _X.,1,Answer exten => _X.,n,Wait(1) exten => _X.,n,DeadAGI(a2billing.php|1) exten => _X.,n,Hangup [custom-a2billing] exten => _X.,1,Answer exten => _X.,n,Wait(1) exten => _X.,n,DeadAGI(a2billing.php|1) exten => _X.,n,HangupLalu pergi ke Rute Inbound di FreePBX / Trixbox dan menambahkan rute inbound baru
- Masukkan DID dalam jumlah DID.
- Pilih App Kustom: tombol radio dan di bidang Aplikasi Kustom masukkan string berikut: -
- kemudian menyerahkan dan menerapkan perubahan konfigurasi.
Anda harus dapat memanggil nomor tersebut, dan Anda akan mendengar, "Silakan masukkan nomor rekening Anda" Ketik nomor kartu Anda. Itu adalah bidang pertama dalam A2Billing -> Pelanggan -> Daftar Pelanggan -> Edit
Saldo Anda kemudian akan membacakan kepada Anda, maka Anda dapat memanggil nomor tersebut, durasi maksimal akan membacakan kepada Anda, maka Anda harus terhubung ke nomor yang dipanggil.
NB. Anda harus menambahkan nomor akses Anda ke no_auth_dnid di a2billing.conf, sehingga A2B tahu untuk tidak pernah mencoba untuk menghubungi nomor ini keluar.
Lampiran
- a2b_trixbox_2.2_installer_FRESH.sh (5.1 kB) - ditambahkan oleh RIVKHI pada 01/12/2011
Langganan:
Postingan (Atom)