blob: c50f635ea70f36c6781cfa934eb8b12e531bef59 [file] [log] [blame]
Daniel Willmann27780312018-07-31 18:53:45 +02001== Configuring OsmoMGW
2
3A basic configation of OsmoMGW mainly consists of specifying the IP address
4and port on which to listen to MGCP commands, but changing the port range at
5which the RTP streams terminate as well as limiting operation to a single call
6agent can be done as well as changing the number of endpoints.
7
8=== Configuring MGCP
9
10By default OsmoMGW listens for MGCP on port 2427 on any IP address. If a call
11agent address is configured then OsmoMGW will only answer MGCP commands from
12that IP port 2727, otherwise all sources are handled. A domain can be
13specified
14
15.Example: MGCP configuration
16----
17OsmoMGW(config-mgcp)# bind ip 127.0.0.1
18OsmoMGW(config-mgcp)# bind port 2427
19OsmoMGW(config-mgcp)# call-agent ip 127.0.0.1
20OsmoMGW(config-mgcp)# domain mgw-bsc
21OsmoMGW(config-mgcp)# local ip 127.0.0.1
22----
23
24=== Configuring the trunk
25
Philipp Maier9b444fd2020-11-25 16:09:16 +010026The first trunk is considered a virtual trunk in OsmoMGW. All
Daniel Willmann27780312018-07-31 18:53:45 +020027endpoints of type "rtpbridge" are routed here. The virtual trunk is configured
28in the config-mgcp context.
29
30All other trunks are configured in the config-mgcp-trunk context, but the
Philipp Maier242e9ad2020-11-25 16:22:40 +010031commands used are identical. Right now trunks are considered only for "ds/e1"
32type endpoints.
Daniel Willmann27780312018-07-31 18:53:45 +020033
34.Example: MGCP trunk configuration
35----
36OsmoMGW(config-mgcp)# number endpoints 63 <1>
37OsmoMGW(config-mgcp)# rtp bind-ip 10.0.0.1 <2>
38OsmoMGW(config-mgcp)# rtp port-range 12000-14000 <3>
39----
40<1> Maximum number of endpoints that can be allocated at once
41<2> Use this IP when binding RTP endpoints
42<3> Use ports in this range when binding RTP endpoints
43
44There are some options to tweak how RTP forwarding behaves in OsmoMGW:
45
46.Example: MGCP trunk rtp options
47----
48OsmoMGW(config-mgcp)# rtp keep-alive 30 <1>
49OsmoMGW(config-mgcp)# rtp-patch ssrc <2>
50OsmoMGW(config-mgcp)# rtp-patch timestamp <3>
51----
52<1> Send dummy UDP packets periodically to RTP destination
53<2> Hide SSRC changes
54<3> Ensure RTP timestamp is aligned with frame duration
55
Philipp Maier870f94b2020-11-25 16:28:54 +010056NOTE: Changes to trunks that affect resource allocation, such as newly created
57trunks or a change of the number of available endpoints, require a full restart
58of osmo-mgw!
Daniel Willmann27780312018-07-31 18:53:45 +020059
Philipp Maier276b5952020-11-26 00:51:21 +010060=== E1 trunk considerations
61
62While the RTP bridge trunks are natively based on IP no special considerations
63are required during setup. E1 trunks are mapped on a physical E1 line, which has
64to be configured as shown below.
65
66.Example: E1 line setup
67----
68OsmoMGW(config-e1_input)# e1_line 0 driver dahdi <1>
69OsmoMGW(config-e1_input)# e1_line 0 port 2 <2>
70----
71<1> Name of the libosmo-abis driver implementation ("dahdi")
72<2> Port number of the physical E1 port to use (2)
73
74In osmo-mgw the e1_input node is used to configure the physical E1 line. The
75line number will be used internally to identify the configured E1 line. The
76port number is the physical E1 connector (sometimes called 'span') at the E1
77hardware. Per trunk an individual E1 line will be needed. Beware that the E1
78driver may also need configuration settings that are not discussed here.
79
80.Example: E1 trunk setup
81----
82OsmoMGW(config-mgcp)# trunk 0 <1>
83OsmoMGW(config-mgcp-trunk)# line 0 <2>
84----
85<1> Creation of a trunk (0)
86<2> Reference to the E1 line to use (0)
87
88The E1 trunk is created along with a number, typically starting at 0, but if
89required any number from 0-64 is allowed. The E1 trunk configuration concerning
90the IP related aspects is nearly identical to the configuration of the virtual
91trunk. However, it is important that the user assigns one of the E1 line numbers
92that were configured under the e1_input node.
93
Philipp Maierfae09f42021-11-25 12:56:10 +010094NOTE: The endpoint name that is used on MGCP level will include the trunk number,
95not the E1 line number. For simplicity (and compatibility with OsmoBSC) it is
96recommended to use equal numbers for trunk and E1 line. However, if required any
97E1 line can be mapped flexible on any trunk as long as the mapping is bijective.
98
Philipp Maier276b5952020-11-26 00:51:21 +010099.Example: A typical configuration with one E1 trunk
100----
101e1_input
102 e1_line 0 driver dahdi
103 e1_line 0 port 2
104mgcp
105 bind ip 127.0.0.1
106 rtp net-range 6000 6011
107 rtp net-bind-ip 192.168.100.130
108 rtp ip-probing
Harald Welte5936a9c2021-04-27 22:30:52 +0200109 rtp ip-dscp 46
Philipp Maier276b5952020-11-26 00:51:21 +0100110 no rtp keep-alive
111 bind port 2428
112 number endpoints 30
113 loop 0
114 force-realloc 1
115 osmux off
116 rtp-patch rfc5993hr
117 trunk 0
118 rtp keep-alive once
119 no rtp keep-alive
120 line 0
121----
122
123NOTE: One E1 trunk always covers a whole E1 line. All subslots (I.640) will be mapped
124to individual MGCP endpoints. As long as the endpoints remain unused the
125underlying E1 timeslot is not used.
126
127NOTE: The E1 trunk implementation also works with T1 lines, however since T1 has
12824 instead of 31 usable timeslots only the endpoints that fall into that 1-24 timeslot
129range will be useable.