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.

 
 
With best regards

Florian Floimair
Innovation - Software-Development

COMMEND INTERNATIONAL GMBH
A-5020 Salzburg, Saalachstraße 51
Tel: +43-662-85 62 25 568
Fax: +43-662-85 62 26
http://www.commend.com

Security and Communication by Commend

FN 178618z | LG Salzburg

Mit freundlichen Grüßen

Florian Floimair (IMS) 1568
 

-----Ursprüngliche Nachricht-----
Von: [email protected] 
[mailto:[email protected]] Im Auftrag von Joshua Colp
Gesendet: Donnerstag, 22. März 2018 11:26
An: [email protected]
Betreff: Re: [asterisk-dev] Dual contact entries in "pjsip show contacts"

On Thu, Mar 22, 2018, at 7:22 AM, Floimair Florian wrote:
> Hi!
> 
> I am currently using an Asterisk setup with a realtime-db  as backend.
> We create endpoints/aors/auths using ARI Push configuration and when 
> that happens we see 2 contact entries when executing "pjsip show 
> contacts" in the CLI.
> This also sporadically leads to calls being refused by Asterisk even 
> though the called endpoint registered successfully and is idle.

If you are referring to inbound calls from the endpoint then that would be 
unrelated to your Contact issue. Inbound registration isn't consulted or used 
for incoming calls. Are you actually referring to outgoing calls to the 
endpoint? As well - is there anything different between the contacts?

> 
> 
> 
> As soon as I restart Asterisk the dual entries are gone and everything 
> is working normal.
> 
> This leads me to believe, that this must be a bug in Asterisk for the 
> "Push Configuration + Realtime-DB" scenario.
> Can you give me any hints on what to check and where to look at in the 
> code to verify this situation?
> I am willing to fix it myself but would need a little guidance.

I don't know if anyone has tested the use of ARI push configuration with a 
database backed realtime, albeit there is nothing to say it shouldn't work. 
What do you see in the actual database?

--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: 
https://linkprotect.cudasvc.com/url?a=https://www.digium.com&c=E,1,dzjUo58Yho9K_rDTimX-0B0-o3j_oXxpFn8XrJ7FyQjm_4h8S2NBc3MqEfejVuE4jkXD1dO8mw1ERXpTjFqoyhjjcudyL-VBZxEuLBFz&typo=1
 & www.asterisk.org

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by 
https://linkprotect.cudasvc.com/url?a=http://www.api-digital.com&c=E,1,WtUXkSGP2RZye0KxXcnNqVby0Ag4kQt-ViaPAS04-4-6sPNDZVcd3apxrZssiqYR38Gydx_UiSt-Ik7dGDZAPg91_X2k2NZrUt9PUs4lmGm7GJRYCz4wrg,,&typo=1
 --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   
https://linkprotect.cudasvc.com/url?a=http://lists.digium.com/mailman/listinfo/asterisk-dev&c=E,1,eq9sNoan0yTYMIoQTN38sNMi_lRNfPy4k7zm5VugGnM2QuPBz_Ed9YWLxcDB2dI-cSlHLKWw_v1gi_dBaVmSiQuMTZO36CoVjqeUQHrUk0wM-SD5zokUjNDt2nFm&typo=1

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

Reply via email to