Difference between revisions of "OpenSER Routing"
Jump to navigation
Jump to search
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | Beberapa tip routing sederhana | + | ==Beberapa tip routing sederhana== |
− | Untuk mengarahkan ke semua nomor 08* ke PSTN Gateway, yang misalnya berada di alamat 192.168.0.95:5061. Lakukan perintah | + | Untuk mengarahkan ke semua nomor 08* ke PSTN Gateway, yang misalnya berada di alamat '''192.168.0.95:5061'''. Lakukan perintah |
− | if(uri=~"sip:08[0-9]+@*") | + | if('''uri=~"sip:08[0-9]+@.*"''') |
{ | { | ||
# forward ke PSTN gateway di 192.168.0.95:5061 | # forward ke PSTN gateway di 192.168.0.95:5061 | ||
Line 18: | Line 18: | ||
exit; | exit; | ||
} | } | ||
+ | |||
+ | Sebaiknya PSTN gateway menggunakan Fixed IP address, agar memudahkan proses routing. | ||
+ | |||
+ | |||
+ | |||
+ | Teknik mengurangi (strip) dan menambahkan (prefix) nomor | ||
+ | |||
+ | if (uri=~"^sip:00[1-9][0-9]*@example\.net") { | ||
+ | # strip leading "00" | ||
+ | # (change example.net to your domainname or skip the stuff after the "@") | ||
+ | strip(2); | ||
+ | # (adjust, if your international prefix is something else than "00") | ||
+ | prefix("+"); | ||
+ | }; | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==Pranala Menarik== | ||
+ | |||
+ | * [[OpenSER Softswitch]] | ||
+ | * [[VoIP]] |
Latest revision as of 14:05, 12 March 2008
Beberapa tip routing sederhana
Untuk mengarahkan ke semua nomor 08* ke PSTN Gateway, yang misalnya berada di alamat 192.168.0.95:5061. Lakukan perintah
if(uri=~"sip:08[0-9]+@.*") { # forward ke PSTN gateway di 192.168.0.95:5061 rewritehostport("192.168.0.95:5061"); route(1); } route[1] { # send it out now; use stateful forwarding as it works reliably # even for UDP2TCP if (!t_relay()) { sl_reply_error(); }; exit; }
Sebaiknya PSTN gateway menggunakan Fixed IP address, agar memudahkan proses routing.
Teknik mengurangi (strip) dan menambahkan (prefix) nomor
if (uri=~"^sip:00[1-9][0-9]*@example\.net") { # strip leading "00" # (change example.net to your domainname or skip the stuff after the "@") strip(2); # (adjust, if your international prefix is something else than "00") prefix("+"); };