[asterisk-users] Re: php agi trixbox help

2006-12-27 Thread blackwater dev

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 [EMAIL PROTECTED] 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'
___
--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


[asterisk-users] Re: php agi trixbox help

2006-12-27 Thread John covici
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([EMAIL PROTECTED]) 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 [EMAIL PROTECTED] 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:brbrPHP Warning:nbsp; 
  Unknown(): Unable to load dynamic library #39;/usr/lib/php4/imap.so#39; - 
  libc-client.so.0: cannot open shared object file: No such file or directory 
  in Unknown on line 0brbrThanks.brbrdivspan class=gmail_quoteOn 
  12/27/06, b class=gmail_sendernameblackwater dev/b lt;a 
  href=mailto:[EMAIL PROTECTED]
  [EMAIL PROTECTED]/agt; wrote:/spanblockquote 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.nbsp; When I call the 311 extension, I does nothing then hangs 
  up.nbsp; What am I doing wrong??
  brbrphp codebrbr#!/usr/local/bin/php 
  -qbrlt;?phpbrnbsp; set_time_limit(30);brnbsp; 
  require(#39;phpagi.php#39;);brbrnbsp; $agi = new AGI();brnbsp; 
  $agi-gt;answer();brnbsp; $cid = $agi-gt;parse_callerid();
  brnbsp; $agi-gt;text2wav(quot;Hello, {$cid[#39;name#39;]}.nbsp; 
  Let#39;s enter some text.quot;);brnbsp; $text = 
  $agi-gt;text_input(#39;UPPERCASE#39;);brnbsp; 
  $agi-gt;text2wav(quot;You entered $textquot;);brnbsp; 
  $agi-gt;text2wav(#39;Goodbye#39;);
  brnbsp; 
  $agi-gt;hangup();br?gt;brbr--extensions_custom.phpbrexten
   =gt; 311,1,Answerbrexten =gt; 311,2 Wait(1)brexten =gt; 
  311,3,DigitTimeout(7)brexten =gt; 311,4,ResponseTimeout(10)brexten 
  =gt; 311,5,AGI(
  input.php)brbr--CLI output --brnbsp;-- 
  Executing Answer(quot;SIP/200-09b20488quot;, quot;quot;) in new 
  stackbrnbsp; == Spawn extension (from-internal, 311, 2) exited non-zero 
  on #39;SIP/200-09b20488#39;
  brnbsp;nbsp;nbsp; -- Executing Macro(quot;SIP/200-09b20488quot;, 
  quot;hangupcallquot;) in new stackbrnbsp;nbsp;nbsp; -- Executing 
  ResetCDR(quot;SIP/200-09b20488quot;, quot;wquot;) in new 
  stackbrnbsp;nbsp;nbsp; -- Executing NoCDR(quot;SIP/200-09b20488quot;, 
  quot;quot;) in new stack
  brnbsp;nbsp;nbsp; -- Executing Wait(quot;SIP/200-09b20488quot;, 
  quot;5quot;) in new stackbrnbsp;nbsp;nbsp; -- Executing 
  Hangup(quot;SIP/200-09b20488quot;, quot;quot;) in new stackbrnbsp; == 
  Spawn extension (macro-hangupcall, s, 4) exited non-zero on 
  #39;SIP/200-09b20488#39; in macro #39;hangupcall#39;
  brnbsp; == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 
  #39;SIP/200-09b20488#39;
  
  /blockquote/divbr
  ___
  --Bandwidth and Colocation provided by Easynews.com --
  
  asterisk-users mailing list
  To UNSUBSCRIBE or 

Re: [asterisk-users] Re: php agi trixbox help

2006-12-27 Thread Paul
If you want to install the php imap support it is usually doen according
to the linux distro you use. On debian the package would be php4-imap.

If you don't want to install it you need to make sure your php and
phpagi config don't require it.

blackwater dev 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*  [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] 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' 




___
--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
  


___
--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


Re: [asterisk-users] Re: php agi trixbox help

2006-12-27 Thread Time Bandit

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

yum install php-imap

hth
___
--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


Re: [asterisk-users] Re: php agi trixbox help

2006-12-27 Thread blackwater dev

Thanks, I'll try.  I'm using the trixbox and my 311 info was in
extensions_custom.conf if that means anything.

On 12/27/06, John covici [EMAIL PROTECTED] wrote:


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([EMAIL PROTECTED]) wrote
 Not sure if this has anything to do with it but running the input.phpscript
 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 [EMAIL PROTECTED] 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.phpscript directly from 
the command line gives this warning:brbrPHP
Warning:nbsp; Unknown(): Unable to load dynamic library
#39;/usr/lib/php4/imap.so#39; -
 libc-client.so.0: cannot open shared object file: No such file or
directory in Unknown on line 0brbrThanks.brbrdivspan
class=gmail_quoteOn 12/27/06, b class=gmail_sendernameblackwater
dev/b lt;a href=mailto:[EMAIL PROTECTED]
 [EMAIL PROTECTED]/agt; wrote:/spanblockquote
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.nbsp; When I call the
311 extension, I does nothing then hangs up.nbsp; What am I doing wrong??
 brbrphp codebrbr#!/usr/local/bin/php
-qbrlt;?phpbrnbsp; set_time_limit(30);brnbsp;
require(#39;phpagi.php#39;);brbrnbsp; $agi = new AGI();brnbsp;
$agi-gt;answer();brnbsp; $cid = $agi-gt;parse_callerid();
 brnbsp; $agi-gt;text2wav(quot;Hello, {$cid[#39;name#39;]}.nbsp;
Let#39;s enter some text.quot;);brnbsp; $text =
$agi-gt;text_input(#39;UPPERCASE#39;);brnbsp;
$agi-gt;text2wav(quot;You entered $textquot;);brnbsp;
$agi-gt;text2wav(#39;Goodbye#39;);
 brnbsp;
$agi-gt;hangup();br?gt;brbr--extensions_custom.phpbrexten
=gt; 311,1,Answerbrexten =gt; 311,2 Wait(1)brexten =gt;
311,3,DigitTimeout(7)brexten =gt; 311,4,ResponseTimeout(10)brexten
=gt; 311,5,AGI(
 input.php)brbr--CLI output --brnbsp;--
Executing Answer(quot;SIP/200-09b20488quot;, quot;quot;) in new
stackbrnbsp; == Spawn extension (from-internal, 311, 2) exited non-zero
on #39;SIP/200-09b20488#39;
 brnbsp;nbsp;nbsp; -- Executing Macro(quot;SIP/200-09b20488quot;,
quot;hangupcallquot;) in new stackbrnbsp;nbsp;nbsp; -- Executing
ResetCDR(quot;SIP/200-09b20488quot;, quot;wquot;) in new
stackbrnbsp;nbsp;nbsp; -- Executing NoCDR(quot;SIP/200-09b20488quot;,
quot;quot;) in new stack
 brnbsp;nbsp;nbsp; -- Executing Wait(quot;SIP/200-09b20488quot;,
quot;5quot;) in new stackbrnbsp;nbsp;nbsp; -- Executing
Hangup(quot;SIP/200-09b20488quot;, quot;quot;) in new stackbrnbsp; ==
Spawn extension (macro-hangupcall, s, 4) exited non-zero on
#39;SIP/200-09b20488#39; in macro #39;hangupcall#39;
 brnbsp; == Spawn extension (macro-hangupcall, s, 4) exited non-zero
on #39;SIP/200-09b20488#39;

 /blockquote/divbr
 ___
 --Bandwidth and Colocation provided by Easynews.com --

 asterisk-users mailing list
 To UNSUBSCRIBE or update options 

Re: [asterisk-users] Re: php agi trixbox help

2006-12-27 Thread blackwater dev

Ok, I did that and I can now do a locate and do now see:
/usr/lib/php4/imap.so
/usr/lib/httpd/modules/mod_imap.so

So I restarted apache, and tried to run my file from the command line and
get the same error.  I have another one that doesn't use the phpagi class
and it works ok but throws the same warning so I don't think that is why the
script doesn't seem to work...not sure.

Thanks!

On 12/27/06, Time Bandit [EMAIL PROTECTED] wrote:


 Not sure if this has anything to do with it but running the input.phpscript
 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
yum install php-imap

hth
___
--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

___
--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


Re: [asterisk-users] Re: php agi trixbox help

2006-12-27 Thread blackwater dev

Thanks for all the help.  I finally got it all working.  There was some
problems with the swift functions of phpagi as it couldn't find it so that
command was failing.  I fixed it and all is well now.

Thanks!

On 12/27/06, blackwater dev [EMAIL PROTECTED] wrote:


Ok, I did that and I can now do a locate and do now see:
/usr/lib/php4/imap.so
/usr/lib/httpd/modules/mod_imap.so

So I restarted apache, and tried to run my file from the command line and
get the same error.  I have another one that doesn't use the phpagi class
and it works ok but throws the same warning so I don't think that is why the
script doesn't seem to work...not sure.

Thanks!

On 12/27/06, Time Bandit [EMAIL PROTECTED] wrote:

  Not sure if this has anything to do with it but running the input.phpscript
  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
 yum install php-imap

 hth
 ___
 --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



___
--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


RE: [asterisk-users] Re: php agi trixbox help

2006-12-27 Thread Mike D'Ambrogia
curious about what swift problem you saw and what you did to get the
swift problems resolved...

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of blackwater
dev
Sent: Wednesday, December 27, 2006 1:14 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Re: php agi trixbox help


Thanks for all the help.  I finally got it all working.  There was some
problems with the swift functions of phpagi as it couldn't find it so
that command was failing.  I fixed it and all is well now.

Thanks!


___
--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


Re: [asterisk-users] Re: php agi trixbox help

2006-12-27 Thread blackwater dev

I printed out the exec statement in the swift function within the phpagi
script and noticed that it didn't have a swift location.  For some reason,
it wasn't picking it so I just changed that to the location on my machine.
I also noticed that it was adding to many slashes to the temp file name.  I
don't have access to the box here but if needed, can send my modified swift
function if you're haing the same problem.

On 12/27/06, Mike D'Ambrogia [EMAIL PROTECTED] wrote:


 curious about what swift problem you saw and what you did to get the
swift problems resolved...

 -Original Message-
*From:* [EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED] *On Behalf Of *blackwater dev
*Sent:* Wednesday, December 27, 2006 1:14 PM
*To:* Asterisk Users Mailing List - Non-Commercial Discussion
*Subject:* Re: [asterisk-users] Re: php agi trixbox help

Thanks for all the help.  I finally got it all working.  There was some
problems with the swift functions of phpagi as it couldn't find it so that
command was failing.  I fixed it and all is well now.

Thanks!


___
--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



___
--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