Summary: Is it possible to append to a user-defined text file from the dialplan without using AGI ? Background: We are using our Asterisk server to place outbound calls alone. We've 8 E1s that enables us to place about 240 calls concurrently. The server is a bit old, and we are not able to reach our maximum capacity. The dialplan makes use of MySQL to record call status information to our external database. My understanding is that for each call, asterisk creates a new mysql connection and tears it down when the call terminates. We are moving in the assumption that this could be an overhead, and by eliminating MySQL entirely, we could make more resources available to Asterisk. For this, we are trying to simply dump the data generated during calls to a text file, which will be monitored by a daemon running in the background. Our main requirement is to make the data available real time for monitoring purposes. It seems hard to use CDR for the purpose because we will need to monitor the status as the call progresses. I'm also trying to avoid calling the AGI - with our server configuration, the overhead in creating a new process for every data update during the calls seems to be too big. Would the AGI Manager Interface be efficient enough? We are trying to go for a dialplan only config with extras. If my assumptions are incorrect, please advise. I'm a relatively newbie and it has been about two weeks since I first heard of Asterisk :) Thanks for your time. -- Unni unni2003 at mailup.net -- http://www.fastmail.fm - Does exactly what it says on the tin
Why don't you setup a second server just for mysql and fastagi. Fastagi can also be installed on your asterisk server with just a small overhead, as fastagi will keep running in the background, you will not have the overhead of creating new process at each call. Olivier Unni a ?crit :> Summary: Is it possible to append to a user-defined text file from the > dialplan without using AGI ? > > Background: We are using our Asterisk server to place outbound calls > alone. We've 8 E1s that enables us to place about 240 calls > concurrently. The server is a bit old, and we are not able to reach our > maximum capacity. > > The dialplan makes use of MySQL to record call status information to our > external database. My understanding is that for each call, asterisk > creates a new mysql connection and tears it down when the call > terminates. We are moving in the assumption that this could be an > overhead, and by eliminating MySQL entirely, we could make more > resources available to Asterisk. > > For this, we are trying to simply dump the data generated during calls > to a text file, which will be monitored by a daemon running in the > background. Our main requirement is to make the data available real time > for monitoring purposes. It seems hard to use CDR for the purpose > because we will need to monitor the status as the call progresses. > > I'm also trying to avoid calling the AGI - with our server > configuration, the overhead in creating a new process for every data > update during the calls seems to be too big. Would the AGI Manager > Interface be efficient enough? We are trying to go for a dialplan only > config with extras. > > If my assumptions are incorrect, please advise. I'm a relatively newbie > and it has been about two weeks since I first heard of Asterisk :) > > Thanks for your time. >
On 13/08/09 8:33 PM, Unni wrote:> Summary: Is it possible to append to a user-defined text file from the > dialplan without using AGI ?You could use inotify to watch a directory owned by your webserver, then when you add a new rate to it cause it to run a script that updates the dialplan and reloads it - depends what info you're trying to get in there - alternatively if the process changing the rates has access to the root file system (i.e. not a web server) just do it from there - you'd need to pay attention to what happens when the dialplan is reloaded under heavy load. -- Cheers, Matt Riddell Director _______________________________________________ http://www.venturevoip.com/news.php (Daily Asterisk News) http://www.venturevoip.com/st.php (SmoothTorque Predictive Dialer) http://www.venturevoip.com/c3.php (ConduIT3 PABX Systems)