[GH-ISSUE #321] message.phone.received loses numbers in contact field #44

Closed
opened 2026-03-03 16:36:11 +03:00 by kerem · 1 comment
Owner

Originally created by @seanesbo on GitHub (Dec 12, 2023).
Original GitHub issue: https://github.com/NdoleStudio/httpsms/issues/321

I am from Colombia, the cell phone numbers we use are 10 digits.
In some cases it does not correctly register the cell phone number of the contact who sent the message.
As an example;
This is a correct notification:

{"specversion":"1.0","id":"e090dda8-e868-4485-92cc-60992c96f9d2","source":"/v1/messages/receive","type":"message.phone.received", "datacontenttype":"application/json","time":"2023-12-12T17:01:04.821071813Z","data":{"message_id":"92e21f8d-24c0-43d2-8b7b-80d83101ed5c","user_id ":"eKn7UVx9clQhcDdVoueZVRSfnlC2","owner":"+57322659XXXX","contact":"+333227XXXX","timestamp":"2023-12-12T17:01:03.845Z","content":"Miguel"," sim":"SIM1"}}

The contact field, 333227XXXX, has the correct length of 10 digits.

In other cases, inform the contact field in this way:

"contact":"+31373XXXX"
"contact":"+31445XXXX"

The real contact numbers are:
310373XXXX
310445XXXX

In short, the third number that is a 0 is losing it.

Note:Replace some numbers with X for safety

Originally created by @seanesbo on GitHub (Dec 12, 2023). Original GitHub issue: https://github.com/NdoleStudio/httpsms/issues/321 I am from Colombia, the cell phone numbers we use are 10 digits. In some cases it does not correctly register the cell phone number of the contact who sent the message. As an example; This is a correct notification: {"specversion":"1.0","id":"e090dda8-e868-4485-92cc-60992c96f9d2","source":"/v1/messages/receive","type":"message.phone.received", "datacontenttype":"application/json","time":"2023-12-12T17:01:04.821071813Z","data":{"message_id":"92e21f8d-24c0-43d2-8b7b-80d83101ed5c","user_id ":"eKn7UVx9clQhcDdVoueZVRSfnlC2","owner":"+57322659XXXX","contact":"+333227XXXX","timestamp":"2023-12-12T17:01:03.845Z","content":"Miguel"," sim":"SIM1"}} The contact field, 333227XXXX, has the correct length of 10 digits. In other cases, inform the contact field in this way: "contact":"+31373XXXX" "contact":"+31445XXXX" The real contact numbers are: 310373XXXX 310445XXXX In short, the third number that is a 0 is losing it. Note:Replace some numbers with X for safety
kerem closed this issue 2026-03-03 16:36:12 +03:00
Author
Owner

@AchoArnold commented on GitHub (Dec 13, 2023):

Hello @seanesbo,

I use this library to format the phone number https://github.com/google/libphonenumber

The application doesn't remove/overwrite phone numbers, If you see +31373XXXX it means this is the phone number that was received from your mobile phone when the SMS was received. There is no logic in the code to remove 0 from a phone number.

Thaks.

<!-- gh-comment-id:1854507370 --> @AchoArnold commented on GitHub (Dec 13, 2023): Hello @seanesbo, I use this library to format the phone number https://github.com/google/libphonenumber The application doesn't remove/overwrite phone numbers, If you see +31373XXXX it means this is the phone number that was received from your mobile phone when the SMS was received. There is no logic in the code to remove `0` from a phone number. Thaks.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/httpsms#44
No description provided.