Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Fri Mar 29, 2024 11:44 am
Voice Broadcast System


All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Getting variable from a2billing.php in Class.RateEngine.php
PostPosted: Tue Sep 02, 2008 3:02 pm 
Offline

Joined: Mon Jan 28, 2008 1:58 pm
Posts: 9
Location: Buenos Aires, Argentina
Hello !

I need some help on reading a variable from Class.A2Billing.php and Class.RateEngine.php that I get in a2billing.php below my scenario:

In extensions.conf I have:

exten => s,3,DeadAGI(a2billing.php|${CALLERID(num)}|${EXTEN})

( I added the two parameters that I get with $argv[n] in a2billing.php )

In a2billing.php I added the following to read $argv[2], in this case ${EXTEN}:

$midnis = $argv[2]; // matias variable
$A2B -> matdnis = $midnis;

In Class.A2Billing.php I added to the Class the var $matdnis; so I can get the value it in Class.RateEngine.php that I got in argv[2] in a2billing.php.

Everything is working fine but I don't find a way to get in Class.A2Billing.php or Class.RateEngine.php the value of the variable that I have in a2billing.php .

Can anyone give me a hint on how to solve this ?

Thanks in advance !

Matias


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 02, 2008 3:12 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
Read the code some more and you'll see these values are already available as $A2B->callerid and $A2B->dnid (or $this->callerid and $this->dnid from within Class.A2Billing.php).


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 02, 2008 3:38 pm 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
Pass them as argument to the function that you want to use them in, or use them as global variables.

Added after 1 minutes:

Oops. Stavros, I didn't see you message. That will also work.


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


All times are UTC


Who is online

Users browsing this forum: No registered users and 9 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