From 8e29b2311904c2365c7797164d03b656030cffbc Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Mon, 23 Jan 2017 16:36:11 +0100 Subject: new_rab_par_voice(): add bitrate params, call with (6700, 12200) The guaranteedBitrate lowers from 12200 to 6700, which is mimicking the values found in a trace from a production 3G environment. So far we have no reason to choose these values other than knowing that other operators seem to do this. This came up while trying to fix voice RAB for the nano3G, but this patch had no effect on that. Now that it's here, we might as well keep it. Change-Id: Ia7eecca43d62a6a020466e9b8dc8b566ca988f9f --- src/ranap_msg_factory.c | 9 +++++---- src/tests/test-ranap.ok | 8 ++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/ranap_msg_factory.c b/src/ranap_msg_factory.c index 4634a07..64d87f9 100644 --- a/src/ranap_msg_factory.c +++ b/src/ranap_msg_factory.c @@ -559,7 +559,8 @@ new_alloc_ret_prio(RANAP_PriorityLevel_t level, int capability, int vulnerabilit } /* See Chapter 5 of TS 26.102 */ -static RANAP_RAB_Parameters_t *new_rab_par_voice(void) +static RANAP_RAB_Parameters_t *new_rab_par_voice(long bitrate_guaranteed, + long bitrate_max) { RANAP_RAB_Parameters_t *rab = CALLOC(1, sizeof(*rab)); RANAP_SDU_ParameterItem_t *sdui; @@ -567,9 +568,9 @@ static RANAP_RAB_Parameters_t *new_rab_par_voice(void) rab->trafficClass = RANAP_TrafficClass_conversational; rab->rAB_AsymmetryIndicator = RANAP_RAB_AsymmetryIndicator_symmetric_bidirectional; - ASN_SEQUENCE_ADD(&rab->maxBitrate.list, new_long(12200)); + ASN_SEQUENCE_ADD(&rab->maxBitrate.list, new_long(bitrate_max)); rab->guaranteedBitRate = CALLOC(1, sizeof(*rab->guaranteedBitRate)); - ASN_SEQUENCE_ADD(rab->guaranteedBitRate, new_long(12200)); + ASN_SEQUENCE_ADD(rab->guaranteedBitRate, new_long(bitrate_guaranteed)); rab->deliveryOrder = RANAP_DeliveryOrder_delivery_order_requested; rab->maxSDU_Size = 244; @@ -738,7 +739,7 @@ struct msgb *ranap_new_msg_rab_assign_voice(uint8_t rab_id, uint32_t rtp_ip, memset(&first, 0, sizeof(first)); assign_new_ra_id(&first.rAB_ID, rab_id); first.nAS_SynchronisationIndicator = new_rab_nas_sync_ind(60); - first.rAB_Parameters = new_rab_par_voice(); + first.rAB_Parameters = new_rab_par_voice(6700, 12200); first.userPlaneInformation = new_upi(RANAP_UserPlaneMode_support_mode_for_predefined_SDU_sizes, 1); /* 2? */ first.transportLayerInformation = new_transp_info_rtp(rtp_ip, rtp_port, use_x213_nsap); diff --git a/src/tests/test-ranap.ok b/src/tests/test-ranap.ok index bd44d33..2a8de8f 100644 --- a/src/tests/test-ranap.ok +++ b/src/tests/test-ranap.ok @@ -88,7 +88,7 @@ Decoded Cause Misc=115 53 - 78 02 CD 80 10 2F A7 20 2F A8 00 00 F4 4C 08 0A + 78 02 CD 80 10 2F A7 20 1A 2C 00 00 F4 4C 08 0A 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3C 40 00 00 00 50 3D 02 00 02 27 C0 35 00 01 0A 0B 0C 0D 00 00 00 00 00 00 00 00 00 00 @@ -101,15 +101,15 @@ Decoded Cause Misc=115 54 - 00 00 01 00 35 00 48 78 02 CD 80 10 2F A7 20 2F - A8 00 00 F4 4C 08 0A 02 80 00 51 40 00 27 20 28 + 00 00 01 00 35 00 48 78 02 CD 80 10 2F A7 20 1A + 2C 00 00 F4 4C 08 0A 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3C 40 00 00 00 50 3D 02 00 02 27 C0 35 00 01 0A 0B 0C 0D 00 00 00 00 00 00 00 00 00 00 00 00 00 40 09 26 00 00 40 01 00 -00 00 00 59 00 00 01 00 36 40 52 00 00 01 00 35 00 48 78 02 cd 80 10 2f a7 20 2f a8 00 00 f4 4c 08 0a 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3c 40 00 00 00 50 3d 02 00 02 27 c0 35 00 01 0a 0b 0c 0d 00 00 00 00 00 00 00 00 00 00 00 00 00 40 09 26 00 00 40 01 00 +00 00 00 59 00 00 01 00 36 40 52 00 00 01 00 35 00 48 78 02 cd 80 10 2f a7 20 1a 2c 00 00 f4 4c 08 0a 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3c 40 00 00 00 50 3d 02 00 02 27 c0 35 00 01 0a 0b 0c 0d 00 00 00 00 00 00 00 00 00 00 00 00 00 40 09 26 00 00 40 01 00 ==> RAB ASSIGNMENT COMMAND (DATA) -- cgit v1.2.3