chan_sip.c: Retransmission timeout reached on transmission

The context

Why and how I use VOIP in my home …

A few months ago, as a technology enthusiast and having some geek time to spend, I switched my freePBX installation from my VirtualBox installation to a Raspberry Pi.

Compaq EVO N610c

Previously, my VOIP system was running on an old COMPAQ Evo N610 laptop thanks to TrixBOX CE. It performed quite nicely and I ran that system for more than a year. A little bit later, TrixBOX CE became outdated and renamed into Fonality. The laptop was starting to get really old and I felt my “IT room” was too cluttered.

I decided it was time for a change and so I switched the software and the hardware. I chose FreePBX to replace TrixBOX because the interface and options seemed to be pretty standard. It has no company branding or customization. And for the hardware, I decided I’d go virtual with VirtualBox. I believe that was a wise decision.

The transition was pretty smooth and straightforward, even if I first tried to export settings from TrixBOX to import them directly into FreePBX. ** Spoiler alert : It does not work.

I use this VOIP system at home and therefore, I do not have a lot of extensions to configure (currently,  6 phones) and most settings are working “out of the box” and no additional configuration is required. I use this system as “babyphone” too…

Yes… I have a Cisco 7940 configured as interphone, picking up automatically, and allowing me to monitor my child’s sleep.

Photo 18-01-12 00 11 27

Everything was fine, except I wanted more reliability but mostly, I wanted to be able to “play” with the Linux (Ubuntu) machine behind the FreePBX VirtualBox virtual machine. I wanted to be able to run updates and upgrades and also tweak and tinker with it but since it was running in “production”, I could not afford to interrupt a family conversation between my lovely wife and mother-in-law. I also did not want to make us “unreachable”.

To counter that, I decided it was time to turn “physical” again but without the clutter! Thanks to the Raspberry Pi and RasPBX my VOIP system has been stable for approximately a year and I must admit it really works well.

The only issue I had was that there were no codecs available for G729 but this can be solved by enabling G729 directly on the phones so the Pi does not need to transcode anything (codec passthrough). Natively, RasPBX can not transcode G729 and some say the Pi does not have the computing power. However, if you Google hard enough, you can find ARM G729 codecs working properly.

The issue

Why I made this post and how I solved it.

So you just read I used one of my phones as babyphone. That means that this communication is mostly silent (if baby sleeps well). By default, with Asterisk, the SIP protocol is configured in such a way that if the conversation is silent for 30″, the communication ends. Luckily, this setting can be changed and after setting a timeout of 12 hours, I decided that I would go and disable this “auto hang up feature”.

To disable this, you have to choose “No” as the “Reinvite Behaviour” setting in the Media & RTP Settings (SIP General Settings).

And then, with no apparent reason, I triggered an issue regarding my VoipBuster SIP trunk.

Whenever I tried to call through that trunk, the call failed and I could read the following in the /var/log/asterisk/full log file :

WARNING[3012] chan_sip.c: Retransmission timeout reached on transmission 76bf8481473a475772d5000e181532de@192.168.1.1:5060 for seqno 103 (Critical Request) 
-- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions

After investigation, it appears this issue had come up because of the SIP RTP modification I made :

In the SIP General settings, I had to revert the value back to “nonat“.

rtp_settings

And this time, instead of hanging up after 12 hours of silent conversation, I extended it to 24 hours.

All systems go!