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
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
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.
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.
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).
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.
Patch filed against https://issues.asterisk.org/jira/browse/ASTERISK-18331
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
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
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
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).
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.
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.
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.