gsup_protocol.hrl: SM-RP-MR IE is mandatory for READY-FOR-SM messages

Change-Id: I09b6b8afb1c0d28d4bf214fb8f01c21c895b8546
This commit is contained in:
Vadim Yanitskiy 2019-12-26 13:18:02 +01:00 committed by laforge
parent e708e54b70
commit 657fee93f6
2 changed files with 12 additions and 5 deletions

View File

@ -198,9 +198,9 @@
16#28 => #{message_type => mt_forward_sm_req, mandatory => [sm_rp_mr, sm_rp_da, sm_rp_oa, sm_rp_ui], optional => [sm_rp_mms]},
16#29 => #{message_type => mt_forward_sm_err, mandatory => [sm_rp_mr, sm_rp_cause], optional => [sm_rp_ui]},
16#2a => #{message_type => mt_forward_sm_res, mandatory => [sm_rp_mr], optional => [sm_rp_ui]},
16#2c => #{message_type => ready_for_sm_req, mandatory => [sm_alert_reason]},
16#2d => #{message_type => ready_for_sm_err, mandatory => [sm_rp_cause], optional => [sm_rp_ui]},
16#2e => #{message_type => ready_for_sm_res, mandatory => []},
16#2c => #{message_type => ready_for_sm_req, mandatory => [sm_rp_mr, sm_alert_reason]},
16#2d => #{message_type => ready_for_sm_err, mandatory => [sm_rp_mr, sm_rp_cause], optional => [sm_rp_ui]},
16#2e => #{message_type => ready_for_sm_res, mandatory => [sm_rp_mr]},
16#30 => #{message_type => check_imei_req, mandatory => [imei]},
16#31 => #{message_type => check_imei_err, mandatory => [cause]},
16#32 => #{message_type => check_imei_res, mandatory => [imei_check_result]},

View File

@ -375,9 +375,16 @@ mt_forward_sm_res_test() ->
?assertEqual(Bin, gsup_protocol:encode(Map)).
ready_for_sm_req_test() ->
Bin = <<16#2c, ?TEST_IMSI_IE, 16#46, 16#01, 16#02>>,
Bin = <<16#2c, ?TEST_IMSI_IE,
16#40, 16#01, %% SM-RP-MR
16#41,
16#46, 16#01, %% Alert reason
16#02
>>,
Map = #{imsi => <<"123456789012345">>,
message_type => ready_for_sm_req,sm_alert_reason => 2},
message_type => ready_for_sm_req,
sm_rp_mr => 65,
sm_alert_reason => 2},
?assertEqual(Map, gsup_protocol:decode(Bin)),
?assertEqual(Bin, gsup_protocol:encode(Map)).