On Tue, Feb 05, 2008 at 11:06:36AM +0200, Tzafrir Cohen wrote: > On Tue, Feb 05, 2008 at 09:26:12AM +0100, Arthur Lutz wrote: > > On Mon, Feb 04, 2008 at 04:33:18PM +0200, Faidon Liambotis wrote: > > > root wrote: > > >> To get my asterisk to work I have to launch it through the command > > >> line: > > >> > > >> asterisk -vvvvvvvc > > >> > > >> Otherwise, through /etc/init.d/asterisk start It doesn't behave in the > > >> same way (most operations get a "603 Declined" response). > > What operations, exactly? "603"? Where exactly do you see such a > message? >
I was getting it on my Twinkle phone. > > > Probably because that way asterisk runs as root, while the init script > > > calls asterisk -U asterisk (run as the asterisk user). > > > > > > You probably have some configuration files owned by root and with no > > > permissions. > > > > > > > All the files in /etc/asterisk/ are owned by asterisk. Asterisk is > > running. If I connect to the console with "asterisk -r" and try to make > > a phone call, I get : > > Is this from asterisk running as root? Indeed, I hadn't realised. > Please avoid doing that. It is a bad security practice. > > If you really need to run Asterisk "interactively" to debug its startup, > use: > > /etc/init.d/asterisk debug > > Or make sure you add '-U asterisk' to the command-line. got it. Thanks. > > [snip] > > Can the permission denied come from the php import in dial.php ? > > ls -ld /usr/share/asterisk/agi-bin/ /usr/share/asterisk > > head /usr/share/asterisk/agi-bin/dial.php Got it. The agi-bin was not world readable/executable : # ls -ld /usr/share/asterisk/agi-bin/ /usr/share/asterisk drwxr-xr-x 8 root root 4096 Dec 26 18:13 /usr/share/asterisk drwxr-x--- 2 root root 4096 Feb 5 09:20 /usr/share/asterisk/agi-bin/ I then did a # chmod a+rx /usr/share/asterisk/agi-bin/ And it works. Thanks for helping out. -- Arthur LUTZ LOGILAB, Paris (France). http://www.logilab.com http://www.logilab.fr http://www.logilab.org Développement logiciel avancé - Intelligence Artificielle - Formations