The rants and raves of a technogeek
- AGI Amazon Amazon EC2 Apache Asterisk Business Cloud computing dialer Dialers digium EC2 economy Elastix Fonality FreePBX freeswitch Google GPL GreenfieldTech internet Israel IVR JaJah Linux Mandriva Microsoft mysql Nortel open source OpenVOX PBX-in-a-flash php PHPAGI PIKA S3 sangoma SIP Skype Telecommunications TrixBox violations Virtualization VMWARE VoIP XML
- September 2011 (1)
- November 2010 (1)
- October 2010 (1)
- August 2010 (1)
- May 2010 (1)
- April 2010 (2)
- March 2010 (1)
- February 2010 (3)
- January 2010 (1)
- December 2009 (2)
- October 2009 (2)
- July 2009 (1)
- May 2009 (2)
- April 2009 (3)
- March 2009 (4)
- February 2009 (8)
- January 2009 (6)
- December 2008 (5)
- November 2008 (10)
- October 2008 (11)
- September 2008 (4)
- August 2008 (4)
- July 2008 (4)
- June 2008 (9)
- May 2008 (5)
- April 2008 (3)
- March 2008 (5)
- February 2008 (1)
- December 2007 (2)
- November 2007 (14)
- Read my words – 3500 concurrent channels with Asterisk! (5)
- Thoughts of virtualization – Part II (3)
- Battling the GlobalCrossing CallerID blues (3)
- Open Source, Philanthropy and Asterisk (3)
- Poking around for Free Telephony (2)
- PIKA Warp + FreePBX = Still some distance to go… (2)
- Hi-Tech fallouts unite! (2)
- Rock Solid Clouded Asterisk (2)
- Being a successful Asterisk Consultant (2)
- I finally purchased a Nokia E90 (1)
Good bye Symbian, Hello Android | The Nir Simionovich blog: [...] For those who had been reading this blog for some time now, you may have stumbled across my...
asteriskforce.com » Blog Archive » Asterisk, Greed and Revenue Shares | The Nir Simionovich blog - Just another WordPress weblog: [...] Originally posted here: Asterisk, Greed and Revenue Shares | The Nir Simionovich blog [...]
Twitter Tweets about Entrepreneurship & Philanthropy as of 04/16/2010 | Good Karma Makeover: [...] · Reply · View asteriskbot: @NirSimionovich Open Source, Philanthropy and...
asteriskforce.com » Blog Archive » Open Source, Philanthropy and Asterisk | The Nir Simionovich blog - Just another WordPress weblog: [...] Link: Open Source, Philanthropy and Asterisk | The Nir Simionovich blog [...]
Open Source, Philanthropy and Asterisk | The Nir Simionovich blog | Open Hacking: [...] the original post: Open Source, Philanthropy and Asterisk | The Nir Simionovich blog This ...
uberVU - social comments: Social comments and analytics for this post... This post was mentioned on Twitter by asteriskbot:...
Video | Enjolt.com | Innovate for Success: [...] children playing with each other, I agreed to buy them whatever remote control toys they...
mmaeir: Well I do have a lot of respect for didx, I would never port business numbers to them. The simple...




Picasa
Twitter
Facebook
LinkedIn
Youtube
RSS
about 2 years ago
Hello Sir,
I have a problem with the following code (took from your book). It
doesnot make a beep sound and takes ainput. I am using Zoiper soft
phone to test it with an IAX2 account.
$result = agi->get_data(“beep”, 3000, 20);
say_digits() also not working.
My code looks like…
1. #!/usr/bin/php -q
2. answer();
10.
11. $agi->stream_file(“demo-congrats”,”#”);
12. do
13. {
14. $agi->stream_file(“enter-some-digits”,”#”);
15. $result = $agi->get_data(‘beep’, 3000, 20);
$keys = $result['result'];
16.
17. $agi->stream_file(“you-entered”,”#”);
18. $agi->say_digits($keys);
19. } while($keys != ’111′);
20. $agi->hangup();
21. ?>
asterisk out put….
— Accepting AUTHENTICATED call from 127.0.0.1:
> requested format = gsm,
> requested prefs = (),
> actual format = gsm,
> host prefs = (),
> priority = mine
— Executing [999@agitest:1] AGI(“IAX2/rajib-14434″, “hello.php”) in
new stack
— Launched AGI Script /var/lib/asterisk/agi-bin/hello.php
AGI Tx >> agi_request: hello.php
AGI Tx >> agi_channel: IAX2/rajib-14434
AGI Tx >> agi_language: en
AGI Tx >> agi_type: IAX2
AGI Tx >> agi_uniqueid: 1234947670.52
AGI Tx >> agi_version: 1.6.0.5
AGI Tx >> agi_callerid: unknown
AGI Tx >> agi_calleridname: rajib
AGI Tx >> agi_callingpres: 1
AGI Tx >> agi_callingani2: 0
AGI Tx >> agi_callington: 16
AGI Tx >> agi_callingtns: 0
AGI Tx >> agi_dnid: 999
AGI Tx >> agi_rdnis: unknown
AGI Tx >> agi_context: agitest
AGI Tx >> agi_extension: 999
AGI Tx >> agi_priority: 1
AGI Tx >> agi_enhanced: 0.0
AGI Tx >> agi_accountcode:
AGI Tx >> agi_threadid: -1217868912
AGI Tx >>
— AGI Script hello.php completed, returning 0
— Executing [999@agitest:2] Hangup(“IAX2/rajib-14434″, “”) in new stack
== Spawn extension (agitest, 999, 2) exited non-zero on ‘IAX2/rajib-14434′
— Hungup ‘IAX2/rajib-14434′
server configuration…..
Fedora core 8
asterisk server 1.6.0.5
phpagi-2.14
No other hardware is attached for PSTN line. I have tested the examples
with Zoiper.
Please help me out.
Thanks and Regards
Rajib Deka
rajib@excoflare.com
about 2 years ago
Hi Rajib,
Well, if you copy pasted your AGI script as is, you have a small mistake with your ANSWER directive.
1. #!/usr/bin/php -q
2. answer();
10.
11. $agi->stream_file(”demo-congrats”,”#”);
12. do
13. {
14. $agi->stream_file(”enter-some-digits”,”#”);
15. $result = $agi->get_data(’beep’, 3000, 20);
$keys = $result['result'];
16.
17. $agi->stream_file(”you-entered”,”#”);
18. $agi->say_digits($keys);
19. } while($keys != ‘111′);
20. $agi->hangup();
21. ?>
In addition, it would appear that you didn’t even construct the AGI object correctly. If you refer to page 105 of my book, you would notice that lines 3 through 7 are missing from your script.
Try also to increase your console debug level via the /etc/asterisk/logger.conf file, that may shed some more information in regards to what breaks your script.
Cheers,
Nir
about 2 years ago
Hi Sir,
thanks for your promptly response. I am a newbie to asterisk. I have a intel dual core pc with 1 GB ram. I have installed Asterisk 1.6.0.5 and configured with Zoiper Soft phone. I want to connect my PSTN line to it and some other phones to the extensions so, what hardware I need to attach PSTN line to my asterisk server. Please let me know.
Thanks and Regards
Rajib Deka