On 8/14/07, Atis <[EMAIL PROTECTED]> wrote:
>
> That's possible, but i wouldn't recommend on large production system.
> Using MySQL you would need to connect and disconnect all the time, and
> it takes resources.. I would suggest to append that info to CDR
> userfield (if you are storing your CDR in MySQL), and run periodically
> some script that extracts them. Of course it's more complex, but that
> would be my way.


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.

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.

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.

-- 
j.
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to