We have several Asterik boxes that are connected to PSTN using PRI cards and they are interconnected using IAX2 trunks so that incoming calls are delivered from PSTN to the servers they belong to.
In past we were using asterisk 1.4 on the server that is receiving IAX
connections and everything worked as expected. Recently, we have switched to a newer box with asterisk 1.8.22 and then we began to experience sometimes a strange problem:
At some point of time, incoming IAX connections begin to get refused by the server and we get the following messages in the logs:
WARNING[XXXX] chan_iax2.c: Too much delay in IAX2 calltoken timestamp from address X.X.X.X
where X.X.X.X is the IP of the PSTN->IAX gateways and all the incoming calls start to be rejected.
Direct PSTN calls (both incoming and outgoing) to the same server work OK. The only solution that helps is to kill the asterisk and restart it.
All the servers are connected to the same LAN segment, with gigabit switch, there is no problems with the network. No packet loss.
There’s already bug report present with very similar issue, but it is
“suspended” and, like stated there, the problem is very hard to reproduce.