[Home]

Summary:ASTERISK-28786: Duplicated Endpoints, AORS, Auths user ARI sorcery
Reporter:Sebastian Gutierrez (sum)Labels:webrtc
Date Opened:2020-03-20 07:37:33Date Closed:2020-04-14 12:00:01
Priority:MinorRegression?
Status:Closed/CompleteComponents:pjproject/pjsip
Versions:16.9.0 17.3.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Ubuntu 18.04 (pjsip and libjanson bundled)Attachments:
Description:Using ARI Rest interface to create AORs Auths and Enpoints

{noformat}
Endpoint:  <Endpoint/CID.....................................>  <State.....>  <Channels.>
   I/OAuth:  <AuthId/UserName...........................................................>
       Aor:  <Aor............................................>  <MaxContact>
     Contact:  <Aor/ContactUri..........................> <Hash....> <Status> <RTT(ms)..>
 Transport:  <TransportId........>  <Type>  <cos>  <tos>  <BindAddress..................>
  Identify:  <Identify/Endpoint.........................................................>
       Match:  <criteria.........................>
   Channel:  <ChannelId......................................>  <State.....>  <Time.....>
       Exten: <DialedExten...........>  CLCID: <ConnectedLineCID.......>
==========================================================================================
Endpoint:  1001/unknown                                         Unavailable   0 of inf
    InAuth:  1001/1001
       Aor:  1001                                               1
 Transport:  transport-wss             wss      0      0  0.0.0.0:5060
Endpoint:  1001                                                 Unavailable   0 of inf
    InAuth:  1001/1001
       Aor:  1001                                               1
 Transport:  transport-wss             wss      0      0  0.0.0.0:5060
Endpoint:  1002/unknown                                         Unavailable   0 of inf
    InAuth:  1002/1002
       Aor:  1002                                               1
 Transport:  transport-wss             wss      0      0  0.0.0.0:5060
Endpoint:  1002                                                 Unavailable   0 of inf
    InAuth:  1002/1002
       Aor:  1002                                               1
 Transport:  transport-wss             wss      0      0  0.0.0.0:5060

 I/OAuth:  <AuthId/UserName.............................................................>
==========================================================================================
    Auth:  1001/1001
    Auth:  1001/1001
    Auth:  1002/1002
    Auth:  1002/1002
Objects found: 4

     Aor:  <Aor..............................................>  <MaxContact>
   Contact:  <Aor/ContactUri............................> <Hash....> <Status> <RTT(ms)..>
==========================================================================================
     Aor:  1001                                                 1
     Aor:  1001                                                 1
     Aor:  1002                                                 1
     Aor:  1002                                                 1
Objects found: 4
{noformat}


res_sorcery.conf

{noformat}
[res_pjsip]
endpoint=astdb,ps_endpoints
auth=astdb,ps_auths
aor=astdb,ps_aors
{noformat}



WebServices:

{noformat}
curl -k -X PUT -H "Content-Type: application/json" -u user:pass  -d '{"fields": [ { "attribute": "auth_type", "value": "userpass"}, {"attribute": "username", "value": "1001"}, {"attribute": "password", "value": "test" } ] }' https://localhost/ari/asterisk/config/dynamic/res_pjsip/auth/1001
{noformat}

{noformat}
curl -k -X PUT -H "Content-Type: application/json" -u user:pass -d '{"fields": [ {"attribute": "remove_existing", "value": "yes"}, {"attribute": "max_contacts", "value": "1"} ] }' https://localhost/ari/asterisk/config/dynamic/res_pjsip/aor/1001
{noformat}

{noformat}
curl -k -X PUT -H "Content-Type: application/json" -u user:pass -d '{"fields": [ { "attribute": "allow", "value": "!all,opus,vp9"}, { "attribute": "transport", "value": "transport-wss"}, {"attribute": "context", "value": "customers" },{"attribute": "message_context", "value": "messages" },{"attribute": "dtls_auto_generate_cert", "value": "yes" }, {"attribute": "webrtc", "value": "yes" }, {"attribute": "auth", "value": "1001" }, {"attribute": "aors", "value": "1001"} ] }' https://localhost/ari/asterisk/config/dynamic/res_pjsip/endpoint/1001
{noformat}
Comments:By: Asterisk Team (asteriskteam) 2020-03-20 07:37:34.428-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

By: Benjamin Keith Ford (bford) 2020-03-24 11:32:20.694-0500

I was unable to get the duplicate entries while testing this. Some things that would be helpful:
# Does anything change between using {{http}} and {{https}}?
# Is there a difference in behavior when using realtime as opposed to static config files?

By: Sebastian Gutierrez (sum) 2020-03-24 12:06:16.390-0500

I will have to create the environment again and let you know,  only tested https, res_sorcery is configured for astdb, if I restart asterisk the information is ok, in the astdb the information is ok too.

By: Asterisk Team (asteriskteam) 2020-04-14 12:00:00.888-0500

Suspended due to lack of activity. This issue will be automatically re-opened if the reporter posts a comment. If you are not the reporter and would like this re-opened please create a new issue instead. If the new issue is related to this one a link will be created during the triage process. Further information on issue tracker usage can be found in the Asterisk Issue Guidlines [1].

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines