Skip to content

skipPhoneValidation strips * and # characters from phone numbers #327

@ilrabu0418

Description

@ilrabu0418

Problem

When using skipPhoneValidation=true, the phone number normalization in MessagesService.kt strips all characters except digits and +:

true -> phoneNumber.filter { it.isDigit() || it == '+' }

This removes * and # characters, which are valid telephony characters needed for some carrier features.

Use Case

Korean carriers (SKT, KT, LG U+) provide dual number (듀얼넘버) services where you send SMS to *77XXXXXXXXXXX to route messages through a secondary phone number. The * character is essential for this carrier-level routing.

Example:

  • Input: *7701012345678
  • Current behavior: stripped to 7701012345678 (carrier routing fails)
  • Expected behavior: *7701012345678 preserved (carrier routes correctly)

Proposed Fix

In MessagesService.kt, line ~427, change:

true -> phoneNumber.filter { it.isDigit() || it == '+' }

To:

true -> phoneNumber.filter { it.isDigit() || it == '+' || it == '*' || it == '#' }

This preserves * and # which are standard telephony characters (used in DTMF, USSD codes, and carrier prefix routing). The skipPhoneValidation=true flag already indicates the caller is taking responsibility for number formatting.

Environment

  • App version: 1.54.0
  • Android version: 14
  • Device: Galaxy (Korean carrier)
  • Cloud mode

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions