0
votes

I am setting up a new voip system. The system is an Asterisk backend. I have a python script that verifies customer data when they call into technical support. When I trigger the script in the call IVR menu, I get return 0 and the script does not actually execute. I did:

asterisk -rx "core stop now"

asterisk -vvvvgc

Once I did that, the script ran with no problems. I can go through the whole menu, verify the customer information and transfer the call to tech support extension. But Icinga shows that astcanary is no longer running and is showing as critical on the monitoring. If I restart asterisk/telephony services, astcanary is showing as ok but my script no longer runs. The script once again returns 0 and does not do what it is supposed to.

Does anyone have any ideas what this conflict seems to be related about? I have monitored my server for CPU usage but the python script is not idling high usage and barely hits 0.5% when actually running (I'm using htop to watch the processes when doing this) Any thoughts or ideas will be welcomed and looked at! Thanks.

2
Here's my testing: I killed astcanary after resetting the telephony services. This is just out right killing astcanary process, not the core stop now. My script still will not run when triggered via the IVR menu. But! When I do what I stated above (asterisk -rx 'core stop now' then asterisk to start the service back, then asterisk -vvvvgr), astcanary is no longer running and my script runs fine. Astcanary is the only warning showing up on Icinga still. what else would 'core stop now' kill that could be affecting my script that I cannot see in my logs or monitoring?lnxchix

2 Answers

0
votes

In most cases such issue is permission issue. Asterisk run under asterisk user, while you likly run it under other user(root?)

Try do

asterisk -rx "core stop now"
su asterisk -c "asterisk -vvvgc"

and you will see error.

0
votes

There seemed to be an issue with permissions on the log file. The log file was set to owner root not asterisk. And the script was running as asterisk and not being able to write the data to the .log file. I got an extra pair of eyes to help me troubleshoot and we figured out that was the deal. So it wasn't astcanary at all! The whole situations was very odd, so I wanted to see if anyone else had ever seen that. So you were close, arheops! at least as far as user access was concerned. I was also running the asterisk as root, when doing the above commands. So I did sudo -u asterisk then ran asterisk -r.

I feel like this was stupid question but it was very confusing and not very obvious answer! Thank you for your response! :)