Skip to content

app_sms.c: Fix sending and receiving SMS messages in protocol 2 #1188

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2025

Conversation

Itzanh
Copy link
Contributor

@Itzanh Itzanh commented Apr 6, 2025

This fixes bugs in SMS messaging to SMS-capable analog phones that prevented app_sms.c from talking to phones using SMS protocol 2.

  • Fix MORX message reception (from phone to Asterisk) in SMS protocol 2
  • Fix MTTX message transmission (from Asterisk to phone) in SMS protocol 2

One of the bugs caused messages to have random characters and junk appended at the end up to the character limit. Another bug prevented Asterisk from sending messages from Asterisk to the phone at all. A final bug caused the transmission from Asterisk to the phone to take a long time because app_sms.c did not hang up after correctly sending the message, causing the phone to have to time out and hang up in order to complete the message transmission.

This was tested with a Linksys PAP2T and with a GrandStream HT814, sending and receiving messages with Telefónica DOMO Mensajes phones from Telefónica Spain. I had to play with both the network jitter buffer and the dB gain to get it to work. One of my phones required the gain to be set to +3dB for it to work, while another required it to be set to +6dB.

Only MORX and MTTX were tested, I did not test sending and receiving messages to a TelCo SMSC.

Copy link

sangoma-oss-cla bot commented Apr 6, 2025

CLA assistant check
All committers have signed the CLA.

Copy link

github-actions bot commented Apr 6, 2025

Workflow PRCheck completed successfully

@Itzanh
Copy link
Contributor Author

Itzanh commented Apr 6, 2025

There's a comment saying that I didn't sign the CLA. I signed the CLA a few minutes ago, I'm not sure if this is a refresh error.

@Itzanh
Copy link
Contributor Author

Itzanh commented Apr 9, 2025

Is there something else that I ought to do? If so, please let me know. Thanks!

@seanbright
Copy link
Contributor

The automated message you are referring to only updates when changes are pushed to the PR. There is nothing for you to do until this is reviewed.

@asterisk asterisk deleted a comment from Itzanh Apr 11, 2025
apps/app_sms.c Outdated
Comment on lines 111 to 113
<para>It is also important to adjust the gain dB of the ATA. In one of my Telefónica DOMO Mensajes phones,
I had to set the dB level to +3dB, and in another phone of the same model, I had to set the gain to +6dB
to get it to work.</para></note>
Copy link
Contributor

Choose a reason for hiding this comment

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

If possible, rewrite this bit to avoid first-person phrasing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I was not aware that I had to do that. Would the following sentence be acceptable?

It is also important to adjust the gain dB of the ATA. Some Telefónica DOMO Mensajes phones may require the gain to be set to +3dB,
and others even up to +6dB, in order to work.

Copy link
Contributor

Choose a reason for hiding this comment

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

That’d be fine

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I made a commit to fix this. This is my first time at contributing, so I'm a little lost. If there's anything else I should do, please let me know. Thanks!

Copy link

Workflow PRCheck completed successfully

@Itzanh
Copy link
Contributor Author

Itzanh commented Apr 20, 2025

I've done the changes as needed. I was wondering if there was anything else for me to do... if so, please let me know. Thanks!

@seanbright
Copy link
Contributor

There is nothing for you to do until this is reviewed.

Copy link
Member

@jcolp jcolp left a comment

Choose a reason for hiding this comment

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

Disclaimer: I have no ability to test this.

Copy link
Member

@gtjoseph gtjoseph left a comment

Choose a reason for hiding this comment

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

A few housekeeping things...

  • Move the "UserNote" in both the commit message and the PR description to the end. Otherwise the whole commit message will become the user note. Strictly speaking, you don't actually need the UserNote for this commit so you could just remove it altogether if you want.
  • Squash the two commits into one using git rebase -i HEAD~2 and changing the command for the Fix the first use... commit to fixup. Then do a git push --force.

@gtjoseph
Copy link
Member

Oh, you should also cherry-pick this PR to the 20, 21 and 22 branches.

Copy link

github-actions bot commented May 1, 2025

Workflow PRCheck failed
master-pjs1: FAILED TEST: channels/pjsip/oli/uri_parameter

@Itzanh
Copy link
Contributor Author

Itzanh commented May 11, 2025

Hi, are there any updates on this? Is there anything else I ought to do?

@jcolp
Copy link
Member

jcolp commented May 11, 2025

There are no updates or requests that I see. If something is needed then something will comment. As it is this is pending review and approval by someone else.

@asteriskteam
Copy link
Contributor

This PR has been marked stale because it has been in "Changes Requested" or "submitter-action-required" state for 28 days or more. Please make the requested changes within 14 days or the PR will be closed.

@Itzanh
Copy link
Contributor Author

Itzanh commented Jun 10, 2025

I don't understand, why has this issue been marked as stale? I thought I had no more changes to do from my part? Then how come it's in "Changes requested"?

@jcolp jcolp removed the stale label Jun 10, 2025
@jcolp jcolp requested a review from gtjoseph June 10, 2025 08:15
@jcolp
Copy link
Member

jcolp commented Jun 10, 2025

George was still marked as having changes requested, I've removed the stale flag and re-requested review from him.

@jcolp jcolp dismissed gtjoseph’s stale review June 10, 2025 08:16

Needs a fresh review.

@gtjoseph gtjoseph added the cherry-pick-test Trigger dry run of cherry-picks label Jun 11, 2025
@github-actions github-actions bot removed the cherry-pick-test Trigger dry run of cherry-picks label Jun 11, 2025
@github-actions github-actions bot added cherry-pick-testing-in-progress Cherry-Pick tests in progress and removed cherry-pick-testing-in-progress Cherry-Pick tests in progress labels Jun 11, 2025
@gtjoseph gtjoseph added the cherry-pick-test Trigger dry run of cherry-picks label Jun 11, 2025
@github-actions github-actions bot added cherry-pick-testing-in-progress Cherry-Pick tests in progress cherry-pick-checks-failed Cherry-Pick checks failed and removed cherry-pick-test Trigger dry run of cherry-picks cherry-pick-testing-in-progress Cherry-Pick tests in progress labels Jun 11, 2025
Copy link

Workflow PRCPCheck failed
20-ari1: FAILED TEST: rest_api/bridges/softmix_unhold
21-local_iax2_mgr: FAILED TEST: channels/iax2/hangupcause

Copy link

Successfully merged to branch master and cherry-picked to ["20","21","22"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants