Include PHP file


#1

Hi all,

I have my own billing system with freeradius which is running for our customers. and i wanted to integrate Callback system with our Billing System. So if i am going to use AstBill or any others billing system i cannot make connection to my real billing system.

For this i start to work with Asterisk and PHP to work with my old database. First as i am begner in Asterisk i wanted to ask how i can include PHP file and retrive the value from PHP variable into sip.conf or extentions.conf.

for the example in following example to send max calling time, if i want to take this time value from php variable how i can define into Dial format, is this configuration will work?

#include myphp.php
Dial(“SIP/70103-dc7a”, “SIP/70108|30|tTL($phpvar:$phpvar1:$phpvar2)|20”)


#2

You could create an Agi/PHP script that sets a variable when called in your dialplan.


#3

Hi,

I already install the agiphp from the following steps, i want to be sure, is my agiphp installation is correct or not.

i copied all following files into
/var/lib/asterisk/agi-bin folder

phpagi.php
phpagi-asmanager.php
phpagi-fastagi.php
dtmf.php ;For test

i crated one extention

[ppp]
exten => 111,1,agi(dtmf.php)

These are all modification which i did for phpagi, Is another configurations need to be done to work properly?

When i am dialing this 111 extentions i am getting the error:

Nov 21 06:44:30 WARNING[8266]: Timeout, but no rule ‘t’ in context ‘ppp’

i will be very thank full if anyone can help me.


#4

abdulzu, working together we could probably get this to work but at the end of the day you will be better off engineering this with Asterisk 1.2/Realtime