I just installed 1.8.1 and noticed as soon as i do any kind of reload(sip reload or core reload) loses peers. I was before using 1.4.37 with same set up and was not having any issue. If i restart asterisk than all work fine. Even after sip reload or core reload if i restart asterisk all sip peers start working.
I read following fix in 1.8.2-RC.2 tried 1.8.2rc but having same issue.
2010-10-15 20:12 +0000 [r291942] David Vossel dvossel@digium.com
* channels/chan_sip.c: Fixes peer’s host port information being
lost on sip reload.
I am not positive about UDP, but i am 100% sure about TCP/TLS peers. The patch(from thread you pointed to) should be included in 1.8.2-RC.2, but i faced same problem with that too.
Here are my finding for Asterisk 1.8.x. It is only losing TLS peers. If i i make any changes in sip.conf and reload sip it will lose TLS peers. If i do not make any change in SIP.conf and reload sip, it is not losing any peer. UDP peer works fine under all conditions.
i read the notes from issues.asterisk.org/view.php?id=18366 and made following changes in chan_sip.c. You can find chan_sip.c in your asterisk source directory under channels.
Original code
if (!peer->rt_fromcontact && (peer->socket.type & SIP_TRANSPORT_UDP))
New code
if (!peer->rt_fromcontact && (SIP_TRANSPORT_UDP))
and i am running fine from last 1 hours. I have almost 600(400 TLS and 200 UDP) peers in this server. Did sip reload many times. If i find any bug i will update. Also i noticed big changed in CPU consumption. Without this asterisk was almost @ 40-50% of CPU consumption and now asterisk is @ 10-20% of CPU usage. I have tried Asterisk 1.6.2.X also with TLS but all crashing. If i run good i will update tomorrow.