OpenBTS: Set SQLite Subscriber Registry secara manual

From SpeedyWiki

Jump to: navigation, search

Masuk ke Database SubscriberRegistry

sudo su
sqlite3 /var/lib/asterisk/sqlite3dir/sqlite3.db

akan keluar

sqlite>

Contents

[edit] Cek database

.databases
seq  name             file                                                      
---  ---------------  ----------------------------------------------------------
0    main             /var/lib/asterisk/sqlite3dir/sqlite3.db                   
1    temp   


[edit] Cek table

.tables
DIALDATA_TABLE  RRLP            SIP_BUDDIES     rates  


[edit] Cek isi table DIALDATA_TABLE

select * from DIALDATA_TABLE;
1|2100|IMSI001010000000000
2|2001|IMSI001010000000001
3|2002|IMSI001010000000002

Atau

select exten, dial from dialdata_table;
2100|IMSI001010000000000
2001|IMSI001010000000001
2002|IMSI001010000000002


[edit] Cek isi table SIP_BUDDIES

select * from SIP_BUDDIES ;
1|IMSI001010000000000|phones|allowed_not_screened|||||||dynamic|no|friend||||2100|0.0.0.0|info||||||||||||all|gsm||127.0.0.1|5062|IMSI001010000000000||||||||||1|no|no|no|no||no||yes|accept|1800|90|uas||||yes|500||120|||0||0||yes|no||||1|0|0|5ce5d6b846184773c5a070411204f864|972f8224|||0|0|1||0|
2|IMSI001010000000001|phones|allowed_not_screened|||||||dynamic|no|friend||||2001|0.0.0.0|info||||||||||||all|gsm||127.0.0.1|5062|IMSI001010000000001||||||||||1|no|no|no|no||no||yes|accept|1800|90|uas||||yes|500||120|||0||0||yes|no||||1|0|0|||2104076337d2c83cfae1669771cbc944||0|0|1||0|
3|IMSI001010000000002|phones|allowed_not_screened|||||||dynamic|no|friend||||2002|0.0.0.0|info||||||||||||all|gsm||127.0.0.1|5062|IMSI001010000000002||||||||||1|no|no|no|no||no||yes|accept|1800|90|uas||||yes|500||120|||0||0||yes|no||||1|0|0|||d7c1dd6599fd6d9737939032b1d6d918||0|0|1||0|

atau

select name, username, type, context, host from sip_buddies;
IMSI001010000000000|IMSI001010000000000|friend|phones|dynamic
IMSI001010000000001|IMSI001010000000001|friend|phones|dynamic
IMSI001010000000002|IMSI001010000000002|friend|phones|dynamic

Atau

select name, username, callerid, type, context, host from sip_buddies;
IMSI001010000000000|IMSI001010000000000|2100|friend|phones|dynamic
IMSI001010000000001|IMSI001010000000001|2001|friend|phones|dynamic
IMSI001010000000002|IMSI001010000000002|2002|friend|phones|dynamic

[edit] Masukan Sebuah IMSI / Sebuah Handphone

Untuk satu buah nomor IMSI510110052460084 yang akan diberi nomor 2222 kita perlu memasukan

INSERT INTO dialdata_table (exten, dial) VALUES ('2222', 'IMSI510110052460084');
insert into sip_buddies (name,username,callerid,ipaddr,type,context,host) values ('IMSI510110052460084','IMSI510110052460084','2222','127.0.0.1','friend','phones','dynamic');


[edit] Masukan SIP Phone

Untuk satu buah SIP Phone yang akan diberi nomor misalnya 2000, dll kita perlu memasukan

INSERT INTO dialdata_table (exten, dial) VALUES ('2000', '2000');
insert into sip_buddies (name,username,callerid,secret,ipaddr,type,context,host) values ('2000','2000','2000','123456','127.0.0.1','friend','phones','dynamic');


INSERT INTO dialdata_table (exten, dial) VALUES ('2030', '2030');
insert into sip_buddies (name,username,callerid,secret,ipaddr,type,context,host) values ('2030','2030','2030','123456','127.0.0.1','friend','phones','dynamic');


INSERT INTO dialdata_table (exten, dial) VALUES ('2031', '2031');
insert into sip_buddies (name,username,callerid,secret,ipaddr,type,context,host) values ('2031','2031','2031','123456','127.0.0.1','friend','phones','dynamic');


INSERT INTO dialdata_table (exten, dial) VALUES ('2032', '2032');
insert into sip_buddies (name,username,callerid,secret,ipaddr,type,context,host) values ('2032','2032','2032','123456','127.0.0.1','friend','phones','dynamic');

[edit] Masukan ke Table DIALDATA_TABLE

Contoh

INSERT INTO dialdata_table (exten, dial) VALUES ('2222', 'IMSI510110052460084');
INSERT INTO dialdata_table (exten, dial) VALUES ('1111', 'IMSI510112410440152');

id akan di tambahkan secara automatis

[edit] DELETE data DIALDATA_TABLE

Contoh

DELETE from DIALDATA_TABLE where ID = 7;

[edit] Masukan ke Table SIP_BUDDIES

INSERT into SIP_BUDDIES VALUES (3,'IMSI001010000000002','phones','allowed_not_screened',,,,,,,'dynamic','no','friend',,,,2002,'0.0.0.0','info',,,,,,,,,,,,'all','gsm',,'127.0.0.1',5062,'IMSI001010000000002',,,,,,,,,,1,'no','no','no','no',,'no',,'yes','accept',1800,90,'uas',,,,'yes',500,,120,,,0,,0,,'yes','no',,,,1,0,0,,,'d7c1dd6599fd6d9737939032b1d6d918',,0,0,1,,0,);

atau

insert into sip_buddies (name,username,callerid,ipaddr,type,context,host) values ('IMSI510110052460084','IMSI510110052460084','2222','127.0.0.1','friend','phones','dynamic');
insert into sip_buddies (name,username,callerid,ipaddr,type,context,host) values ('IMSI510112410440152','IMSI510112410440152','1111','127.0.0.1','friend','phones','dynamic');

id akan ditambahkan secara automatis.

Detail parameter SIP_BUDDIES dapat dilihat di file

more /usr/local/src/openbts-2.8.0/openbts/trunk/SR/test.srmanager/test.db.init

[edit] DELETE data SIP_BUDDIES

Contoh

DELETE from SIP_BUDDIES where ID = 7;


[edit] Test Data

Lakukan

sudo su
sqlite3 /var/lib/asterisk/sqlite3dir/sqlite3.db

Pada prompt

sqlite>

Ketik

INSERT INTO dialdata_table (exten, dial) VALUES ('2001', 'IMSI001010000000001');
insert into sip_buddies (name,username,callerid,ipaddr,type,context,host) values ('IMSI001010000000001','IMSI001010000000001','2001','127.0.0.1','friend','phones','dynamic');
INSERT INTO dialdata_table (exten, dial) VALUES ('2002', 'IMSI001010000000002');
insert into sip_buddies (name,username,callerid,ipaddr,type,context,host) values ('IMSI001010000000002','IMSI001010000000002','2002','127.0.0.1','friend','phones','dynamic');
INSERT INTO dialdata_table (exten, dial) VALUES ('2003', 'IMSI510112410440152');
insert into sip_buddies (name,username,callerid,ipaddr,type,context,host) values ('IMSI510112410440152','IMSI510112410440152','2003','127.0.0.1','friend','phones','dynamic');

[edit] Referensi

[edit] Pranala Menarik

[edit] Persiapan

[edit] Script

[edit] OpenBTS 2.6

[edit] OpenBTS 2.8

[edit] Multi OpenBTS 2.8

[edit] OpenBTS 3.1.x

[edit] Ettus E110

[edit] Ettus N210

[edit] RangeNetworks


[edit] GPRS

[edit] Briker OpenBTS

[edit] FreeSWITCH OpenBTS

[edit] Power Amplifier

[edit] Lain Lain

[edit] Catatan Legal dan Pendukung

[edit] Catatan Sejarah

[edit] Dokumentasi Video

[edit] Perjuangan OpenBTS

Personal tools