Daniel Willmann | 2778031 | 2018-07-31 18:53:45 +0200 | [diff] [blame] | 1 | == Configuring OsmoMGW |
| 2 | |
| 3 | A basic configation of OsmoMGW mainly consists of specifying the IP address |
| 4 | and port on which to listen to MGCP commands, but changing the port range at |
| 5 | which the RTP streams terminate as well as limiting operation to a single call |
| 6 | agent can be done as well as changing the number of endpoints. |
| 7 | |
| 8 | === Configuring MGCP |
| 9 | |
| 10 | By default OsmoMGW listens for MGCP on port 2427 on any IP address. If a call |
| 11 | agent address is configured then OsmoMGW will only answer MGCP commands from |
| 12 | that IP port 2727, otherwise all sources are handled. A domain can be |
| 13 | specified |
| 14 | |
| 15 | .Example: MGCP configuration |
| 16 | ---- |
| 17 | OsmoMGW(config-mgcp)# bind ip 127.0.0.1 |
| 18 | OsmoMGW(config-mgcp)# bind port 2427 |
| 19 | OsmoMGW(config-mgcp)# call-agent ip 127.0.0.1 |
| 20 | OsmoMGW(config-mgcp)# domain mgw-bsc |
| 21 | OsmoMGW(config-mgcp)# local ip 127.0.0.1 |
| 22 | ---- |
| 23 | |
| 24 | === Configuring the trunk |
| 25 | |
Philipp Maier | 9b444fd | 2020-11-25 16:09:16 +0100 | [diff] [blame] | 26 | The first trunk is considered a virtual trunk in OsmoMGW. All |
Daniel Willmann | 2778031 | 2018-07-31 18:53:45 +0200 | [diff] [blame] | 27 | endpoints of type "rtpbridge" are routed here. The virtual trunk is configured |
| 28 | in the config-mgcp context. |
| 29 | |
| 30 | All other trunks are configured in the config-mgcp-trunk context, but the |
Philipp Maier | 242e9ad | 2020-11-25 16:22:40 +0100 | [diff] [blame] | 31 | commands used are identical. Right now trunks are considered only for "ds/e1" |
| 32 | type endpoints. |
Daniel Willmann | 2778031 | 2018-07-31 18:53:45 +0200 | [diff] [blame] | 33 | |
| 34 | .Example: MGCP trunk configuration |
| 35 | ---- |
| 36 | OsmoMGW(config-mgcp)# number endpoints 63 <1> |
| 37 | OsmoMGW(config-mgcp)# rtp bind-ip 10.0.0.1 <2> |
| 38 | OsmoMGW(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 | |
| 44 | There are some options to tweak how RTP forwarding behaves in OsmoMGW: |
| 45 | |
| 46 | .Example: MGCP trunk rtp options |
| 47 | ---- |
| 48 | OsmoMGW(config-mgcp)# rtp keep-alive 30 <1> |
| 49 | OsmoMGW(config-mgcp)# rtp-patch ssrc <2> |
| 50 | OsmoMGW(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 Maier | 870f94b | 2020-11-25 16:28:54 +0100 | [diff] [blame] | 56 | NOTE: Changes to trunks that affect resource allocation, such as newly created |
| 57 | trunks or a change of the number of available endpoints, require a full restart |
| 58 | of osmo-mgw! |
Daniel Willmann | 2778031 | 2018-07-31 18:53:45 +0200 | [diff] [blame] | 59 | |
Philipp Maier | 276b595 | 2020-11-26 00:51:21 +0100 | [diff] [blame] | 60 | === E1 trunk considerations |
| 61 | |
| 62 | While the RTP bridge trunks are natively based on IP no special considerations |
| 63 | are required during setup. E1 trunks are mapped on a physical E1 line, which has |
| 64 | to be configured as shown below. |
| 65 | |
| 66 | .Example: E1 line setup |
| 67 | ---- |
| 68 | OsmoMGW(config-e1_input)# e1_line 0 driver dahdi <1> |
| 69 | OsmoMGW(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 | |
| 74 | In osmo-mgw the e1_input node is used to configure the physical E1 line. The |
| 75 | line number will be used internally to identify the configured E1 line. The |
| 76 | port number is the physical E1 connector (sometimes called 'span') at the E1 |
| 77 | hardware. Per trunk an individual E1 line will be needed. Beware that the E1 |
| 78 | driver may also need configuration settings that are not discussed here. |
| 79 | |
| 80 | .Example: E1 trunk setup |
| 81 | ---- |
| 82 | OsmoMGW(config-mgcp)# trunk 0 <1> |
| 83 | OsmoMGW(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 | |
| 88 | The E1 trunk is created along with a number, typically starting at 0, but if |
| 89 | required any number from 0-64 is allowed. The E1 trunk configuration concerning |
| 90 | the IP related aspects is nearly identical to the configuration of the virtual |
| 91 | trunk. However, it is important that the user assigns one of the E1 line numbers |
| 92 | that were configured under the e1_input node. |
| 93 | |
Philipp Maier | fae09f4 | 2021-11-25 12:56:10 +0100 | [diff] [blame] | 94 | NOTE: The endpoint name that is used on MGCP level will include the trunk number, |
| 95 | not the E1 line number. For simplicity (and compatibility with OsmoBSC) it is |
| 96 | recommended to use equal numbers for trunk and E1 line. However, if required any |
| 97 | E1 line can be mapped flexible on any trunk as long as the mapping is bijective. |
| 98 | |
Philipp Maier | 276b595 | 2020-11-26 00:51:21 +0100 | [diff] [blame] | 99 | .Example: A typical configuration with one E1 trunk |
| 100 | ---- |
| 101 | e1_input |
| 102 | e1_line 0 driver dahdi |
| 103 | e1_line 0 port 2 |
| 104 | mgcp |
| 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 Welte | 5936a9c | 2021-04-27 22:30:52 +0200 | [diff] [blame] | 109 | rtp ip-dscp 46 |
Philipp Maier | 276b595 | 2020-11-26 00:51:21 +0100 | [diff] [blame] | 110 | 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 | |
| 123 | NOTE: One E1 trunk always covers a whole E1 line. All subslots (I.640) will be mapped |
| 124 | to individual MGCP endpoints. As long as the endpoints remain unused the |
| 125 | underlying E1 timeslot is not used. |
| 126 | |
| 127 | NOTE: The E1 trunk implementation also works with T1 lines, however since T1 has |
| 128 | 24 instead of 31 usable timeslots only the endpoints that fall into that 1-24 timeslot |
| 129 | range will be useable. |