[Asterisk-Users] how to debug perl agi

Ronald_Wiplinger ronald_wiplinger at leadtek.com.tw
Thu Jul 14 22:04:22 MST 2005


Juan J. Sierralta P. wrote:

>Hi,
>
>  
>
>>>syslog('info', 'hello Asterisk!');
>>>      
>>>
>>That should go into the syslog for the facility "user". It may end up on
>>/var/log/messages , /var/log/user.log or whereever your system sends
>>such log entries.
>>
>>But why not print to STDERR? IIRC the stderr of AGI scripts goes to the
>>asterisk console.
>>    
>>
>
>     Dunno but at least ASTCC as lot of prints to STDERR but none of
>these appeared on my console.
>  
>

As I can remember you get the print statements but NOT on a remote 
console, ....


bye

Ronald

>     BTW I had to patch last ASTCC CVS since it wasn't getting the call time:
>
>--- /home/juanjo/voip/astcc/astcc.agi   2005-07-11 03:28:06.000000000 -0400
>+++ astcc.agi   2005-07-12 01:48:41.000000000 -0400
>@@ -329,9 +329,10 @@
>
> sub calccost() {
>        my ($adjconn, $adjcost, $answeredtime, $increment) = @_;
>-       eval { my $adjtime = int(($answeredtime + $increment - 1) /
>$increment) * $increment };
>+       my $adjtime = int(($answeredtime + $increment - 1) /
>$increment) * $increment;
>        my $cost;
>
>I'm using Perl 5.8:
>
>juanjo at vox:~$ perl -v
>
>This is perl, v5.8.4 built for i386-linux-thread-multi
>Copyright 1987-2004, Larry Wall
>_______________________________________________
>Asterisk-Users mailing list
>Asterisk-Users at lists.digium.com
>http://lists.digium.com/mailman/listinfo/asterisk-users
>To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>
>  
>





More information about the asterisk-users mailing list