I have this problem
An IAX registration (register => user:pwd@somehost.it) to a Asterisk at some provider, from my Asterisk. All is working fine, but after some time, e.g. a day or so, the registration is lost, and then Asterisk is not able to registar any more, I can see with the “iax2 debug” on, that my Asterisk is sending REGREQ with username and so. But there is no response, as if the register request never arrives to the provider. If I register with a softphone IAX (firefly) then all is well. The only way to resolve this is to stop Asterisk and restart, and sometimes it is not enough, even that.
I’ve seen others with this problem, but I have seen no one who has resolved it. Is this a bug? Then it is very serious bug, because it is very difficult for me to stop Asterisk since I have about 100 people using it in work, 24 hours a day.
We are using asterisk@home 1.5
Tim Mickelson
I had a similar problem - but with SIP registrations. The reason why it was happening was that network lag was getting too long (the registrations were with SIP providers on the other side of the world) and registration attempts were timing out.
I implemented a temporary workaround with a cron script that connects to Asterisk every hour, checks SIP registrations, and restarts Asterisk if any come up as “failed”. This isn’t very satisfactory, obviously, and probably not an option for you.
Anyway, the solution was to edit channels/chan_sip.c in the Asterisk sources and change the timeout and the count of times it times out before giving up. I doubled both figures. Then, of course, you have to recompile.
For you, the timeouts will be in channels/chan_iax2.c . You’ll need to have a look at that file and see what’s what. It may or may not work for you, though - depending on what the exact cause of your problem is.
You should check out your network connection to your ITSP and monitor the ping times - particularly when the timeouts are happening. It may be a problem at your ITSP, rather than a network problem in between. If the network connection between you and your ITSP is to blame, you should look at changing it somehow, because if it’s getting that laggy then sound quality will be suffering.
In v1.2 some of these timeouts are configurable in the config files.