[asterisk-dev] Asterisk Unregister/Register Causes Phone to become Unreachable

Ross Beer ross.beer at outlook.com
Fri Oct 2 08:11:37 CDT 2015


Please see replies in-line:

> To: asterisk-dev at lists.digium.com
> From: jcolp at digium.com
> Date: Fri, 2 Oct 2015 09:49:27 -0300
> Subject: Re: [asterisk-dev] Asterisk Unregister/Register Causes Phone to become Unreachable
> 
> On 15-10-02 09:42 AM, Ross Beer wrote:
> > Hi,
> >
> > I am currently experiencing issues using Asterisk 13 and sorcery
> > real-time, when using a shared database.
> >
> > The first issue is that when restarting asterisk, each endpoint in the
> > database is run though and the following output is shown on the CLI:
> >
> >     Endpoint XXXXXXXXXXX is now Unreachable
> >     Endpoint XXXXXXXXXXX is now Unreachable
> >     Endpoint XXXXXXXXXXX is now Unreachable
> >
> >
> > This causes any endpoints 'contacts' which are registered on an
> > alternate instance to be removed from the database, causing them to
> > become unreachable.
> >
> > Asterisk also periodically expires contacts which are not registered to
> > it's self, be this with or without the the new cache enabled.
> >
> > Due to the above it is not possible to have a central real-time database.
> >
> > Is it possible to stop asterisk expiring contacts that it isn't
> > tracking, i.e. devices that haven't registered?
> 
> The PJSIP modules will prune expired contacts in two cases:
> 1. When being asked to retrieve contacts for something
> 2. If the res_pjsip_registrar_expire module is loaded then contacts will 
> be pruned in real time (it will grab all contacts at load, and as stuff 
> registers to the Asterisk instance it will become aware of them)
> 
I've disabled the res_pjsip_registrar_expire module and asterisk still loops though all of the endpoints showing: Endpoint XXXXXXXXXXX is now Unreachable
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.
 It does appear to have stopped further de-registrations between peers, which is great news.
> >
> > Is it also possible to only cache devices that register to a server
> > instead of accessing all endpoints on reload?
> 
> I don't understand what you mean by cache.
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!!
Would it be possible to filter endpoints based on the above criteria at start-up?
> 
> >
> > Ideally we would like to store a 'regserv' value, as with the previous
> > chan_sip driver.
> 
> This does not currently exist in the PJSIP functionality.
I'm happy to develop this feature, its just another column in the 'contact' table and setting the value to the host name.
I'm happy for another instance to remove the contact, if a device registers to it.
> 
> -- 
> Joshua Colp
> Digium, Inc. | Senior Software Developer
> 445 Jan Davis Drive NW - Huntsville, AL 35806 - US
> Check us out at: www.digium.com & www.asterisk.org
> 
> -- 
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> 
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20151002/1dd5c0fc/attachment.html>


More information about the asterisk-dev mailing list