diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2012-09-12 22:59:54 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2013-06-17 09:38:50 +0200 |
commit | 0adefd304ec03ce689fba1531e4d7701f522909b (patch) | |
tree | 7aeee1cca1ba2d37553dff2ba77184b9623bd3b1 | |
parent | 1728798f621f1c88fa8647b809505066de280178 (diff) |
mgcp: Remember the initial sequence number of the stream
This information is required for calculating the packet loss at the
end of a phone call.
-rw-r--r-- | openbsc/include/openbsc/mgcp_internal.h | 1 | ||||
-rw-r--r-- | openbsc/src/libmgcp/mgcp_network.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/mgcp_internal.h b/openbsc/include/openbsc/mgcp_internal.h index 6375be7ab..a0d364dc8 100644 --- a/openbsc/include/openbsc/mgcp_internal.h +++ b/openbsc/include/openbsc/mgcp_internal.h @@ -46,6 +46,7 @@ struct mgcp_rtp_state { uint32_t orig_ssrc; uint32_t ssrc; + int first_seq_no; uint16_t seq_no; int seq_offset; uint32_t last_timestamp; diff --git a/openbsc/src/libmgcp/mgcp_network.c b/openbsc/src/libmgcp/mgcp_network.c index 275e47758..3f4e7f046 100644 --- a/openbsc/src/libmgcp/mgcp_network.c +++ b/openbsc/src/libmgcp/mgcp_network.c @@ -114,6 +114,7 @@ static void patch_and_count(struct mgcp_endpoint *endp, struct mgcp_rtp_state *s timestamp = ntohl(rtp_hdr->timestamp); if (!state->initialized) { + state->first_seq_no = seq; state->seq_no = seq - 1; state->ssrc = state->orig_ssrc = rtp_hdr->ssrc; state->initialized = 1; |