Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Fri Mar 29, 2024 12:09 pm
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: A2Billing 1.4.2 and PHP 5.3.x problem
PostPosted: Thu Aug 27, 2009 10:09 pm 
Offline
User avatar

Joined: Thu Feb 26, 2009 11:42 pm
Posts: 46
Location: Brazil
Hi all,

UPDATE: I will delete some of my previous post since it is no more accurate. Bellow is update of how you can upgrade to 5.2.x using CentOS testing repositories.

I just had some bad experience with the before mentioned version of PHP 5.3x and decided to share it.

Now about the problem.

Installation of PHP and MYSQL always goes well until we come to the point of using a2billing.php. The script just dies with the following lines:

Code:
    -- Executing [551140041001@a2billing:1] Answer("SIP/1834454-0888d7b0", "") in new stack
    -- Executing [551140041001@a2billing:2] DeadAGI("SIP/1834454-0888d7b0", "a2billing.php|1") in new stack
[Aug 27 17:47:13] WARNING[5197]: res_agi.c:2203 deadagi_exec: Running DeadAGI on a live channel will cause problems, please use AGI
    -- Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php
PHP Parse error:  syntax error, unexpected T_GOTO, expecting T_STRING in /var/lib/asterisk/agi-bin/lib/phpagi/phpagi.php on line 1227
    -- AGI Script a2billing.php completed, returning 0
    -- Executing [551140041001@a2billing:3] Hangup("SIP/1834454-0888d7b0", "") in new stack
  == Spawn extension (a2billing, 551140041001, 3) exited non-zero on 'SIP/1834454-0888d7b0'


There is a PHP parse error and a search on GOOGLE shows that some commands ( like GOTO ) are somehow protected or may not be used anymore as before..I am not a programmer so I have no idea what this means. I just know that A2Billing wont work with PHP 5.3

Here are some instructions on how to install php 5.2.10 from Remi's repositories. I am just testing it and it seems to be working without issues.
Commands bellow are to be executed line by line from SSH and used with YUM manager that is part of Fedora, RedHat and CentOS distributions

First you have to remove your existing php

Code:
yum remove php


then execute the command bellow to see if there is still something from php * package
Code:
rpm -qa | grep php


If somethng shows up execute the command
Code:
yum remove php-*


and test again with
Code:
rpm -qa | grep php

IF all is clean proceed to the installation of php5.2.x bellow.

First we need to enable CentOS repositories.

Code:
nano /etc/yum.repos.d/centos-test.repo


copy and paste the following lines

Code:
[c5-testing]
name=CentOS-5 Testing
baseurl=http://dev.centos.org/centos/5/testing/$basearch/
enabled=0
gpgcheck=1
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing

Better to set "enabled=0" (disabled) and use this repo only when we need it.

Press Ctrl+x then y and Enter to save the file.


You are good to go. Execute the following command to use CentOS testing repo and install php 5.2.x
Code:
yum --enablerepo=c5-testing install php


Greets,

Koki


Top
 Profile  
 
 Post subject: Re: A2Billing 1.4.2 and PHP 5.3.x problem
PostPosted: Fri Aug 19, 2011 2:18 pm 
Offline

Joined: Fri Jul 11, 2008 6:54 pm
Posts: 39
Location: Armenia, Yerevan
I have found another solution
Just change function name 'goto' to '_goto' in phpagi.php


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 
Hosted Voice Broadcast


All times are UTC


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group