Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[diameter] add a few dictionaries #9

Merged
merged 17 commits into from
Feb 10, 2023
Merged

[diameter] add a few dictionaries #9

merged 17 commits into from
Feb 10, 2023

Conversation

sebastiw
Copy link
Owner

@sebastiw sebastiw commented Feb 10, 2023

Tiny PR to add dictionaries from 3GPP.

It took a couple of weeks but now most 3GPP interfaces are added along with IETF/ETSI/ITU-T definitions 🥳 🍾

came about a bug in diameter type checker at the same time
erlang/otp#6789

@sebastiw sebastiw changed the title [diameter] add some dictionaries [diameter] add a few dictionaries Feb 10, 2023
@sebastiw sebastiw merged commit 7de459f into main Feb 10, 2023
@sebastiw sebastiw deleted the diameter-dicts branch February 10, 2023 08:36
@alishir
Copy link

alishir commented Dec 1, 2024

Hi @sebastiw,
Could you please guide me on how to use these directories in an Elixir project? Below is a snippet of my client configuration.

  defp init_diameter() do
    svc_opts = [
      {:"Origin-Host", "client.example.com"},
      {:"Origin-Realm", "example.com"},
      {:"Origin-State-Id", :diameter.origin_state_id()},
      {:"Vendor-Id", 0},
      {:"Product-Name", "Test diameter client"},
      {:"Auth-Application-Id", [4]},
      {:restrict_connections, false},
      {:strict_mbit, false},
      {:decode_format, :map},
      {:string_decode, false},
      {:application,
       [
         {:alias, :common},
         {:dictionary, @which_path?},
         {:module, Ocs.DiaCallback},
         {:call_mutates_state, false},
         {:answer_errors, :callback}
       ]}
    ]

    :ok = :diameter.start_service(@svc_name, svc_opts)

    transport_opts = [
      {:transport_module, :diameter_sctp},
      {:transport_config, [{:reuseaddr, true}, {:raddr, {127, 0, 0, 1}}, {:rport, 3868}]}
    ]

    {:ok, _} = :diameter.add_transport(@svc_name, {:connect, transport_opts})
  end

@sebastiw
Copy link
Owner Author

sebastiw commented Dec 1, 2024

So when the dictionaries have been compiled (e.g. by erlc dia_3gpp_ts_32299_GyRo.dia, or by running rebar3 compile in this library) one should be able to add the dictionary name to the applications-field in the settings as {:dictionary, :dia_3gpp_ts_32299_GyRo}

I can take a better look later today

@alishir
Copy link

alishir commented Dec 1, 2024

Thank you! I added otc to the dependencies. However, when I ran mix deps.get, I received the following messages:

Compile ASN1s: false
Compile DIA: false

@alishir
Copy link

alishir commented Dec 2, 2024

Hi @sebastiw,
I discovered that the diameter-compiler plugin was commented out in the rebar.conf file. I added the latest version and submitted a pull request.

@sebastiw
Copy link
Owner Author

sebastiw commented Dec 2, 2024

Could you open a issue on these topics please, so we can track it better.

I think there is/was a env variable you can set to make dictionaries compile, and those outputs are based on that (but maybe I removed the rebar.config.script)

I also forgot about this pr adding prefixes for the dicts to not have cyclic dependencies
#31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants