Difference between revisions of "OpenBTS: Set SQLite Subscriber Registry secara manual"
Jump to navigation
Jump to search
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) |
||
Line 56: | Line 56: | ||
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,); | 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,); | ||
+ | |||
+ | insert into sip_buddies (name,username,type,context,host) values ('1000','1000','friend','phones','dynamic'); | ||
+ | insert into sip_buddies (name,username,type,context,host) values ('1001','1001','friend','phones','dynamic'); | ||
+ | insert into sip_buddies (name,ipaddr) values ('imsi2','imsi2ipaddr'); | ||
+ | insert into sip_buddies (name) values('imsi_r1'); -- rand should generate | ||
+ | insert into sip_buddies (name,rand) values('imsi_r2','12345678901234567890123456789012'); -- rand should return this | ||
+ | insert into sip_buddies (name,ki) values ('imsi_a1','7f4d7fbff290e20e60466bc7b5b08e4b'); -- auth should calc | ||
+ | insert into sip_buddies (name) values ('imsi_a2'); -- auth should save passed rand and sres | ||
+ | insert into sip_buddies (name,rand,sres) values ('imsi_a3','123456789012345678901234567890a3','1234567890123456789012a3'); -- auth should verify rand and sres |
Revision as of 21:28, 7 December 2013
Masuk ke Database SubscriberRegistry
sqlite3 /var/lib/asterisk/sqlite3dir/sqlite3.db
akan keluar
sqlite>
Cek database
.databases
seq name file --- --------------- ---------------------------------------------------------- 0 main /var/lib/asterisk/sqlite3dir/sqlite3.db 1 temp
Cek table
.tables
DIALDATA_TABLE RRLP SIP_BUDDIES rates
Cek isi table DIALDATA_TABLE
select * from DIALDATA_TABLE;
1|2100|IMSI001010000000000 2|2001|IMSI001010000000001 3|2002|IMSI001010000000002
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|
Masukan ke Table DIALDATA_TABLE
Contoh
INSERT into DIALDATA_TABLE VALUES(1,2100,'IMSI001010000000000');
INSERT INTO dialdata_table (exten, dial) VALUES ('1000', '1000'); INSERT INTO dialdata_table (exten, dial) VALUES ('1001', '1001');
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,);
insert into sip_buddies (name,username,type,context,host) values ('1000','1000','friend','phones','dynamic'); insert into sip_buddies (name,username,type,context,host) values ('1001','1001','friend','phones','dynamic'); insert into sip_buddies (name,ipaddr) values ('imsi2','imsi2ipaddr'); insert into sip_buddies (name) values('imsi_r1'); -- rand should generate insert into sip_buddies (name,rand) values('imsi_r2','12345678901234567890123456789012'); -- rand should return this insert into sip_buddies (name,ki) values ('imsi_a1','7f4d7fbff290e20e60466bc7b5b08e4b'); -- auth should calc insert into sip_buddies (name) values ('imsi_a2'); -- auth should save passed rand and sres insert into sip_buddies (name,rand,sres) values ('imsi_a3','123456789012345678901234567890a3','1234567890123456789012a3'); -- auth should verify rand and sres