Problem with GnuPG file encryption thru asterisk PBX.

9 views
Skip to first unread message

cchla1021

unread,
Aug 1, 2008, 1:40:45 AM8/1/08
to Utah Asterisk Users Group
Hello,
I have problem to encrypt file thru asterisk PBX.
I can encrypt a file when using GnuPG from the command line.
gpg -e -r cchl...@yahoo.com record_mode.gsm then tap enter.
It will generate record_mode.gsm.gpg encryption file.

But I failed to generate encryption file "record_mode.gsm.gpg" when I
dial number 1234 into asterisk phone system.

/*******************************************************
This is my simple test extensions_custom script:
extensions_custom.conf
[from-internal-custom]
exten => 1234,1,SayDigits(1234)
exten => 1234,2,System(/var/lib/asterisk/sounds/dictate/test.pl)
exten => 1234,3,Wait(3)
exten => 1234,4,Hangup()
exten => h,1,Hangup()

/*******************************************************
My simple perl testing script
test.pl
#!/usr/bin/perl -w

my $pid = system("gpg -e -r cchla1021\@yahoo.com record_mode.gsm");

waitpid $pid,0;
/*******************************************************

If I simply execute test.pl through command line, file can be
encrypted and generate "record_mode.gsm.gpg". Crying or Very sad

I've also changed test.pl ownership and user group to
asterisk:asterisk as below command:
chown astersk:asterisk test.pl
chmod 777 test.pl

-rwxrwxrwx 1 asterisk asterisk 133 Jul 31 14:58 test.pl

Any input from everybody, I am greatly appreciate. I believe this
small testing will also enlighten some people who wish to use GnuPG
free open source for file encryption in asterisk system.

Joseph

Jared Smith

unread,
Aug 1, 2008, 8:04:03 AM8/1/08
to ut...@googlegroups.com
On Thu, 2008-07-31 at 22:40 -0700, cchla1021 wrote:
> I have problem to encrypt file thru asterisk PBX.

Have you tried using the System application to call gpg directly? I
don't see why you're using System() to call Perl to call gpg.

Also, is Asterisk running as the root user or as user "asterisk"?

-Jared

Reply all
Reply to author
Forward
0 new messages