[asterisk-dev] Dual contact entries in "pjsip show contacts"

Joshua Colp jcolp at digium.com
Thu Mar 22 06:50:19 CDT 2018


On Thu, Mar 22, 2018, at 8:43 AM, Floimair Florian wrote:
> Thanks Joshua for your quick answer.
> 
> I am indeed referring to outgoing calls.
> 
> The contacts are created as a result of an inbound registration.
> Before the first registration I only have dual entries for the 
> endpoints.
> After the first registration I see the 2 contacts, which are in fact 
> identical.
> The database itself only contains a single entry for all entities, which 
> would explain why it
> works after a restart.
> 
> The workflow is as follows.
> 
> 1 - Create endpoint/auth/aor for Alice using ARI push configuration
> 2 - Create endpoint/auth/aor for Bob using ARI push configuration
>    I see two entries for each of them when issuing "pjsip show endpoints"
> 
> 3 - A registers and a contact is created
>   2 (identical) contacts are shown as "Available", since there are also 
> two endpoints shown
> 
> 4 - B registers and a contact is created
>   2 (identical) contacts are shown as "Available", since there are also 
> two endpoints shown
> 
> 5 - Alice tries to call Bob
>  Asterisk refuses with
>     res_pjsip.c: Endpoint 'Bob': Could not create dialog to invalid URI 
> 'Bob'.  Is endpoint registered and reachable?
>     chan_pjsip.c: Failed to create outgoing session to endpoint 'Bob'
>     app_dial.c: Unable to create channel of type 'PJSIP' (cause 3 - No 
> route to destination)
>     app_dial.c: Everyone is busy/congested at this time (1:0/0/1)
>     pbx.c: Auto fallthrough, channel 'PJSIP/Bob-00000814' status is 
> 'CHANUNAVAIL'
>  
> I have seen this already more than a year ago with 13.x and 14.x as well 
> (currently I'm using the latest 15.3.0).
> I was not able to reproduce it since as everything works flawlessly 
> after a restart.
> It was only now that I realized that the issue is related to creating 
> the endpoint/auth/aor objects on a running system with no restarts 
> since.

It sounds almost as if there are two backends for the objects, one in memory and one database... but your configuration certainly doesn't show that. Have you bumped up core debug (debug to console in logger.conf and core set debug 9) and looked to see if anything stands out?

There is no cache or memory mechanism built into sorcery that is always there, so I'm not sure where it'd have two objects stored or where to look. The "pjsip show endpoints" command just asks the sorcery backends to return the data they have, for example.

-- 
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



More information about the asterisk-dev mailing list