Asterisk not running well

I am having problems with my asterisk.I can’t connect remotely to the asterisk CLI…when it works,"stop now"doesn’t respond…and i can’t link my server with x-lite.the thing is it sometimes work,other times it doesnt.i have installed a fresh
copy of asterisk but the same problem there anyway to run a diagnostic test on asterisk to see where problems might be.thanks

Is there any error message when you try to connect the Asterisk server. If so let us know the error message.

What is the Version of asterisk server installed.

I installed Asterisk v1.6.2.6.when i try to connect X-lite it gives this error - Registration error 405.Method Not Allowed

If you do a search on Internet, you will find there are a lot of posts/responses about Registration error 405.Method Not Allowed. So, without looking at your configurations, it is almost impossible to come up with a solution that can resolve your issue.