bar top left
bar top right
left curve
right curve
Welcome, Guest
Go to bottom
Post Reply
Post New Topic
Page: 12
TOPIC: FastAGI
#30077
FastAGI 2 Years, 10 Months ago Karma: 2
anyone has any idea how to set up an agi server ??
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
itjumper
Junior Boarder
Posts: 81
graphgraph
User Offline Click here to see the profile of this user
ITJUMPER Location: Toronto, Ontario
Reply Quote
 
#30718
Re:FastAGI 2 Years, 10 Months ago Karma: 11
Hy my friend,
before setting up Agi server, you should choose your language programming,
you can use agi commnd on many manguages like C,JAVA,PHP,Perl,Rubby & ...
I prefer PHP for small programs and JAVA for huge ones,


Good jobB)
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
haamed
www.voip-iran.com
Moderator
Posts: 252
graphgraph
User Offline Click here to see the profile of this user
Gender: Male VoIP-IRAN haamed61 Location: Tehran Birthday: 10/11
#####################
Haamed Kouhfallah
Links hidden for unregistered users. Login or register Here
فارسي زبان در دنيا VoIP تنها سايت و انجمن
نماينده سيستم تلفني الستيكس در ايران
Reply Quote
 
#31022
Re:FastAGI 2 Years, 10 Months ago Karma: 2
I used php and found phpagi-fastagi. However, input/output from stdin and stdout are not passed. Looking at phpagi-fastagi, shouldn't the socket be passed to the NEW AGI (3rd parameter in the constructor)?? But where is the socket defined in phpagi-fastagi??
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
itjumper
Junior Boarder
Posts: 81
graphgraph
User Offline Click here to see the profile of this user
ITJUMPER Location: Toronto, Ontario
Reply Quote
 
#34566
Re:FastAGI 2 Years, 8 Months ago Karma: 0
After having looked at various FastAGI offerings , I had decided I really did not care for any of them.

Being as I can just as easily create daemons in C++ or PHP, I had a choice to make.
For ease of development I elected to create a generic PHP daemon that would
allow me to dynamically load PHP scripts via the dial plan.

This makes development really easy as I can simply edit,save and dial, vs. any kind of
compiling or restarting after an edit to a particular PHP script.

When a script is called it is passed a reference to a PHP object containing all the
information passed by asterisk as well as interfaces to both AGI and AMI resources, and
soon a MySql reference as well so a script has everything it needs in a nice thin interface.

I've posted the code for it at google projects. code.google.com/p/fastagi-php-drclue/

There is also a WIKI with documentation on installation, class methods and such along with
a couple of example scripts.

The FastAGI.php script even has a command line option that will generate the init.d
script so that the FastAGI.php daemon will start at boot.


Enjoy!!!
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
drclue
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Reply Quote
 
#34573
Re:FastAGI 2 Years, 8 Months ago Karma: 39
nice dr. clue

Thanks a lot for sharing your code
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
rafael
Free Software is all about freedom
Developer
Posts: 1458
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Elastix Location: Ecuador Birthday: 10/11
Reply Quote
 
#34789
Re:FastAGI 2 Years, 8 Months ago Karma: 11
Thanks drclue,
that was nice,
I hope we can more references in this forum,

Thanks again:kiss:
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
haamed
www.voip-iran.com
Moderator
Posts: 252
graphgraph
User Offline Click here to see the profile of this user
Gender: Male VoIP-IRAN haamed61 Location: Tehran Birthday: 10/11
#####################
Haamed Kouhfallah
Links hidden for unregistered users. Login or register Here
فارسي زبان در دنيا VoIP تنها سايت و انجمن
نماينده سيستم تلفني الستيكس در ايران
Reply Quote
 
#37071
Re:FastAGI 2 Years, 7 Months ago Karma: 2
Excellent. Got my fastagi server running after fixing one bug in class.daemon.inc

I have a question regarding calling phpagi inside a Fastagi script.

I have 2 asterisk servers. Server A handles incoming call, server B handles some other phone lines.

my senerio is

1. caller calls into server A
2. server A invokes a fastagi script on serevr B, passing some info to it
3. server B will then make a phone call using the phone lines attached to itself (server
4. server B will pass the result back to server A
5. server A will then continue with the dial plan

Can anyone tell me if I can use phpagi inside a Fastagi script? It seems to hang with the "New" instance.
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
itjumper
Junior Boarder
Posts: 81
graphgraph
User Offline Click here to see the profile of this user
ITJUMPER Location: Toronto, Ontario
Reply Quote
 
#37088
Re:FastAGI 2 Years, 7 Months ago Karma: 0
Howdy itjumper

Firstly , if there was an error that you corrected , please let me know
so that I can fix it in the main code for everyone.


As to contacting the instance of asterisk on server B,
from the FastAGI plugin ,I guess I would for a down and dirty fix, issue
a an AMI logout command.

$oDaemon->AMIcommand("logout")

Then I would adjust the $oDaemon member variables $szAMIusername,$szAMIsecret,
$iAMIserverPort, and $iAMIserverHost as needed and call $oDaemon->AMIlogin()
to connect to server B's AMI interface to place the call.
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
drclue
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Reply Quote
 
#37159
Re:FastAGI 2 Years, 7 Months ago Karma: 2
Thanks for the advice.

The error is in calss.daemon.inc

a slash is missing in start()

nohup .$szEXE start > /dev/null &

should be

nohup ./$szEXE start > /dev/null &
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
itjumper
Junior Boarder
Posts: 81
graphgraph
User Offline Click here to see the profile of this user
ITJUMPER Location: Toronto, Ontario
Reply Quote
 
#37160
Re:FastAGI 2 Years, 7 Months ago Karma: 0
Howdy itjumper

Thanks for pointing out the typo in the init.d script generation.
The error should be corrected now and present in the downloads section
of code.google.com/p/fastagi-php-drclue/

--Doc
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
drclue
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Reply Quote
 
Go to top
Post Reply
Post New Topic
Page: 12
Moderators: haamed, jgutierrez
Protected by Spam Fighter