Unable to apply object type 'identify' with id

Hi

I have a question regarding pjsip_wizard when a certain endpoint can’t be resolved.

I created a new endpoint in pjsip_wizard and I used a FQDN as host. When reloading pjsip, asterisk throws the following errors

    -- Reloading module 'res_pjsip.so' (Basic SIP resource)
[Mar  6 10:00:43] ERROR[660859]: netsock2.c:303 ast_sockaddr_resolve: getaddrinfo("sip.bla.com", "(null)", ...): Name or service not known
[Mar  6 10:00:43] ERROR[660859]: res_pjsip_endpoint_identifier_ip.c:654 ip_identify_apply: Identify 'test-identify' failed when adding resolution results of 'sip.bla.com'
[Mar  6 10:00:43] ERROR[660859]: res_pjsip_config_wizard.c:342 create_object: Unable to apply object type 'identify' with id 'test-identify'.  Check preceeding errors.
[Mar  6 10:00:43] ERROR[660859]: res_pjsip_config_wizard.c:1100 object_type_loaded_observer: Unable to create objects for wizard 'test'
[Mar  6 10:00:43] NOTICE[660859]: sorcery.c:1348 sorcery_object_load: Type 'system' is not reloadable, maintaining previous values
    -- Reloading module 'pbx_dundi.so' (Distributed Universal Number Discovery (DUNDi))
  == Using DUNDi TOS bits 184
  == Setting global variable 'GLOBAL_NUMBER_MATCH' to '+#*0-9a-zA-Z_'
  == Setting global variable 'TRANSFER_CONTEXT' to 'transfer-context'
    -- Contact test/sip:sip.bla.com:5060 is now Unreachable.  RTT: 0.000 msec

Even if pjsip_wizard could not create all required objects, it created the endpoint

 Endpoint:  test                                                 Unavailable   0 of inf
        Aor:  test                                               0
      Contact:  test/sip:sip.bla.com:5060                  ffee23acfc Unavail         nan
  Transport:  transport-udp             udp      0    184  0.0.0.0:5070

When the domain becomes reachable, it is updated accordingly, but the identify is still missing and thus, incoming calls may not work.

 Endpoint:  test                                                 Not in use    0 of inf
        Aor:  test                                               0
      Contact:  test/sip:sip.bla.com:5060                  ffee23acfc Avail         1.101
  Transport:  transport-udp             udp      0    184  0.0.0.0:5070

When I reload again, it generates the identify object and everything is fine

 Endpoint:  test                                                 Not in use    0 of inf
        Aor:  test                                               0
      Contact:  test/sip:sip.bla.com:5060                  ffee23acfc Avail         0.790
  Transport:  transport-udp             udp      0    184  0.0.0.0:5070
   Identify:  test-identify/test
        Match: 127.0.0.1/32

I’m using Asterisk 20.12.0 and this is the snipped of the endpoint

[global_options](!)
type = wizard
endpoint/allow = !all
endpoint/allow = alaw
endpoint/allow = ulaw
endpoint/allow = gsm
endpoint/allow = speex
endpoint/allow = g726

endpoint/dtmf_mode = rfc4733
endpoint/fax_detect = yes
endpoint/identify_by = auth_username,ip
endpoint/language = en
endpoint/t38_udptl = yes
endpoint/t38_udptl_maxdatagram = 400
endpoint/t38_udptl_ec = redundancy
endpoint/timers = yes
endpoint/timers_min_se = 600
endpoint/timers_sess_expires = 3600
endpoint/direct_media = no
endpoint/tos_audio = ef
aor/remove_existing = yes
aor/remove_unavailable = yes
endpoint/allow_transfer = yes

[charact_trunk_standard](!)
type = wizard
aor/qualify_timeout = 2
aor/qualify_frequency = 60


[test](global_options,charact_trunk_standard)
transport = transport-udp
endpoint/context = sip-trunk-incoming-from-test
remote_hosts = sip.bla.com:5060
identify/match = sip.bla.com

My question is, is there a way to somehow detect a situation where objects are missing? Somehow over AMI? Or even better, would it be possible to generate the failed identify object as soon as the DNS resolution worked?

Thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.