Skip to content

Make extensions register: ATAs, fax machines and softphones - #27

Merged
tahiralmas merged 1 commit into
ictcorefrom
fix/extension-registration
Oct 10, 2026
Merged

tahiralmas merged 1 commit into
ictcorefrom
fix/extension-registration

Conversation

@tahiralmas

Copy link
Copy Markdown
Member

No ICTCore extension could register on the ictcore SIP profile, so ATAs, fax machines and softphones never worked against a stock install. On the ICTFax 6.0 image every REGISTER got 403 Forbidden, even with the right password. There were three causes:

  1. The SIP user was never written on create. DB::update stamps created_by with the session user, but Account::save never copied it back to the object. Extension::save then saw user_id 0 and deleted the user's directory file instead of writing it. The account only appeared after a second save.
  2. The directory was linked outside any domain. The installers linked directory/ictcore.xml at directory/ level, where FreeSWITCH never looks up users. It now goes into directory/default/, inside the default domain.
  3. Domain mismatch behind NAT. Devices register with the domain they were configured with, usually the public IP or a hostname. That never matches $${domain} on a cloud or NATed host. force-register-domain maps every registration onto the ICTCore domain.

Also:

  • Demo users removed. The installers now delete the vanilla FreeSWITCH users 1000-1019. Their published password is 1234, and 1001/1234 registered on 5060.
  • RTP range pinned. The Docker image now pins RTP to 16384-16484, the range it publishes. FreeSWITCH's default of 16384-32768 drops media at the Docker boundary once calls drift past 16484.

Tested on the ICTFax image, with a SIP client registering the way an ATA does:

before after
extension created the way the GUI does it (POST /accounts) no SIP user written written immediately
REGISTER, domain = server's own IP 403 200
REGISTER, domain = public IP / hostname 403 200
REGISTER, wrong password 403 403
demo user 1001 / 1234 200 403

After merging: existing installs need the directory/default link, the demo users removed and a reloadxml. Every existing extension also needs one save (or PUT /accounts/{id}) to write its user. The ICTFax and ICTDialer images pick this up via ICTCORE_REF (ictinnovations/ictfax#127, ictinnovations/ictdialer#60).

Three faults stopped every ICTCore extension from registering on the ictcore
SIP profile (verified on the ICTFax 6.0 image, 403 Forbidden on each REGISTER):

- A new account was saved without its owner on the object. DB::update stamps
  created_by, but Account::save never copied it back, so Extension::save saw
  user_id 0 and deleted the SIP user instead of writing it. The account only
  appeared after a second save.
- The installers linked directory/ictcore.xml at directory/ level, outside any
  <domain>. FreeSWITCH never finds users there. It now links into
  directory/default/, inside the default domain.
- Devices send the domain they were configured with (the public IP or a
  hostname), which never matches $${domain} on a NATed or cloud host.
  force-register-domain maps them all onto the ICTCore domain.

Also: the vanilla demo users 1000-1019 (password 1234) are removed by the
installers, since they registered on 5060 with a published password, and the
Docker image pins RTP to the 16384-16484 range it publishes.
tahiralmas pushed a commit to ictinnovations/ictfax that referenced this pull request Oct 9, 2026
…d range

Link ICTCore's directory inside the default domain (directory/default/), where
FreeSWITCH looks users up; at directory/ level every extension REGISTER got 403.
Remove the vanilla demo users 1000-1019, whose published password 1234 let them
register on 5060. Pin RTP to 16384-16484, the range this image publishes.
Pairs with ictinnovations/ictcore#27 (Account owner on first save, force-register-domain).
tahiralmas pushed a commit to ictinnovations/ictdialer that referenced this pull request Oct 9, 2026
…d range

Link ICTCore's directory inside the default domain (directory/default/), where
FreeSWITCH looks users up; at directory/ level every extension REGISTER got 403.
Remove the vanilla demo users 1000-1019, whose published password 1234 let them
register on 5060. Pin RTP to 16384-16484, the range this image publishes.
Pairs with ictinnovations/ictcore#27 (Account owner on first save, force-register-domain).
@tahiralmas
tahiralmas merged commit 73a03c7 into ictcore Oct 10, 2026
1 check passed
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