IAX persistence to service provider

Looking for some advice on how to troubleshoot:
I’m running AAH, with asterisk 1.2.1
I connect via IAX2 to my service provider (http://unlimitel.ca/). My AAH box is behind a router/firewall and I have a DHCP connection through a cable ISP.

Everything works fine… except that every once in a while (sometimes as short as 48 hours; more typically: once every 2-3 weeks), the connection to my IAX service provider fails (he says my box isn’t registering with his * server). I reboot and everything is fine.

I have an inkling that it occurs when I get an updated DHCP lease/address from my ISP, but haven’t been able to confirm that, and besides, I thought IAX was DHCP/NAT agnostic.
My IAX service provider says he’s seen this with a couple of other customers but hasn’t been able to solve it.
Is there a way of forcing a re-register with my service provider - something I could hack into a Cron script?

thanks in advance

Yes, cron this command to …lets say all 6 hours:

asterisk -rx reload

A reload is forcing a re-registering.

But you said you need to rebot, so it might be, the problem is located elsewhere and a reload wont help.

Simply test it by doing a reload from the CLI when this happens.

Another spot to look at:
Your DHCP config and the TTL (time to live) for leased lines.

Easy check:
Cron a drop of the ISP line, then re-connect.
Asterisk is reregistering lost peers automatically.

thanks, I will give the CLI ‘reload’ a try next time it happens.

unfortunately (or fortunately?), unlike my home DSL provider, my office cable provider doesn’t always give me a new IP when I disconnect and initiate a new DHCP lease.

again, thanks a lot.

I would highly suggest upgrading the A@H 1.2.1…Even if you just manually update the drivers. There are quite a few IAX related issues fixed since then.