Skip to content

Conversation

@amolghode1981
Copy link

Description
Initial draft for defining VoIP network statically. This workspace does following

  1. Imports https://github.com/RocketChat/Voip.Server.Official.Image/blob/main/compose.new.yaml with a modification for drachtio config file path. This is renamed as compose.voip.yml
  2. Allows a way to define a private VoIP network in compose.network.yml.
  3. Allows user to choose a different subnet and static ip addresses for FreeSwitch and Drachtio.

Testing

  1. Verified assigning extension to user.
  2. Verified internal call via SIP.

TODO

  1. Add podman compose command.
  2. Cleanly deal with the duplication of voip yaml.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

compose.voip.yml Outdated
Comment on lines 9 to 10
EXTENSION_PASSWORD: ${EXTENSION_PASSWORD:-}
EXTENSIONS: ${EXTENSIONS:-}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
EXTENSION_PASSWORD: ${EXTENSION_PASSWORD:-}
EXTENSIONS: ${EXTENSIONS:-}

From RC 7.12 forward, the extensions no longer need to exist on FreeSwitch. FreeSwitch will accept any extension number that matches the regex on the dialplan and forward that to Drachtio, who then notifies Rocket.Chat and so it's up to Rocket.Chat to determine if a number is valid or not.

RC admins are free to use any string value as an extension number when assigning it to an user. When a call comes in, Rocket.Chat will accept any value that is associated with an user.

compose.voip.yml Outdated
Comment on lines 14 to 18
INTERNAL_INBOUND_MEDIA: "relay"
INTERNAL_OUTBOUND_TO_INTERNAL_MEDIA: "relay"
INTERNAL_OUTBOUND_TO_EXTERNAL_MEDIA: "relay"
EXTERNAL_INBOUND_MEDIA: "relay"
EXTERNAL_OUTBOUND_TO_INTERNAL_MEDIA: "relay"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
INTERNAL_INBOUND_MEDIA: "relay"
INTERNAL_OUTBOUND_TO_INTERNAL_MEDIA: "relay"
INTERNAL_OUTBOUND_TO_EXTERNAL_MEDIA: "relay"
EXTERNAL_INBOUND_MEDIA: "relay"
EXTERNAL_OUTBOUND_TO_INTERNAL_MEDIA: "relay"

Those are probably never gonna be changed by anyone on the new architecture so we can stop including them on the compose file (relay is already their default value).

compose.voip.yml Outdated
EXTERNAL_OUTBOUND_TO_INTERNAL_MEDIA: "relay"
ACCEPT_EXTERNAL_CALLS: false
USE_LEGACY_ARCH: false
DRACHTIO_DOMAIN: ${VOIP_DRACHTIO_DOMAIN}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
DRACHTIO_DOMAIN: ${VOIP_DRACHTIO_DOMAIN}
DRACHTIO_DOMAIN: ${VOIP_DRACHTIO_DOMAIN:-drachtio}

Setting this to Drachtio's container name by default, as it needs to have a value.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

compose.voip.yml Outdated
USE_LEGACY_ARCH: false
DRACHTIO_DOMAIN: ${VOIP_DRACHTIO_DOMAIN}
expose:
- 8021
Copy link

@pierre-lehnen-rc pierre-lehnen-rc Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 8021

8021 is not used anymore (RC 7.12+)

compose.voip.yml Outdated
- 8021
- 5060
ports:
- 8021:8021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 8021:8021

8021 is not used anymore

Comment on lines +11 to +12
RTP_START_PORT: 20000
RTP_END_PORT: 20046

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should allow customizing these ports via envvars on the .env file as well? Though we would need to set the same values on the port list as well.

I'm also not 100% sure if those should be the default values for those ports. This default list limits FS to 23 concurrent calls, which might be too small a number for production envs. We were using those values up to now because EKS has a limit of 50 open ports.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Could we do this in the next iteration when we have a basic stack building repo ready? Ideally I dont want to compose this file here but instead, link it to the one from here i.e the VoiP server image repo. Please let me know once you push your PR #52. Then I can work on adding a reference instead of copying the file.

<drachtio>

<!-- udp port to listen on for client connections (default 9022), and shared secret used to authenticate clients -->
<admin port="9022" secret="set a strong secret here">0.0.0.0</admin>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be best if we could configure drachtio without needing to change this file directly.

I'll check what our options are and try to make something to avoid this.

<cdrs>false</cdrs>

<monitoring>
<prometheus port="8088">127.0.0.1</prometheus>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also be configured to work with the prometheus configured on the existing compose.monitoring.yaml

…tensions.

2. Removing extension details from docker compose as well as from the environment variables.
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.

3 participants