<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Please see replies in-line:<br><br><div>> To: asterisk-dev@lists.digium.com<br>> From: jcolp@digium.com<br>> Date: Fri, 2 Oct 2015 09:49:27 -0300<br>> Subject: Re: [asterisk-dev] Asterisk Unregister/Register Causes Phone to become Unreachable<br>> <br>> On 15-10-02 09:42 AM, Ross Beer wrote:<br>> > Hi,<br>> ><br>> > I am currently experiencing issues using Asterisk 13 and sorcery<br>> > real-time, when using a shared database.<br>> ><br>> > The first issue is that when restarting asterisk, each endpoint in the<br>> > database is run though and the following output is shown on the CLI:<br>> ><br>> >     Endpoint XXXXXXXXXXX is now Unreachable<br>> >     Endpoint XXXXXXXXXXX is now Unreachable<br>> >     Endpoint XXXXXXXXXXX is now Unreachable<br>> ><br>> ><br>> > This causes any endpoints 'contacts' which are registered on an<br>> > alternate instance to be removed from the database, causing them to<br>> > become unreachable.<br>> ><br>> > Asterisk also periodically expires contacts which are not registered to<br>> > it's self, be this with or without the the new cache enabled.<br>> ><br>> > Due to the above it is not possible to have a central real-time database.<br>> ><br>> > Is it possible to stop asterisk expiring contacts that it isn't<br>> > tracking, i.e. devices that haven't registered?<br>> <br>> The PJSIP modules will prune expired contacts in two cases:<br>> 1. When being asked to retrieve contacts for something<br>> 2. If the res_pjsip_registrar_expire module is loaded then contacts will <br>> be pruned in real time (it will grab all contacts at load, and as stuff <br>> registers to the Asterisk instance it will become aware of them)<br>> </div><div><br></div><div>I've disabled the <span style="font-size: 12pt;">res_pjsip_registrar_expire module and asterisk still loops though all of the endpoints showing: </span><span style="font-size: 12pt;">Endpoint XXXXXXXXXXX is now Unreachable</span></div><div><span style="font-size: 12pt;"><br></span></div><div><span style="font-size: 12pt;">Is there a way I can disable asterisk from doing this? It's not efficient to firstly loop though all of the endpoints and to remove the contacts from another instance.</span></div><div><span style="font-size: 12pt;"><br></span></div><div><span style="font-size: 12pt;"> It does appear to have stopped further de-registrations between peers, which is great news.</span></div><div><br>> ><br>> > Is it also possible to only cache devices that register to a server<br>> > instead of accessing all endpoints on reload?<br>> <br>> I don't understand what you mean by cache.</div><div><br></div><div>With the new cache it stores information when the devices are accessed. I think the way around caching at start-up would be to stop asterisk looping through all endpoints. I guess asterisk should only need to get peers that require 'qualify' or outbound registrations instead of retrieving all endpoints. This would make the start-up more efficient, at the moment it's taking Asterisk 13 around 2 mins to start!!</div><div><br></div><div>Would it be possible to filter endpoints based on the above criteria at start-up?</div><div><br></div><div>> <br>> ><br>> > Ideally we would like to store a 'regserv' value, as with the previous<br>> > chan_sip driver.<br>> <br>> This does not currently exist in the PJSIP functionality.</div><div><br></div><div>I'm happy to develop this feature, its just another column in the 'contact' table and setting the value to the host name.</div><div><br></div><div>I'm happy for another instance to remove the contact, if a device registers to it.</div><div><br>> <br>> -- <br>> Joshua Colp<br>> Digium, Inc. | Senior Software Developer<br>> 445 Jan Davis Drive NW - Huntsville, AL 35806 - US<br>> Check us out at: www.digium.com & www.asterisk.org<br>> <br>> -- <br>> _____________________________________________________________________<br>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --<br>> <br>> asterisk-dev mailing list<br>> To UNSUBSCRIBE or update options visit:<br>>    http://lists.digium.com/mailman/listinfo/asterisk-dev<br></div>                                       </div></body>
</html>