On 1/25/06, <b class="gmail_sendername">Douglas Garstang</b> <<a href="mailto:dgarstang@oneeighty.com">dgarstang@oneeighty.com</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Some questions regarding calling Fast AGI from the dial plan.<br><br>Considering that the server side of the Fast AGI has to be able to a) use threading and b) connect to MySQL, this causes some serious limitations. I'm not a C programmer, so development options are either perl or python.
</blockquote><div><br>In ref to using perl, You can't connect to the database for each thread? <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
It appears that the perl DBI isn't thread safe, so that rules out Perl. Python's database interfaces are apparently thread safe _to a point_, so that seems like a better idea. I'd prefer to stick with Perl because I am more familar with it, but oh well...
<br><br>Has anyone done this? Was it successful? Did you control the entire dial plan logic from the AGI, or did you just make AGI calls as necessary to look certain things up? What about iterative queries where you had to maintain the state from one call of the AGI to the next? Did you stay in the AGI until control was complete, or did you return control to the Asterisk dial plan after every lookup, where it performed some actions, and then you returned to the AGI.... if this was the way you did it, how did you maintain the database state from one call to the next???
</blockquote><div><br> </div><br><div>Anytime I decide to include AGI into an application, I try to keep most of the code and logic inside the AGI. I have successfully written FastAGI applications in python, and it was a good experience.
<br>What state are you speaking of? I don't quite follow.<br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Did you have multiple AGI scripts, broken down by function, or did you have one AGI script that was passed a value that specified it's function, and then you branched into some section of this all-encompassing AGI based on the value passed?
<br><br>Thanks,<br>Doug.<br><br><br><br><br><br><br><br><br><br>_______________________________________________<br>--Bandwidth and Colocation provided by <a href="http://Easynews.com">Easynews.com</a> --<br><br>Asterisk-Users mailing list
<br>To UNSUBSCRIBE or update options visit:<br> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br><br><br></blockquote></div><br><br clear="all">
<br>-- <br>Sig Lange<br><a href="http://www.signuts.net/">http://www.signuts.net/</a>