[asterisk-users] Re: php agi trixbox help
John covici
covici at ccs.covici.com
Wed Dec 27 08:45:21 MST 2006
Don't know if this will do it (see your full logs for details), but
the timeout lines in your 311 are at least depricated if removed --
use the set statement and functions like this
exten => s,n,Set(TIMEOUT(digit)=5)
Hope this helps.
on Wednesday 12/27/2006 blackwater dev(blackwaterdev at gmail.com) wrote
> Not sure if this has anything to do with it but running the input.php script
> directly from the command line gives this warning:
>
> PHP Warning: Unknown(): Unable to load dynamic library
> '/usr/lib/php4/imap.so' - libc-client.so.0: cannot open shared object file:
> No such file or directory in Unknown on line 0
>
> Thanks.
>
> On 12/27/06, blackwater dev <blackwaterdev at gmail.com> wrote:
> >
> > I have this code which was taken from the phpagi project page along with
> > the following in extensions_conf and the output from the asterisk CLI. When
> > I call the 311 extension, I does nothing then hangs up. What am I doing
> > wrong??
> >
> > ----php code------------
> >
> > #!/usr/local/bin/php -q
> > <?php
> > set_time_limit(30);
> > require('phpagi.php');
> >
> > $agi = new AGI();
> > $agi->answer();
> > $cid = $agi->parse_callerid();
> > $agi->text2wav("Hello, {$cid['name']}. Let's enter some text.");
> > $text = $agi->text_input('UPPERCASE');
> > $agi->text2wav("You entered $text");
> > $agi->text2wav('Goodbye');
> > $agi->hangup();
> > ?>
> >
> > ------extensions_custom.php------------
> > exten => 311,1,Answer
> > exten => 311,2 Wait(1)
> > exten => 311,3,DigitTimeout(7)
> > exten => 311,4,ResponseTimeout(10)
> > exten => 311,5,AGI( input.php)
> >
> > ------CLI output ----------------------
> > -- Executing Answer("SIP/200-09b20488", "") in new stack
> > == Spawn extension (from-internal, 311, 2) exited non-zero on
> > 'SIP/200-09b20488'
> > -- Executing Macro("SIP/200-09b20488", "hangupcall") in new stack
> > -- Executing ResetCDR("SIP/200-09b20488", "w") in new stack
> > -- Executing NoCDR("SIP/200-09b20488", "") in new stack
> > -- Executing Wait("SIP/200-09b20488", "5") in new stack
> > -- Executing Hangup("SIP/200-09b20488", "") in new stack
> > == Spawn extension (macro-hangupcall, s, 4) exited non-zero on
> > 'SIP/200-09b20488' in macro 'hangupcall'
> > == Spawn extension (macro-hangupcall, s, 4) exited non-zero on
> > 'SIP/200-09b20488'
> Not sure if this has anything to do with it but running the input.php script directly from the command line gives this warning:<br><br>PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php4/imap.so' -
> libc-client.so.0: cannot open shared object file: No such file or directory in Unknown on line 0<br><br>Thanks.<br><br><div><span class="gmail_quote">On 12/27/06, <b class="gmail_sendername">blackwater dev</b> <<a href="mailto:blackwaterdev at gmail.com">
> blackwaterdev at gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I have this code which was taken from the phpagi project page along with the following in extensions_conf and the output from the asterisk CLI. When I call the 311 extension, I does nothing then hangs up. What am I doing wrong??
> <br><br>----php code------------<br><br>#!/usr/local/bin/php -q<br><?php<br> set_time_limit(30);<br> require('phpagi.php');<br><br> $agi = new AGI();<br> $agi->answer();<br> $cid = $agi->parse_callerid();
> <br> $agi->text2wav("Hello, {$cid['name']}. Let's enter some text.");<br> $text = $agi->text_input('UPPERCASE');<br> $agi->text2wav("You entered $text");<br> $agi->text2wav('Goodbye');
> <br> $agi->hangup();<br>?><br><br>------extensions_custom.php------------<br>exten => 311,1,Answer<br>exten => 311,2 Wait(1)<br>exten => 311,3,DigitTimeout(7)<br>exten => 311,4,ResponseTimeout(10)<br>exten => 311,5,AGI(
> input.php)<br><br>------CLI output ----------------------<br> -- Executing Answer("SIP/200-09b20488", "") in new stack<br> == Spawn extension (from-internal, 311, 2) exited non-zero on 'SIP/200-09b20488'
> <br> -- Executing Macro("SIP/200-09b20488", "hangupcall") in new stack<br> -- Executing ResetCDR("SIP/200-09b20488", "w") in new stack<br> -- Executing NoCDR("SIP/200-09b20488", "") in new stack
> <br> -- Executing Wait("SIP/200-09b20488", "5") in new stack<br> -- Executing Hangup("SIP/200-09b20488", "") in new stack<br> == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'SIP/200-09b20488' in macro 'hangupcall'
> <br> == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'SIP/200-09b20488'
>
> </blockquote></div><br>
> _______________________________________________
> --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
--
Your life is like a penny. You're going to lose it. The question is:
How do
you spend it?
John Covici
covici at ccs.covici.com
More information about the asterisk-users
mailing list