On 8/14/07, <b class="gmail_sendername">Atis</b> <<a href="mailto:atis@best.eu.org">atis@best.eu.org</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;">
That's possible, but i wouldn't recommend on large production system.<br>Using MySQL you would need to connect and disconnect all the time, and<br>it takes resources.. I would suggest to append that info to CDR<br>
userfield (if you are storing your CDR in MySQL), and run periodically<br>some script that extracts them. Of course it's more complex, but that<br>would be my way.</blockquote><div><br>If the data you wish to store is more complex than stuffing in the CDR userfield would allow, you can always call out to an AGI which can write the data to whatever file format you want for later loading into a database.
<br><br>If you used FastAGI and a pre-forking AGI server model, you could even take the database connection hit when the AGI server starts. The per-call cost would then be the cost to establish the socket connection to the AGI server from Asterisk, the cost to perform the SQL inserts over an established database connection, plus whatever other calculation or transformation you needed to do before doing the insert.
<br><br>That architecture would hold up under a fairly large load. Perl's Asterisk::FastAGI framework lets you specify the number of pre-forked children to launch, plus you can tell each child to exit (spawning a replacement for the pool) after processing a certain number of transactions. It's very similar to the Apache prefork model.
<br><br></div></div>-- <br>j.