Smsq creates entry pbx_spool can't read

I installed 1.6.2.9 a while ago. I’ve only just tried to use smsq again. In 1.4 it worked OK.
I had an initial problem since the default values for the SMSC access are the UK ones but I changed smsq.c and recompiled those so that I don’t have to include the --motx-channel option every time since I’m in France
Now instead of typing this:
smsq --motx-channel=DAHDI/4/0809101000 061234567 "Test"
I can just type this:
smsq 061234567 “Test”

The problem I have is that smsq creates an entry in /var/spool/asterisk/outgoing with 644 permissions and owner of the process which called it (in my case either me or, if I use sudo, “root”)

pbx_spool can’t read this and so the sms isn’t sent and I get repeated error messages

If I change the permissions to 666 the message gets sent.

I can’t see where the permissions are set or in fact who creates the entry although I think it must be in smsq.c

The 2 higher level directories are owned by asterisk. Var and var/spool are owned by root of course.

Howdy,

Did the problem occur before your made your changes, when you were typing:
smsq --motx-channel=DAHDI/4/0809101000 061234567 “Test”
?

Is Asterisk running as root or as non-root?

Cheers.

Malcolm,

Yes the problem occurred before my change. Asterisk is running as asterisk from what I can see from the system monitor i.e. it starts with /usr/sbin -u asterisk but I can’t find a user called asterisk. There is a group asterisk of which everyone including root is a member. Effectively I imagine if asterisk was running as root it wouldn’t really care what the permissions were on the spool file.

So what’s the “correct” solution?

I think my installation was pretty “out-of-the-box”. As far as I remember I compiled Asterisk from source and used suso make install I’m running on Ubuntu 9.10 (Karmic Koala). That was because I couldn’t get the system to boot with Ubuntu 10.4 and my Digium TDM card. I’d also like to know if that problem has been solved especially since support for 9.10 runs out in April.

see bugs.launchpad.net/ubuntu/+sour … bug/367025

Another link back to a problem I reported but had forgotten is:
viewtopic.php?f=1&t=74407

This has become of particular interest today as I’m starting to get scan attacks using sipvicious from China and India. Digium security guidelines say to avoid having anything useful in the dialplan in the [default] conext but this problem apparently obliges me to have stuff in there or I can’t answer in incoming call from the PSTN.

Best regards,
Pete

[quote=“pkirkham”]Malcolm,

Yes the problem occurred before my change. Asterisk is running as asterisk from what I can see from the system monitor i.e. it starts with /usr/sbin -u asterisk but I can’t find a user called asterisk. There is a group asterisk of which everyone including root is a member. Effectively I imagine if asterisk was running as root it wouldn’t really care what the permissions were on the spool file.[/quote]

Odd. I’ve got Asterisk running on an Ubuntu 10.10, using the generic startup scripts, and it’s absolutely running as root, according to ps. What’s doing your startup that it’s setting the user to asterisk? Modify to root and see if that solves it?

[quote=“pkirkham”]
I think my installation was pretty “out-of-the-box”. As far as I remember I compiled Asterisk from source and used suso make install I’m running on Ubuntu 9.10 (Karmic Koala). That was because I couldn’t get the system to boot with Ubuntu 10.4 and my Digium TDM card. I’d also like to know if that problem has been solved especially since support for 9.10 runs out in April.

see bugs.launchpad.net/ubuntu/+sour … bug/367025

Another link back to a problem I reported but had forgotten is:
viewtopic.php?f=1&t=74407

This has become of particular interest today as I’m starting to get scan attacks using sipvicious from China and India. Digium security guidelines say to avoid having anything useful in the dialplan in the [default] conext but this problem apparently obliges me to have stuff in there or I can’t answer in incoming call from the PSTN.

Best regards,
Pete[/quote]

The TDM400 is End of Life and is no longer supported, so we can’t help you specifically there if it’s not running on a newer version of Ubuntu. With respect to the context not being set as you’re asking it to be, I suspect something else is amiss, otherwise we’d have a rash of people complaining about it.

Malcolm,
I’ll try 10.10 and see if that works for the TDM (BTW what is it replaced by and couldn’t someone have told me since I think I’m a registered owner)

As for running Asterisk as root isn’t that cheating? It means that programmers can get away with doing things in a sloppy way since we can access files whatever permissions they have.

I’d prefer not to run a production system as root. I will however test it to see if it’s a workaround for the problem in question.

Best regards,