On 8/14/07, <b class="gmail_sendername">Atis</b> &lt;<a href="mailto:atis@best.eu.org">atis@best.eu.org</a>&gt; 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&#39;s possible, but i wouldn&#39;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&#39;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.&nbsp; 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.&nbsp; Perl&#39;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.&nbsp; It&#39;s very similar to the Apache prefork model.
<br><br></div></div>-- <br>j.