Asterisk 1.8.1 Loses Peers After reload

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.

Please advice.

I’m guessing those peers are using UDP, and not TCP, correct?

Thanks for reply.

Peers with TCP/TLS also goes done after reload.

We are currently tracking this:
issues.asterisk.org/view.php?id=18366

Do you see the problem only with TCP/TLS peers?
Or, do you see the problem only with UDP peers?
Or, do you see the problem with both types?

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.

There is only 1.8.2.-rc1 right now. We hope to get the issue resolved soon, because it is of large consequence.

Yes, you are right it is 1.8.2.-rc1.

What is the stable version of asterisk to run with TLS? I am having issues with 1.6.15 and 1.6.14. Does 1.4 support TLS?

TLS support was only added to 1.6.0. The only version of 1.6.X that is currently supported it 1.6.2. The current version of Asterisk is 1.8.

A release overview is available here:

wiki.asterisk.org/wiki/display/ … k+Versions

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.

Yes, that is what we have seen as well.

I have also tried the patch but still same issue.

Get a user account on the issue tracker and post to the issue with that note. The author of the patch should see your feedback and results.

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.

Thank you for your feedback. :smile: