SCCP: support encoding of non-integer pointcodes (auto conversion)
diff --git a/src/sccp_codec.erl b/src/sccp_codec.erl
index b3989e6..39f25a2 100644
--- a/src/sccp_codec.erl
+++ b/src/sccp_codec.erl
@@ -269,13 +269,16 @@
{GTind, <<TransType:8, NumPlan:4, Enc:4, 0:1, Nature:7, PhoneBin/binary>>}
end.
-encode_pc(PointCode) ->
+encode_pc(PointCode) when is_integer(PointCode) ->
case PointCode of
undef ->
{0, <<>>};
_ ->
{1, <<PointCode:16/little>>}
- end.
+ end;
+encode_pc(PcRec) ->
+ PcInt = osmo_util:pointcode2int(PcRec),
+ encode_pc(PcInt).
encode_ssn(SSN) ->
case SSN of