-
Notifications
You must be signed in to change notification settings - Fork 6
/
vty
58 lines (58 loc) · 1.19 KB
/
vty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/bin/expect -f
set vty [lindex $argv 0]
set host localhost
switch $vty {
hlr { set port 4258 }
bsc { set port 4242 }
mgw { set port 4243 }
mgw2 {
set host 127.0.0.2
set port 4243
}
sg { set port 4245 }
msc { set port 4254 }
sip { set port 4256 }
gg { set port 4260 }
osmo-hlr { set port 4258 }
osmo-bsc { set port 4242 }
osmo-mgw { set port 4243 }
osmo-mgw-for-bsc { set port 4243 }
osmo-mgw-for-msc {
set host 127.0.0.2
set port 4243
}
osmo-sgsn { set port 4245 }
osmo-msc { set port 4254 }
osmo-sip-connector { set port 4256 }
osmo-ggsn { set port 4260 }
default { set port 4242 }
}
spawn telnet localhost $port
expect ">"
send "enable\r"
expect "#"
send "logging enable\r"
expect "#"
send "logging print category 1\r"
expect "#"
send "logging print category-hex 0\r"
expect "#"
send "logging print level 1\r"
expect "#"
send "logging print file basename last\r"
expect "#"
send "logging print extended-timestamp 1\r"
expect "#"
send "logging level set-all notice\r"
expect "#"
switch $vty {
msc {
send "logging level mm info\r"
expect "#"
send "logging level cc info\r"
expect "#"
}
}
send "logging filter all 1\r"
expect "#"
interact