Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


mruane

420 posts

Ultimate Geek
+1 received by user: 2


#40507 30-Aug-2009 14:29
Send private message

I seemed to have had a reasonable run this time, but again today, I find the "Request Sent" status message for my Trixbox VFX trunk.  All of the other trunks are "Registered" just fine, but VFX sits there with "Request Sent"!

Interestingly, selecting "Re-Read Configs from the Config File Editor menu, restores the connection immediately. So I wonder if I can setup a cron job to force Asterisk to "sip reload" would be one way of stopping this from happening. Perhaps that job could run dailly.

Does anyone with Linux experience know how to do this - perhaps from Webmin?

Cheers Mike

Create new topic
sbiddle
30853 posts

Uber Geek
+1 received by user: 9996

Retired Mod
Trusted
Biddle Corp
Lifetime subscriber

  #251755 30-Aug-2009 16:09
Send private message

You just need to configure a cron job to do a

asterisk -rx "sip reload"

Your best bet is to do a bit of reading about setting up a cron job as it's fairly simple to configure them however you want to. Check out this page here which is good.

Essentially you can create a task such as

0 0 * * * * /usr/sbin/asterisk -rx "sip reload"

which will force Asterisk to do a SIP reload every hour, on the hour.





sbiddle
30853 posts

Uber Geek
+1 received by user: 9996

Retired Mod
Trusted
Biddle Corp
Lifetime subscriber

  #252559 2-Sep-2009 13:26
Send private message

I've actually just written a blog post about this now detailing how to add a cron job.

http://www.geekzone.co.nz/sbiddle/6740

I should probably add it here as a forum post and sticky it as well for those who want to find it quickly.

mruane

420 posts

Ultimate Geek
+1 received by user: 2


  #252614 2-Sep-2009 15:37
Send private message

Oh great - thanks for the links sbiddle. I will review your blog also.

Edit:

So based on your examples, the following command would refresh the SIP registrations once a day at 5:30am (before anyone arises):

30 5 * * * root /usr/sbin/asterisk -rx "sip reload"

Is that about it?

Cheers Mike



sbiddle
30853 posts

Uber Geek
+1 received by user: 9996

Retired Mod
Trusted
Biddle Corp
Lifetime subscriber

  #252627 2-Sep-2009 15:54
Send private message

Yip that should work fine.

Asterisk does send a REGISTER every 3 minutes anyway so there is no harm in leaving it every 30 mins, or even making that time shorter if you feel there is a need. You just don't want to go flooding their network with requests! :-)


mruane

420 posts

Ultimate Geek
+1 received by user: 2


  #252838 3-Sep-2009 09:08
Send private message

I suspect that the Registration request every three minutes is a different thing to a SIP Reload. The SIP Reload actually forces the reconnection in my case, whereas the re-registration just does nothing.

It would be good to try and get to the bottom of what is causing the registration to be dropped and not reconnected automatically. In the meantime, a daily reload should do the trick.

Thanks again for your help!

Cheers Mike

Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.