[asterisk-users] exten = h,n,AGI(generateCall.php,${NEXT})

2013-02-20 Thread Mahendra Dobariya
not able to run my php from AGIi am using asterisk 1.8.13 (debian)i am able to 
make call file using php command line..but when executing php from AGI, it is 
not working..kindly see the attachment if bellow text is not 
readable...___ File: 
/etc/asterisk/extensions.conf[call]exten = call,1,Answerexten = 
call,n,Playback(hello-world)exten = call,n,Hangup()
exten = h,1,Set(NEXT=$[${NEXT}+1])exten = 
h,n,AGI(generateCall.php,${NEXT})exten = 
h,n,Hangup()___File:
 /usr/share/asterisk/agi-bin/generateCall.php
#!/usr/bin/php -q?php$fileName = /var/www/consumer.txt;$next = $argv[1];$f = 
fopen($fileName,'r');$fileContent = 
file_get_contents($fileName);$outdialNumbers = explode(\n,$fileContent);
if($outdialNumbers[$next]) {$callFile   = 
/var/spool/asterisk/outgoing/.$outdialNumbers[$next]..call;$f   
   = fopen($callFile,'w');$callFileContent= \nChannel: 
dongle/dongle0/.$outdialNumbers[$next].\nContext: call\nExtension: 
call\nPriority: 1\nSet: NEXT=.$next.\n;fwrite($f, $callFileContent); 
   fclose($f);chmod($callFile, 
0777);}?mac@almighty
 ~ $ ls /usr/share/asterisk/agi-bin/ -ltotal 4-rwxrwxrwx 1 root root 1166 Feb 
20 15:48 
generateCall.phpmac@almighty
 ~ $ ls /var/spool/asterisk/ -ltotal 28drwxrwxrwx 2 root users 4096 Sep 13 
06:59 dictatedrwxrwxrwx 2 root users 4096 Sep 13 06:59 meetmedrwxrwxrwx 2 root 
users 4096 Sep 13 06:59 monitordrwxrwxrwx 2 root users 4096 Feb 20 20:39 
outgoingdrwxrwxrwx 2 root users 4096 Sep 13 06:59 systemdrwxrwxrwx 2 root users 
4096 Sep 13 06:59 tmpdrwxrwxrwx 2 root users 4096 Sep 13 06:59 
voicemailmac@almighty ~ 
$almighty*CLI[Feb
 20 20:39:32] WARNING[2007]: pbx_spool.c:278 safe_append: Unable to set utime 
on /var/spool/asterisk/outgoing/9033544852.call: Operation not permitted-- 
Attempting call on dongle/dongle0/9033544852 for call@call:1 (Retry 1)
Channel Dongle/dongle0-01000d was answered.-- Executing [call@call:1] 
Answer(Dongle/dongle0-01000d, ) in new stack-- Executing 
[call@call:2] Playback(Dongle/dongle0-01000d, silence/1) in new stack   
 -- Dongle/dongle0-01000d Playing 'silence/1.gsm' (language 'en')-- 
Executing [call@call:3] Playback(Dongle/dongle0-01000d, hello-world) in 
new stack-- Dongle/dongle0-01000d Playing 'hello-world.gsm' (language 
'en')-- Executing [call@call:4] SayDigits(Dongle/dongle0-01000d, 0) 
in new stack-- Dongle/dongle0-01000d Playing 'digits/0.gsm' (language 
'en')-- Executing [call@call:5] Hangup(Dongle/dongle0-01000d, ) in 
new stack  == Spawn extension (call, call, 5) exited non-zero on 
'Dongle/dongle0-01000d'-- Executing [h@call:1] 
Set(Dongle/dongle0-01000d, NEXT=1) in new stack-- Executing 
[h@call:2] AGI(Dongle/dongle0-01000d, generateCall.php,1) in new stack  
  -- Launched AGI Script 
/usr/share/asterisk/agi-bin/generateCall.phpDongle/dongle0-01000dAGI Tx 
 agi_request: generateCall.phpDongle/dongle0-01000dAGI Tx  
agi_channel: Dongle/dongle0-01000dDongle/dongle0-01000dAGI Tx  
agi_language: enDongle/dongle0-01000dAGI Tx  agi_type: 
DongleDongle/dongle0-01000dAGI Tx  agi_uniqueid: 
1361372972.13Dongle/dongle0-01000dAGI Tx  agi_version: 
1.8.13.1~dfsg-1Dongle/dongle0-01000dAGI Tx  agi_callerid: 
unknownDongle/dongle0-01000dAGI Tx  agi_calleridname: 
unknownDongle/dongle0-01000dAGI Tx  agi_callingpres: 
0Dongle/dongle0-01000dAGI Tx  agi_callingani2: 
0Dongle/dongle0-01000dAGI Tx  agi_callington: 
0Dongle/dongle0-01000dAGI Tx  agi_callingtns: 
0Dongle/dongle0-01000dAGI Tx  agi_dnid: 
unknownDongle/dongle0-01000dAGI Tx  agi_rdnis: 
unknownDongle/dongle0-01000dAGI Tx  agi_context: 
callDongle/dongle0-01000dAGI Tx  agi_extension: 
hDongle/dongle0-01000dAGI Tx  agi_priority: 
2Dongle/dongle0-01000dAGI Tx  agi_enhanced: 
0.0Dongle/dongle0-01000dAGI Tx  
agi_accountcode:Dongle/dongle0-01000dAGI Tx  agi_threadid: 
1129301104Dongle/dongle0-01000dAGI Tx  agi_arg_1: 
1Dongle/dongle0-01000dAGI Tx Dongle/dongle0-01000dAGI Rx  Could 
not open input file: 1Dongle/dongle0-01000dAGI Tx  510 Invalid or 
unknown command-- Dongle/dongle0-01000dAGI Script generateCall.php 
completed, returning 0[Feb 20 20:39:44] NOTICE[2672]: pbx_spool.c:366 
attempt_thread: Call completed to dongle/dongle0/9033544852almighty*CLI
  my detail is bellow.
i am using asterisk 1.8.13

___
 File: /etc/asterisk/extensions.conf
[call]
exten = call,1,Answer

[asterisk-users] auto install all required dependences for asterisk.

2013-02-15 Thread Mahendra Dobariya
hello all,I want to install asterisk on my raspberry pi(model B), 
(2013-02-09-wheezy-raspbian) by compiling source code(asterisk-1.8.15).what i 
do is..
pi@raspberrypi /usr/src/certified-asterisk-1.8.15-cert1 $ sudo apt-get install 
asterisk asterisk-devReading package lists... DoneBuilding dependency 
treeReading state information... DoneThe following extra packages will be 
installed:  asterisk-config asterisk-core-sounds-en asterisk-core-sounds-en-gsm 
asterisk-modules  asterisk-moh-opsound-gsm asterisk-voicemail autopoint 
debhelper freetds-common gettext git git-man  html2text intltool-debian 
libcurl3-gnutls liberror-perl libgettextpo0 libgmime-2.6-0 libgpgme11 libgsm1  
libical0 libiksemel3 libjack-jackd2-0 liblua5.1-0 libmail-sendmail-perl 
libneon27-gnutls libodbc1  libopencore-amrnb0 libopencore-amrwb0 libperl5.14 
libpq5 libpth20 libradiusclient-ng2 libresample1  libsaclm3 libsaevt3 
libsensors4 libsnmp-base libsnmp15 libsox-fmt-alsa libsox-fmt-base libsox2 
libspandsp2  libspeex1 libspeexdsp1 libsqlite0 libsrtp0 libsybdb5 
libsys-hostname-long-perl libunistring0 libvpb0  libwavpack1 module-assistant 
po-debconf rsync sox vpb-driver-source
than i install all above packages by sudo apt-get installand than try to 
compiling the source code..but it did not works..
so please tell me how to install all required dependency for asterisk  
asterisk-dev
Mahendra
  --
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] USB FXS device

2012-11-01 Thread Mahendra Dobariya

i manage to make call and receive call , IVR , GSM gateway less than 100 
$.https://www.facebook.com/photo.php?fbid=451312488254098set=a.435627683155912.115286.11260518622type=3theater
see the pic, and let me know if it is useful to you..it is raspberry pi and 3G 
usb dongle with voice 
support.http://www.huaweidevice.co.in/Products/MobileBroadband/E303c.php
and also there are lots of usb dongle which are voice enabled and successfully 
works with asterisk.around 40 $
mahendrakumarAlmightyTech


  --
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] asterisk as IVR using 3g usb modem

2012-10-18 Thread Mahendra Dobariya
hi, I want to use asterisk as IVR system ,but to make and receive GSM call, i 
want to use 3g usb modem.(voice 
enabled)http://www.huaweidevice.co.in/Products/MobileBroadband/E303c.php
and i want to install this system on two different machine1 on mac os x -2 
raspberry pi- (debian wheezy)--http://www.raspberrypi.org/
thanx in advance..

  --
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] make and receive call from dial-up modem

2012-05-19 Thread Mahendra Dobariya

is it possible to use data voice dial-up modem to make and receive call for ivr 
system..
  --
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users