[asterisk-users] New implementation asterisk

Gareth Blades list-asterisk at skycomuk.com
Fri Nov 26 08:12:02 CST 2010


Edwin Blommaerts wrote:
> Hello everyone,
> 
>  
> 
> I have some questions regarding implementing asterisk and my-sql.  I’m 
> no expert at asterisk but I’m going to list up my questions and 
> hopefully someone will be able to help.
> 
>  
> 
> -The people that setup our server made asterisk write the sound files 
> onto the hard drive, and then somewhat later store these files into 
> my-sql. Is this the proper way to do it? Or would it make more sense to 
> just have my-sql store the path to the file? Or is it possible to store 
> the data directly into my-sql from asterisk? So in general what is the 
> best way to make this happen? Has anyone implemented something similar?

Seems a little odd. We have voicemails stored on a separate server with 
access via nfs.
Thats not to say you cannot store the files within the mysql database 
but it would make backups take much longer. With storing flat files you 
can just use rsync to do the backups so you actually only copy changed 
files which is much better.

> -They also claim that for performance and other issues no queries should 
> be done on the main asterisk my-sql database, but instead we should 
> setup replication between two my-sql databases and queries should be run 
> on the slave. Is this needed and why is this needed, because my-sql 
> prefers insert above read actions I don’t really see why? Our current 
> server now shows segmentation errors at boot and they claim that this is 
> due to queries on the database. I’ve also checked the query it returns 
> the data to us in less then 3 seconds, so I’m doubting this can be the 
> trouble.

You do that so you can effectivly load balance between two boxes. One 
does all the inserts and database modification work while the others 
(you can have multiple slaves) handle all the reads.
3 seconds is a long time. I dont know what you are actually reading but 
if thats the time it takes asterisk to read a table entry then caller 
may be waiting 3 seconds before asterisk even attempts to dial the 
destination.

> -Sometimes the phone lines hang waiting, people can’t call out because 
> asterisk seems to be holding on to these lines for a certain amount of 
> time. What could be the cause of this?

Do you do anything in the 'h' extension? If you are calling an AGI 
program there and it hangs that channel stays busy.

> -What is the best hardware architecture for asterisk implementation? 
> My-sql and asterisk on separate servers, or doesn’t it really matter?

It all depends on how many calls you are handling, how much voicemail 
access, how much custom agi scripts you run and various other things.
If its database intensive then use a separate database server(s).
If you are calling lots of AGI scripts then consider a separate fastAGI 
server and have the scripts running as a daemon so you dont have all the 
startup overhead.

> 
>  
> 
> I really hope to get some advice, because, I’ve began to doubt/question 
> the people who set the server up. I’m happy with any information, good 
> references that you can give me.
> 
>  
> 
> Thanks a lot in advance
> 
>  
> 
> EB
> 
> 
> ------------------------------------------------------------------------
> This email is scanned with Mcafee Groupshield.
> ---------------------------------------------------------------------------------------------------------------------------
> This email and any attached files are confidential and may be legally 
> privileged. If you are not the intended recipient, any disclosure, 
> reproduction, copying, distribution, or other dissemination or use of 
> this communication is strictly prohibited. If you have received this 
> transmission in error please notify the sender immediately and then 
> delete this email. Email transmission cannot be guaranteed to be secure 
> or error free as information could be intercepted, corrupted, lost, 
> destroyed, arrive late or incomplete, or contain viruses. The sender 
> therefore is in no way liable for any errors or omissions in the content 
> of this message, which may arise as a result of email transmission. If 
> verification is required, please request a hard copy.
> 




More information about the asterisk-users mailing list