blackwater dev
2007-Jan-15 09:53 UTC
[asterisk-users] php agi - first phrase truncated, all others fine
I have the following code. When I call the extension, it either ignores the first "Hello there everyone", or says "hello" and moves on sometime stoping before it finishes hello. The rest of the text reads fine. Anyone else have this issue?? Thanks! require('/var/lib/asterisk/agi-bin/phpagi.php'); $agi = new AGI(); $agi->answer(); $agi->swift("Hello there everyone "); $agi->swift("Please press 1 for a search ."); $result= $agi->get_data('beep',300000000, 1); $zip= $result['result']; $agi->swift("That concludes your call. Thank you, Good bye ."); $agi->hangup(); -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070115/a7c63dad/attachment.htm
Paul
2007-Jan-15 10:31 UTC
[asterisk-users] php agi - first phrase truncated, all others fine
Are you creating a temporary wav file? If so, look at that first. If the wav file is truncated at least you know the problem is related to the way swift gets invoked and passed the text argument. If the file is okay you need to look at the way it gets handled afterwards. blackwater dev wrote:> I have the following code. When I call the extension, it either > ignores the first "Hello there everyone", or says "hello" and moves on > sometime stoping before it finishes hello. The rest of the text reads > fine. Anyone else have this issue?? > > Thanks! > > require('/var/lib/asterisk/agi-bin/phpagi.php'); > > $agi = new AGI(); > $agi->answer(); > $agi->swift("Hello there everyone "); > > > $agi->swift("Please press 1 for a search ."); > $result= $agi->get_data('beep',300000000, 1); > $zip= $result['result']; > > $agi->swift("That concludes your call. Thank you, Good bye ."); > $agi->hangup(); > >------------------------------------------------------------------------ > >_______________________________________________ >--Bandwidth and Colocation provided by Easynews.com -- > >asterisk-users mailing list >To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > >
Trevor Peirce
2007-Jan-15 13:41 UTC
[asterisk-users] php agi - first phrase truncated, all others fine
blackwater dev wrote:> I have the following code. When I call the extension, it either > ignores the first "Hello there everyone", or says "hello" and moves on > sometime stoping before it finishes hello. The rest of the text reads > fine. Anyone else have this issue??Try adding this...> > require('/var/lib/asterisk/agi-bin/phpagi.php'); > > $agi = new AGI(); > $agi->answer();sleep(0.5);> $agi->swift("Hello there everyone ");Regards, Trevor
john beaman
2007-Jan-17 07:38 UTC
[asterisk-users] php agi - first phrase truncated, all others fine
Greetings, I have never done any agi programming, but my first thought is maybe you need a wait statement after answering? John Beaman Telecom Specialist Voice Telecommunications Services Department. Good Samaritan National Campus 605-362-3331>>> blackwaterdev@gmail.com 1/15/2007 10:53:51 AM >>>I have the following code. When I call the extension, it either ignores the first "Hello there everyone", or says "hello" and moves on sometime stoping before it finishes hello. The rest of the text reads fine. Anyone else have this issue?? Thanks! require('/var/lib/asterisk/agi-bin/phpagi.php'); $agi = new AGI(); $agi->answer(); $agi->swift("Hello there everyone "); $agi->swift("Please press 1 for a search ."); $result= $agi->get_data('beep',300000000, 1); $zip= $result['result']; $agi->swift("That concludes your call. Thank you, Good bye ."); $agi->hangup(); -------------- next part -------------- ------------------------------------------------- This email transmission and any documents, files or previous email messages attached to it may contain information that is confidential or legally privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, printing, distributing or use of this transmission is strictly prohibited. If you have received this transmission in error, please immediately notify the sender by telephone or return email and delete the original transmission and its attachments without reading or saving in any manner. The Evangelical Lutheran Good Samaritan Society. ---------------------------------------------------------