Bug 732374 - SMS sending does not work.
Summary: SMS sending does not work.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: asterisk
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jeffrey C. Ollie
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-22 08:25 UTC by David Woodhouse
Modified: 2011-10-11 02:05 UTC (History)
2 users (show)

Fixed In Version: asterisk-1.8.6.0-4.el6
Clone Of:
Environment:
Last Closed: 2011-10-03 18:09:52 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
fix (1.95 KB, patch)
2011-08-22 10:05 UTC, David Woodhouse
no flags Details | Diff

Description David Woodhouse 2011-08-22 08:25:58 UTC
When I use 'smsq' to send an SMS message, nothing happens. A file appears in /var/spool/asterisk/outgoing but Asterisk doesn't seem to *notice* it until I restart Asterisk. Only *then* does it attempt to send the message.

And even then it fails, because it's trying to use SMS protocol 2 because the flags are undefined as described at https://issues.asterisk.org/view.php?id=16508#c124138

Comment 1 David Woodhouse 2011-08-22 08:45:28 UTC
Aha, renaming the call file in /var/spool/asterisk/outgoing so that it actually ends in '.call' does seem to make Asterisk pick it up immediately:

[root@obelisk outgoing]# mv smsq.motx.0.1314001211-17178.1 smsq.motx.0.1314001211-17178.1.call

Comment 2 David Woodhouse 2011-08-22 08:59:59 UTC
When trying to do a local rebuild of the Asterisk SRPM just to rebuild app_sms, it refuses to load. I end up having to use 'sed' to replace the buildopt_sum field in the module and make it match the running version of Asterisk.

This has to be a bug, surely? Building an RPM has to be *repeatable*, which means that a module from one build ought to load into another 'identical' build. The compatibility check seems to be overly zealous, and doesn't even *tell* me what it thinks has changed.

Comment 3 David Woodhouse 2011-08-22 09:35:01 UTC
Oh, it's not the filename. It's because smsq hard-links the call file into the spool directory; it doesn't move it. The pbx_spool module gets an inotify IN_CREATE event for that, which it can't distinguish from a creat() call making an empty file.

So it seems to assume that there is a broken utility creating an *empty* spool file and then writing to it. Which you shouldn't do; you should create it and then put it in place as smsq is doing.

The pbx_spool module then waits for another notification of IN_CLOSE_WRITE, when the file is closed after having been opened for write. In the case of a broken utility, that would work fine. It's a nice workaround for the broken tools.... except that it makes them *work*, while it should have detected the situation and bitched loudly and *refused* to run the spool file.

But it's broken smsq which was behaving nicely. That IN_CLOSE_WRITE never comes, so the spool file is never used.

Comment 4 David Woodhouse 2011-08-22 09:47:07 UTC
I also need the fix described at https://issues.asterisk.org/view.php?id=16601#c116655 to avoid an endless stream of 

[Aug 22 10:44:01] NOTICE[20023]: app_sms.c:1800 sms_process: bad stop bit
[Aug 22 10:44:01] NOTICE[20023]: app_sms.c:1800 sms_process: bad stop bit
[Aug 22 10:44:01] NOTICE[20023]: app_sms.c:1800 sms_process: bad stop bit
[Aug 22 10:44:01] NOTICE[20023]: app_sms.c:1723 sms_process: Error 255, hanging up
    -- SMS TX 92 01 FF
[Aug 22 10:44:01] NOTICE[20023]: app_sms.c:1800 sms_process: bad stop bit
[Aug 22 10:44:01] NOTICE[20023]: app_sms.c:1800 sms_process: bad stop bit
[Aug 22 10:44:01] NOTICE[20023]: app_sms.c:1800 sms_process: bad stop bit
[Aug 22 10:44:01] NOTICE[20023]: app_sms.c:1800 sms_process: bad stop bit
[Aug 22 10:44:01] NOTICE[20023]: app_sms.c:1800 sms_process: bad stop bit
[Aug 22 10:44:01] NOTICE[20023]: app_sms.c:1723 sms_process: Error 255, hanging up
    -- SMS TX 92 01 FF

... when the connection is finished (note that it's not as pretty as this; the log message doesn't even include a trailing \n which I've fixed too).

Comment 5 David Woodhouse 2011-08-22 10:05:41 UTC
Created attachment 519257 [details]
fix

This fixes all three issues. It seems that the 'bad stop bit' message is happening after we've sent the 0x94 REL message to tell the other side to go away. It's hardly surprising that it stops talking to us, so I've made it silently hang up in *that* situation, while still handling the error as normal during the rest of the conversation.

Comment 6 David Woodhouse 2011-08-23 23:32:32 UTC
Patch filed against https://issues.asterisk.org/jira/browse/ASTERISK-18331

Comment 7 Fedora Update System 2011-09-20 20:27:22 UTC
asterisk-1.8.6.0-4.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/asterisk-1.8.6.0-4.el6

Comment 8 Fedora Update System 2011-09-20 20:28:05 UTC
asterisk-1.8.6.0-4.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/asterisk-1.8.6.0-4.fc15

Comment 9 Fedora Update System 2011-09-20 20:28:47 UTC
asterisk-1.8.6.0-4.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/asterisk-1.8.6.0-4.fc16

Comment 10 Fedora Update System 2011-09-21 22:15:16 UTC
Package asterisk-1.8.6.0-4.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing asterisk-1.8.6.0-4.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/asterisk-1.8.6.0-4.fc16
then log in and leave karma (feedback).

Comment 11 Fedora Update System 2011-10-03 18:09:16 UTC
asterisk-1.8.6.0-4.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2011-10-03 23:57:00 UTC
asterisk-1.8.6.0-4.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2011-10-11 02:05:19 UTC
asterisk-1.8.6.0-4.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.