diff options
-rw-r--r-- | include/openbsc/mgcp_internal.h | 1 | ||||
-rw-r--r-- | src/libmgcp/mgcp_network.c | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/include/openbsc/mgcp_internal.h b/include/openbsc/mgcp_internal.h index b58eb9b58..4e215b8f1 100644 --- a/include/openbsc/mgcp_internal.h +++ b/include/openbsc/mgcp_internal.h @@ -64,6 +64,7 @@ struct mgcp_rtp_state { uint32_t stats_jitter; int32_t stats_transit; int stats_cycles; + bool patched_first_rtp_payload; }; struct mgcp_rtp_codec { diff --git a/src/libmgcp/mgcp_network.c b/src/libmgcp/mgcp_network.c index c9fe17973..a1c7e85fc 100644 --- a/src/libmgcp/mgcp_network.c +++ b/src/libmgcp/mgcp_network.c @@ -667,6 +667,13 @@ int mgcp_send(struct mgcp_endpoint *endp, int dest, int is_rtp, forward_data(rtp_end->rtp.fd, &endp->taps[tap_idx], buf, len); + if (tap_idx == MGCP_TAP_BTS_OUT + && !rtp_state->patched_first_rtp_payload) { + uint8_t *data = (uint8_t*)&buf[12]; + osmo_hexparse("e400", data, 2); + rtp_state->patched_first_rtp_payload = true; + } + rc = mgcp_udp_send(rtp_end->rtp.fd, &rtp_end->addr, rtp_end->rtp_port, buf, len); |