Couldn’t Find Auth ‘provider’

Home » Asterisk Users » Couldn’t Find Auth ‘provider’
Asterisk Users 3 Comments

Hello,

I am observing error:
res_pjsip/pjsip_configuration.c:2368 ast_sip_retrieve_auths: Couldn’t find auth ‘provider’. Cannot authenticate. res_pjsip_outbound_authenticator_digest.c:144
digest_create_request_with_auth: Endpoint: ‘provider’: Failed to set authentication credentials

I use config below. It reports the auth section is missing, but it is apparently here.

What am I doing wrong?

Thanks

Marek

; ===============================================
[global]
type = global debug = no

[transport-udp]
type = transport protocol = udp bind = 0.0.0.0
external_media_address = x.x.x.x external_signaling_address = x.x.x.x local_net 2.168.1.0/255.255.255.0

[provider]
type = registration transport = transport-udp outbound_auth = provider server_uri = sip:… client_uri = sip:… contact_user = username retry_interval = 20
forbidden_retry_interval = 600
expiration = 120
;max_retries = 10

[provider]
type = auth auth_type = userpass username = username password = password

[provider]
type = endpoint context = provider-in dtmf_mode = rfc4733
;direct_media = no from_domain = provider.domain force_rport = yes rewrite_contact = yes rtp_symmetric = yes allow_subscribe = no outbound_auth = provider aors = provider disallow = all allow = alaw allow = ilbc allow = g729
allow = gsm allow = g723

[provider]
type = aor contact = sip:… qualify_frequency = 15

[provider]
type = identify endpoint = provider match = …

3 thoughts on - Couldn’t Find Auth ‘provider’

  • What does “pjsip show auths” in the CLI show? When PJSIP loads does it state an error with the configuration or any configuration? What is the contents of sorcery.conf (is it trying to pull auths from elsewhere)?

  • Hello,

    pjsip show auths shows only phone accounts. nothing about provider. But strange registration works and it uses the same auth section.

    The sorcery.conf file contains:
    [test_sorcery_section]
    test=memory

    [test_sorcery_cache]
    test/cache=test test=memory

    I can see no relevant errors in /var/log/asterisk/messages file. Only some unrelated stuff:
    [Oct 19 19:55:18] Asterisk 18.2.0 built by mockbuild @
    buildhw-x86-04.iad2.fedoraproject.org on a x86_64 running Linux on
    2021-02-08 08:28:42 UTC
    [Oct 19 19:55:18] NOTICE[4385] loader.c: 300 modules will be loaded.
    [Oct 19 19:55:18] NOTICE[4385] cdr.c: CDR simple logging enabled.
    [Oct 19 19:55:18] WARNING[4385] res_musiconhold.c: No music on hold classes configured, disabling music on hold.
    [Oct 19 19:55:18] WARNING[4385] res_phoneprov.c: Unable to find a valid server address or name.
    [Oct 19 19:55:20] NOTICE[4385] res_smdi.c: No SMDI interfaces are available to listen on, not starting SMDI listener.
    [Oct 19 19:55:20] ERROR[4385] ari/config.c: No configured users for ARI
    [Oct 19 19:55:20] NOTICE[4385] confbridge/conf_config_parser.c: Adding default_menu menu to app_confbridge
    [Oct 19 19:55:20] NOTICE[4385] cel_custom.c: No mappings found in cel_custom.conf. Not logging CEL to custom CSVs.
    [Oct 19 19:55:20] WARNING[4385] loader.c: Some non-required modules failed to load.
    [Oct 19 19:55:20] ERROR[4385] loader.c: Failed to resolve dependencies for res_stir_shaken
    [Oct 19 19:55:20] ERROR[4385] loader.c: res_stir_shaken declined to load.
    [Oct 19 19:55:20] ERROR[4385] loader.c: Failed to resolve dependencies for res_pjsip_stir_shaken
    [Oct 19 19:55:20] ERROR[4385] loader.c: res_pjsip_stir_shaken declined to load.

    Thanks

    Marek

    ut 19. 10. 2021 o 20:22 Joshua C. Colp napísal(a):

  • Hello,

    I rewritten the auth section once more manually and disabled the stir shaken modules and now it works. I do not expect stir shaken modules could cause such issues so there should have been some unseen white characters in the configuration of auth section or something like that. Strange the section worked for registration.

    Thanks for you effort.

    Marek

    ut 19. 10. 2021 o 20:22 Joshua C. Colp napísal(a):