New implementation asterisk

Home » Asterisk Users » New implementation asterisk
Asterisk Users 4 Comments

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?

-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.

-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?

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

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.

4 thoughts on - New implementation asterisk

  • Several questions inline – no answers

    Edwin Blommaerts wrote:
    How large is the PBX ?
    How many users, phones, technology of phones, etc
    Hardware platform for Asterisk – CPU memory,etc
    phone “lines” POTS analog? SIP trunks? IAX trunks?
    POTS analog may not be communicating to Asterisk, or asterisk may not be
    listening for any hangup signal, if it exists. What does the PSTN
    provider supply?
    Size of installation and amount of data handled with MySQL?
    John Novack

  • Edwin Blommaerts wrote:

    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.

    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.

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

    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.

  • You have provided no details to base suggestions on, so take any
    suggestions with a grain of ‘salt.’

    This sounds a bit suspect. What sound files are you talking about?
    Voicemail? Prompts? Responses? Dictation?

    That explanation sounds bogus. Where are you seeing segmentation errors?
    What processes are faulting? Do you see the same thing if you restart
    Asterisk or MySQL?

    In a production environment, ‘seg-faulting’ is unacceptable and needs to
    be resolved.

    In some environments, 3 seconds might as well be never. I’d aim for
    sub-second response for anything that affects call processing.

    Does this happen with every call?

    What does the console log (with debug and verbose cranked up) look like
    when this happens?

    With no details, this comes down to personal preference.

    For ‘big systems,’ I like to ‘front-end’ a pool of Asterisk servers with a
    couple of boxes running OpenSIPS and I like to run databases on boxes by
    themselves.

    OpenSIPS lets you load balance and take boxes out of production easily.

    I think of database servers and ‘telephony servers’ as having different
    characteristics and needs.

    If you would like more concrete suggestions, please reply with more
    details.

    Basic details like:

    ) What does the system do?

    ) What version of Asterisk?

    ) What channel technologies are used?

    ) Average simultaneous calls?

    ) Peak simultaneous calls?

    may shed light on an appropriate solution.

  • This sounds a bit suspect. What sound files are you talking about?
    Voicemail? Prompts? Responses? Dictation?

    Phone call recordings, outgoing and incoming to and from the call center.

    That explanation sounds bogus. Where are you seeing segmentation errors?
    What processes are faulting? Do you see the same thing if you restart Asterisk or MySQL?
    In a production environment, ‘seg-faulting’ is unacceptable and needs to be resolved.

    Indeed, that’s why I’m opting for a fresh install and this time setting it up in the right way.

    ) What does the system do?

    It is supposed to record the calls of the call agents there is about 10 – 15 call agents. The reason for storing them is that a third party should be able to retrieve them through our corporate website. I don’t understand why it is necessary to store these files into a database? To me this is not needed at all and would GREATLY improve performance if we just used a path to the files stored into the database.

    ) What version of Asterisk?

    1.8

    ) What channel technologies are used?

    I will have to get back to you on this, I’m not exactly sure.

    ) Average simultaneous calls?

    8 * 5 mins

    ) Peak simultaneous calls?

    15 * 5 mins

    Thanks for the quick reply