I have an unusual situation with my Asterisk.
Firstly the machine is a FreePBX 14, running Asterisk 15.4.0
I have a dialplan which takes card details using an IVR, i.e Enter Card Number followed by the Hash key.
This then puts together a whole string to execute a separate Perl Script that will charge the customers card with the requested amount.
If i run the perl script from the CLI, the script executes fine and charges the card.
If I go through the dialplan, providing the relevant card details, when it gets to the end to execute the script, it all appears to work, but nothing happens in terms of charging the card.
In an effort to see the AGI script running and seeing what's going wrong, I run asterisk as 'asterisk -vvvvvc' as root, and do the same again, the payment goes through, and works completely fine.
This leads me to believe that when running asterisk as (asterisk -vvvc) it runs with elevated permissions allowing the script to run properly.
Any ideas as to how i can have this working normally or what permissions I need to fix.
The script is set to 0777, so should be executable by everything, and I've also set the script to be owned by asterisk AND root, and that made no difference.
Here is the command I am using in the dialplan to invoke the script.
exten=>50000,n,AGI(MakePayment.agi,${CardVar},${ExpMonth},${ExpYear},${SecurityVar},${Value},${TransID})
Although all that does is pass it through to the perl script.
As noted previously, I do not expect there to be an issue with the dialplan nor the script but rather some issue between the two interacting with each other.