OpenSIPS: dispatcher
Referensi http://www.opensips.org/html/docs/modules/1.6.x/dispatcher.html
1.4.1.  ds_select_dst(set, alg)
The method selects a destination from addresses set.
Meaning of the parameters is as follows:
- set - the id of the set from where to pick up destination address. It is the first column in destination list file.
 - alg - the algorithm used to select the destination address.
 
“0” - hash over callid “1” - hash over from uri. “2” - hash over to uri. “3” - hash over request-uri. “4” - round-robin (next destination). "5” - hash over authorization-username (Proxy-Authorization or "normal" authorization). If no username is found, round robin is used. “6” - random (using rand()). “7” - hash over the content of PVs string. Note: This works only when the parameter hash_pvar is set. “8” - the first entry in set is chosen. “X” - if the algorithm is not implemented, the first entry in set is chosen.
If the bit 2 in 'flags' is set, the rest of the addresses from the destination set is stored in AVP list. You can use 'ds_next_dst()' to use next address to achieve serial forking to all possible destinations.
This function can be used from REQUEST_ROUTE and FAILURE_ROUTE.
Example 1.26. ds_select_dst usage
...
ds_select_dst("1", "0");
...
1.6.1. Destination List File
Each destination point must be on one line. First token is the set id, followed by destination address. Optionally, the third field can be flags value (1 - destination inactive, 2 - destination in probing mod -- you can do bitwise OR to set both flags). The set id must be an integer value. Destination address must be a valid SIP URI. Empty lines or lines starting with “#” are ignored.
Example 1.28. dispatcher list file
... # $Id: dispatcher.list 5901 2009-07-21 07:45:05Z bogdan_iancu $ # dispatcher destination sets # # line format # setit(integer) destination(sip uri) flags (integer, optional) # proxies 2 sip:127.0.0.1:5080 2 sip:127.0.0.1:5082 # gateways 1 sip:127.0.0.1:7070 1 sip:127.0.0.1:7072 1 sip:127.0.0.1:7074 ...
1.6.2. OpenSIPS config file
Next picture displays a sample usage of dispatcher.
Example 1.29. OpenSIPS config script - sample dispatcher usage
...
#
# $Id: dispatcher.cfg 5901 2009-07-21 07:45:05Z bogdan_iancu $
# sample config file for dispatcher module
#
debug=9          # debug level (cmd line: -dddddddddd)
fork=no
log_stderror=yes  # (cmd line: -E)
children=2
check_via=no      # (cmd. line: -v)
dns=off           # (cmd. line: -r)
rev_dns=off       # (cmd. line: -R)
port=5060
# for more info: sip_router -h
# ------------------ module loading ----------------------------------
mpath="/usr/local/lib/opensips/modules/"
loadmodule "maxfwd.so"
loadmodule "sl.so"
loadmodule "dispatcher.so"
# loadmodule "modules/tm/tm.so"
# ----------------- setting module-specific parameters ---------------
# -- dispatcher params --
modparam("dispatcher", "list_file", "../etc/dispatcher.list")
# modparam("dispatcher", "force_dst", 1)
route{
	if ( !mf_process_maxfwd_header("10") )
	{
	 	sl_send_reply("483","To Many Hops");
	 	drop();
	};
	
	ds_select_dst("2", "0");
	
	forward(); 
	# t_relay();
}
loadmodule "dispatcher.so"
.
modparam("dispatcher","list_file","/usr/local/etc/opensips/dispatcher.cfg")
.
changed route to use dispatcher
route[3]{
   if (uri =~ "sip:001[0-9]@*"){
       log(1, "Forwarding to Asterisk \n");
       ds_select_dst("2","4");
       forward();
       route(1);
   exit;
 }
My dispatcher Config Looks like below
dispatcher.cfg
2 sip:a2b-asterisk-ip:5062 2 sip:a2b-asterisk-ip2:5062
Lebih Dalam
- VoIP: Trunk
 - VoIP: Asterisk menerima Anonymous Call
 - VoIP: Asterisk route ke arah IP PBX lain dengan kode area
 - VoIP: Cara Mengkonfigurasi Trunk di Asterisk
 - VoIP: Cara Mengkonfigurasi Dial Out Melalui Trunk di Asterisk
 - VoIP: Asterisk forward call ke IP softswitch lain
 
Asterisk Round Robin
OpenSIPS
OpenSIPS round robin
Referensi
- http://www.opensips.org/html/docs/modules/1.6.x/dispatcher.html
 - http://opensips-open-sip-server.1449251.n2.nabble.com/opensips-dispatcher-asterisk-problem-td3180606.html
 
Pranala Menarik
Persiapan
- USRP: High Precision Clock
 - USRP: Menyambungkan ClockTamer ke USRP1
 - USRP: Kalibrasi ClockTamer
 - USRP: ClockTamer Control Protocol
 - USRP: ClockTamer Flashing
 - USRP: Instalasi Board
 - OpenBTS: GIT Source Code
 - USRP: Rangkaian Board USRP
 - OpenBTS: Tethr untuk Bencana Alam
 - USRP: Tip Pemesanan
 
Script
- OpenBTS: Script Membuat GNURadio 3.4.2 di Ubuntu 13.04
 - OpenBTS: Script Membuat OpenBTS dan yate di Ubuntu 13.04
 - OpenBTS: Script Membuat OpenBTS 2.8.0 di RangeNetwork Dev Kit
 - OpenBTS: Script Membuat OpenBTS di RangeNetwork Dev Kit
 
OpenBTS 2.6
- GNURadio
 - GNURadio: Ubuntu Install
 - GNURadio: Menggunakan UHD
 - GNURadio: Ubuntu Install GNURadio 3.4.2 RECOMMENDED
 - GNURadio: Ubuntu Install GNURadio 3.4.2 Clock 52MHz RECOMMENDED
 - GNURadio: Ubuntu 13.04 Install GNURadio 3.4.2 Clock 52MHz NOT RECOMMENDED
 - GNURadio: Contoh Aplikasi
 - GNURadio: Spectrum Analizer GSM
 - GNURadio: Mengubah board RFX1800 menjadi RFX900
 - GNURadio: Programming Untuk Pemula
 - OpenBTS: Ubuntu Install RECOMMENDED
 - OpenBTS: Ubuntu Install OpenBTS 2.6 Clock 52MHz RECOMMENDED
 - OpenBTS: Ubuntu 13.04 Install OpenBTS 2.6 Clock 52MHz NOT RECOMMENDED
 - OpenBTS: Konfigurasi RECOMMENDED
 - OpenBTS: Kalibrasi
 - OpenBTS: Konfigurasi Asterisk untuk OpenBTS RECOMMENDED
 - OpenBTS: Menjalankan smqueue
 - OpenBTS: Mengoperasikan BTS RECOMMENDED
 - OpenBTS: Tampilan di Nokia saat pakai OpenBTS
 - OpenBTS: Operasi 1800 MHz
 - OpenBTS: Beberapa Tips
 - OpenBTS: USRP2
 - OpenBTS: Amplifier
 - OpenBTS: SMS
 - AirProbe
 
OpenBTS 2.8
- GNURadio: Ubuntu 11.10 Install NOT RECOMMENED
 - GNURadio: Ubuntu 11.10 instalasi menggunakan Repo NOT RECOMMENDED
 - GNURadio: Download GNURadio
 - GNURadio: Install UHD
 - GNURadio: Ubuntu 11.10 Instal GNURadio 3.3.0
 - GNURadio: Ubuntu 12.10 Instal GNURadio 3.3.0
 - GNURadio: Ubuntu 12.10 Instal GNURadio 3.4.1 NOT RECOMMENDED
 - GNURadio: Ubuntu 11.10 Instal GNURadio 3.4.2 RECOMMENDED
 - GNURadio: Ubuntu 12.04 Instal GNURadio 3.4.2 RECOMMENDED
 - GNURadio: Ubuntu 12.04.1 Instal GNURadio 3.4.2 RECOMMENDED
 - GNURadio: Ubuntu 12.10 Instal GNURadio 3.4.2 NOT RECOMMENDED
 - GNURadio: Ubuntu 13.04 Instal GNURadio 3.4.2 RECOMMENDED
 - GNURadio: Ubuntu 11.10 Instal GNURadio 3.5.0 NOT RECOMMENDED
 - GNURadio: Ubuntu 11.10 Instal GNURadio 3.5.3.2 NOT RECOMMENDED
 - GNURadio: Ubuntu 11.10 Instal GNURadio 3.6.0 NOT RECOMMENDED
 - GNURadio: Ubuntu 11.10 Install dari GIT GNURadio NOT RECOMMENDED
 - GNURadio: Ubuntu 11.10 cek USRP Daughter Board
 - GNURadio: UHD NOT RECOMMENDED
 - GNURadio: UHD Image NOT RECOMMENDED
 - GNURadio: UHD burn EEPROM RFX Board di USRP1 NOT RECOMMENDED
 - GNURadio: UHD Identifikasi Device
 - OpenBTS: Ubuntu 11.10 Install
 - OpenBTS: dari GIT ttsou
 - OpenBTS: 2.8 dari SVN Install
 - OpenBTS: 2.8 dari SVN Install Clock 52MHz RECOMMENDED
 - OpenBTS: 2.8 dari SVN Install Clock 52MHz di Ubuntu 12.10 RECOMMENDED
 - OpenBTS: 2.8 dari SVN Install Clock 52MHz di Ubuntu 13.04 RECOMMENDED
 - OpenBTS: 2.8 dari SVN 2.8.0 Install Clock 52MHz di Ubuntu 13.04 RECOMMENDED
 - OpenBTS: 2.8 dari SVN Install Clock 52MHz dengan UHD tanpa GNURadio NOT RECOMMENDED
 - OpenBTS: 2.8 Edit User di sqlite3.db RECOMMEND
 - OpenBTS: Yate Softswitch RECOMMENDED
 - OpenBTS: Yate Softswitch install Ubuntu 12.10 RECOMMENDED
 - OpenBTS: Yate Softswitch install Ubuntu 13.04 RECOMMENDED
 - OpenBTS: Yate Config Test
 - OpenBTS: 2.8 Instalasi Real Time Asterisk RECOMMENDED
 - OpenBTS: 2.8 Menjalankan RECOMMENDED
 - OpenBTS: 2.8 Konfigurasi
 - OpenBTS: 2.8 Konfigurasi Cognitive Radio Elsabagh
 - OpenBTS: 2.8 Konfigurasi Subscriber Registery
 - OpenBTS: Database SQLite
 - OpenBTS: Set SQLite Subscriber Registry secara manual
 - OpenBTS: Set SQLite parameter smqueue
 - OpenBTS: FreeSWITCH
 
Multi OpenBTS 2.8
- OpenBTS: Pola Multi OpenBTS RECOMMENDED
 - Multi OpenBTS: Catatan Konfigurasi RECOMMENDED
 
OpenBTS 3.1.x
- OpenBTS: Install UHD untuk USRP1
 - OpenBTS: UHD Identifikasi Device
 - OpenBTS: OpenBTS 3.1.3 Compile Tidak bisa untuk USRP1
 - OpenBTS: Yate Compile
 
Ettus E110
- OpenBTS: E110 Cara Login
 - OpenBTS: E110 Install Image di MicroSD *RECOMMENDED*
 - OpenBTS: E110 Cek Daughter Board
 - OpenBTS: E110 Mengubah Master Clock
 - OpenBTS: E110 Kalibrasi Clock
 - OpenBTS: E110 Konfigurasi Jaringan
 - OpenBTS: E110 Bekerja dengan opkg
 - OpenBTS: E110 Instalasi iptables
 - OpenBTS: E110 GNURadio
 - OpenBTS: E110 Compile UHD Not Recommended
 - OpenBTS: E110 Compile UHD dari Release Bukan git Not Recommended
 - OpenBTS: E110 UHD burn EEPROM RFX Board Not Recommended
 - OpenBTS: E110 Install UHD Image Not Recommended
 - OpenBTS: E110 Instalasi OpenBTS
 - OpenBTS: E110 Instalasi OpenBTS 2.6 NOT RECOMMENDED
 - OpenBTS: E110 Instalasi OpenBTS 2.8 untuk MultiBTS *RECOMMENDED*
 - OpenBTS: E110 Yate Softswitch
 
Ettus N210
- OpenBTS: N210 Instalasi GPSDO Kit
 - OpenBTS: N210 GNURadio
 - OpenBTS: N210 GNURadio 3.7.0
 - OpenBTS: N210 Instalasi OpenBTS
 - OpenBTS: N210 Instalasi Yate
 - OpenBTS: N210 Yate Config Test
 - OpenBTS: N210 Burn Firmware
 
RangeNetworks
- OpenBTS: RangeNetwork Foto
 - OpenBTS: RangeNetwork menggunakan USB recovery image
 - OpenBTS: RangeNetwork Default Setting
 - OpenBTS: RangeNetwork Instalasi UHD
 - OpenBTS: RangeNetwork Compile GNURadio UHD
 - OpenBTS: RangeNetwork Compile
 - OpenBTS: RangeNetwork Compile OpenBTS 2.8.0
 - OpenBTS: RangeNetwork Compile OpenBTS 3.1.3
 - OpenBTS: RangeNetwork Yate Compile *RECOMMENDED*
 - OpenBTS: RangeNetwork Web Interface
 - OpenBTS: RangeNetwork Trunk ke Asterisk Lain
 - VoIP: Trunk
 
GPRS
Briker OpenBTS
FreeSWITCH OpenBTS
Power Amplifier
Lain Lain
- OpenBTS: Materi Magang di ICTWATCH
 - OpenBTS: Seminar Outline
 - OpenBTS: Workshop Outline
 - Membuat Base Station GSM Open Source
 - Teknologi Selular
 - GSM: Daftar Channel Frekuensi
 - Wireless Internet
 - OpenBSC
 - AirProbe
 - Base station subsystem
 - GSM
 - Asterisk
 - Mobile phone
 
Catatan Legal dan Pendukung
- Siapa Bilang OpenBTS Ilegal?
 - OpenBTS: Catatan MNC dan MCC Indonesia
 - OpenBTS: Catatan MNC dan MCC COOL
 - OpenBTS : Alokasi Frekuensi Operator GSM Indonesia
 - GSM: Daftar Channel Frekuensi
 
Catatan Sejarah
- 2011/04/30 - Workshop OpenBTS Pertama di Indonesia dilakukan di Univ Gajah Putih Takengon Aceh Tengah
 - OpenBTS: Daftar Workshop atau Seminar yang pernah dilakukan
 - OpenBTS: Daftar Artikel di Media
 - OpenBTS: Permohonan Kanal dan DID untuk OpenBTS
 - OpenBTS: 2013/02/19 - OpenBTS TelkomSel Mengudara di Muscat Oman
 - OpenBTS: Beroperasi di Papua
 
Dokumentasi Video
- http://www.metrotvnews.com/read/newsprograms/2012/10/14/14624/212/Teknologi-BTS
 - http://youtu.be/8ogOcUSpINU (1/6)
 - http://youtu.be/F5d7HGuhppk (2/6)
 - http://youtu.be/90Jgq6bOgrQ (3/6)
 - http://youtu.be/cNkx_qNqdfc (4/6)
 - http://youtu.be/6LCuoeI57ak (5/6)
 - http://youtu.be/-dEqcHoIlYk (6/6)
 - http://www.youtube.com/watch?v=Ff_rw4kAOZg&feature=share