Skip to content

NethVoice CTI: WebRTC registration fails when the user display name starts with * #8160

Closed

Description

@edospadoni

The NethVoice CTI phone (phone-island) registers its WebRTC extension through Janus. The user's display name, taken from /user/me, is sent as display_name in the Janus SIP register request. Janus hands it to sofia-sip, which puts it in the Contact header unquoted when it only contains SIP token characters. If the name starts with *, Asterisk (PJSIP) parses the header as the wildcard contact (Contact: *), drops the whole message and never answers: the REGISTER times out after 32 seconds (408), phone-island raises the webrtc_down alert ("Connection error"), reloads and loops every 30-40 seconds. The CTI is unusable for that user. Names containing " make sofia-sip fail immediately with error 900.

Some customers name their users *<extension> - Name to show the extension in the CTI, so every user of the tenant is affected.

Steps to reproduce:

  1. In the user domain, set a user's display name to *140 - John Doe.
  2. Apply the configuration in the NethVoice admin, so that FreePBX regenerates users.json for nethcti-server (the new name reaches the CTI only after this step).
  3. Log in to NethVoice CTI with that user.

Expected behavior:
The WebRTC extension registers regardless of the characters in the display name. The display name is cosmetic: Asterisk uses the caller id configured on the endpoint, so it has no functional value.

Actual behavior:
"Connection error" is shown every ~30 seconds and the phone-island reloads in a loop. Browser console:

[REGISTER] Sending registration request {sipExten: '92140', ...}
[JANUS-GUARD] Initialization timeout (30s) - resetting isInitializing flag
Alert detected (webrtc_down or socket_down), triggering automatic reload

Janus log:

Registering user sip:92140@127.0.0.1 (auth=..., secret 127.0.0.1) @ sip:92140@127.0.0.1 through sip:127.0.0.1:20221
[92140][nua_r_register]: 408 Request Timeout

Asterisk full log (11 lines per attempt, one per retransmission):

WARNING[144] pjproject: sip_transport.c Dropping 538 bytes packet from UDP 172.16.10.70:42308 : PJSIP syntax error exception when parsing 'Contact' header on line 8 col 1

REGISTER captured on the loopback interface:

Contact: *140 - John Doe <sip:92140@172.16.10.70:54993;transport=udp>

The same happens with the Janus HTTP API alone: a register request with display_name: "*140 - John Doe" ends with registration_failed 408, the same request with display_name: "John Doe" ends with registered in less than a second. Quoting the name on the client side does not work: sofia-sip does not escape double quotes and fails with registration_failed 900.

Only the web CTI and NethLink are affected, since both embed phone-island. The mobile app registers directly through the SIP proxy and never goes through Janus.

Suggested fix:
Sanitize the display name in phone-island before sending it to Janus: strip ", \, control characters and any leading *. Workaround for affected tenants: remove the leading * from the users' display names and apply the configuration in the NethVoice admin.

Components:

  • nethesis/phone-island 1.0.14, src/lib/webrtc/messages.ts (register() sends display_name: name || '')
  • NethVoice 1.7.8 (nethvoice-cti 0.15.28), Janus 1.4.2, Asterisk 18.26.3

Activity

  1. self-assigned this
    on Sep 9, 2026
  2. added
    nethvoiceBug or features releted to the NethVoice project
    nethvoice-ctiThe issue is related to NethLink (NethVoice Web client)
    on Sep 9, 2026
  3. added theissue type on Sep 9, 2026
  4. added this to the NethVoice 1.7 milestone on Sep 9, 2026
  5. moved this from Todo to In Progress in NethVoiceon Sep 9, 2026
  6. edospadoni commented on Sep 21, 2026

    @edospadoni
    MemberAuthor
  7. added
    testingPackages are available from testing repositories
    on Sep 21, 2026
  8. edospadoni commented on Sep 21, 2026

    @edospadoni
    MemberAuthor

    Test case:

    1. In the user domain, set a user's display name to *140 - John Doe and apply the configuration in the NethVoice admin, so that nethcti-server's users.json is regenerated.
    2. Log in to NethVoice CTI with that user.
      • Before the fix: "Connection error" every ~30 seconds, Janus logs [ext][nua_r_register]: 408 Request Timeout, Asterisk full log shows Dropping ... PJSIP syntax error exception when parsing 'Contact' header.
      • With the fix: the extension registers (Successfully registered in the Janus log), no Dropping lines in Asterisk.
    3. Regression: a plain name still registers and still appears in the REGISTER Contact (e.g. Contact: John Doe <sip:...>); names with ,, ;, accents or (...) still register.
  9. moved this from In Progress to Testing in NethVoiceon Sep 21, 2026
  10. removed their assignment
    on Sep 23, 2026
  11. removed
    testingPackages are available from testing repositories
    on Sep 23, 2026
  12. moved this from Testing to Verified in NethVoiceon Sep 23, 2026
  13. Amygos commented on Oct 12, 2026

    @Amygos
    Member

    Release nethesis/ns8-nethvoice 1.7.10

  14. removed
    verifiedAll test cases were verified successfully
    on Oct 12, 2026
  15. moved this from Verified to In Progress in NethVoiceon Oct 12, 2026
  16. moved this from In Progress to Done in NethVoiceon Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    nethvoiceBug or features releted to the NethVoice projectnethvoice-ctiThe issue is related to NethLink (NethVoice Web client)

    Type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions