Asterisk dont qualify peer with path in PJSIP

Hi there!

I’m setup a Asterisk 16.1.1 (endpoints are in realtime), with path support on PJSIP stack.

The problem is my Asterisk is not sending OPTIONS to peers to qualify them.

My config:

XXXXXX*CLI> core show settings

PBX Core settings
-----------------
  Version:                     16.1.1
  Build Options:               BUILD_NATIVE, OPTIONAL_API
  Maximum calls:               Not set
  Maximum open file handles:   1024
  Root console verbosity:      0
  Current console verbosity:   2147483647
  Debug level:                 0
  Maximum load average:        0.000000
  Minimum free memory:         0 MB
  Startup time:                11:52:14
  Last reload time:            11:52:14
  System:                      Linux/4.15.18-10-pve built by root on x86_64 2019-01-25 14:40:43 UTC
  System name:                 
  Entity ID:                   XX:XX:XX:XX:XX:XX
  PBX UUID:                    4ac6179d-5869-4f0f-bf12-5c6ca592394b
  Default language:            en
  Language prefix:             Enabled
  User name and group:         /
  Executable includes:         Disabled
  Transcode via SLIN:          Enabled
  Transmit silence during rec: Disabled
  Generic PLC:                 Enabled
  Generic PLC on equal codecs: Disabled
  Min DTMF duration::          80
  Cache media frames:          Enabled
  RTP use dynamic payloads:    1
  RTP dynamic payload types:   35-63,96-127

* Subsystems
  -------------
  Manager (AMI):               Disabled
  Web Manager (AMI/HTTP):      Disabled
  Call data records:           Enabled
  Realtime Architecture (ARA): Enabled

* Directories
  -------------
  Configuration file:          /etc/asterisk/asterisk.conf
  Configuration directory:     /etc/asterisk
  Module directory:            /usr/lib/asterisk/modules
  Spool directory:             /var/spool/asterisk
  Log directory:               /var/log/asterisk
  Run/Sockets directory:       /var/run/asterisk
  PID file:                    /var/run/asterisk/asterisk.pid
  VarLib directory:            /var/lib/asterisk
  Data directory:              /var/lib/asterisk
  ASTDB:                       /var/lib/asterisk/astdb
  IAX2 Keys directory:         /var/lib/asterisk/keys
  AGI Scripts directory:       /var/lib/asterisk/agi-bin
XXXXXX*CLI> pjsip show settings

Global Settings:

 ParameterName                       : ParameterValue
 ===============================================================
 contact_expiration_check_interval   : 30
 debug                               : yes
 default_from_user                   : asterisk
 default_outbound_endpoint           : default_outbound_endpoint
 default_realm                       : asterisk
 default_voicemail_extension         : 
 disable_multi_domain                : false
 endpoint_identifier_order           : contact,username
 ignore_uri_user_options             : false
 keep_alive_interval                 : 90
 max_forwards                        : 70
 max_initial_qualify_time            : 0
 mwi_disable_initial_unsolicited     : false
 mwi_tps_queue_high                  : 500
 mwi_tps_queue_low                   : -1
 regcontext                          : 
 unidentified_request_count          : 5
 unidentified_request_period         : 5
 unidentified_request_prune_interval : 30
 use_callerid_contact                : no
 user_agent                          : XXXXXX XXXXXX

System Settings:

 ParameterName               : ParameterValue
 ============================================
 accept_multiple_sdp_answers : false
 compact_headers             : false
 disable_tcp_switch          : true
 follow_early_media_fork     : true
 threadpool_auto_increment   : 5
 threadpool_idle_timeout     : 60
 threadpool_initial_size     : 0
 threadpool_max_size         : 50
 timer_b                     : 32000
 timer_t1                    : 500
XXXXXX*CLI> pjsip show endpoint 100

 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:  100                                                  Unavailable   0 of inf
     InAuth:  100/100
        Aor:  100                                                2
      Contact:  100/sip:9f9t2n2t@j1gbjpsefa2e.invalid;tran 5e7d0d5a90 Unavail         nan
  Transport:  transport-udp             udp      0      0  0.0.0.0:5060


 ParameterName                      : ParameterValue
 ==========================================================
 100rel                             : yes
 accept_multiple_sdp_answers        : false
 accountcode                        : 10000
 acl                                : 
 aggregate_mwi                      : true
 allow                              : (opus|alaw|ulaw|g722)
 allow_overlap                      : true
 allow_subscribe                    : true
 allow_transfer                     : true
 aors                               : 100
 asymmetric_rtp_codec               : false
 auth                               : 100
 bind_rtp_to_media_address          : false
 bundle                             : false
 call_group                         : 
 callerid                           : <unknown>
 callerid_privacy                   : allowed_not_screened
 callerid_tag                       : 
 connected_line_method              : invite
 contact_acl                        : 
 context                            : internal
 cos_audio                          : 0
 cos_video                          : 0
 device_state_busy_at               : 0
 direct_media                       : false
 direct_media_glare_mitigation      : none
 direct_media_method                : invite
 disable_direct_media_on_nat        : false
 dtls_auto_generate_cert            : No
 dtls_ca_file                       : 
 dtls_ca_path                       : 
 dtls_cert_file                     : 
 dtls_cipher                        : 
 dtls_fingerprint                   : SHA-256
 dtls_private_key                   : 
 dtls_rekey                         : 0
 dtls_setup                         : active
 dtls_verify                        : No
 dtmf_mode                          : rfc4733
 fax_detect                         : false
 fax_detect_timeout                 : 0
 follow_early_media_fork            : true
 force_avp                          : false
 force_rport                        : true
 from_domain                        : XXXXXX.XXXXXX.XXX
 from_user                          : 100
 g726_non_standard                  : false
 ice_support                        : false
 identify_by                        : username,ip
 inband_progress                    : false
 incoming_mwi_mailbox               : 
 language                           : 
 mailboxes                          : 
 max_audio_streams                  : 1
 max_video_streams                  : 1
 media_address                      : 
 media_encryption                   : no
 media_encryption_optimistic        : false
 media_use_received_transport       : false
 message_context                    : 
 moh_passthrough                    : false
 moh_suggest                        : default
 mwi_from_user                      : 
 mwi_subscribe_replaces_unsolicited : no
 named_call_group                   : 
 named_pickup_group                 : 
 notify_early_inuse_ringing         : false
 one_touch_recording                : false
 outbound_auth                      : 
 outbound_proxy                     : 
 pickup_group                       : 
 preferred_codec_only               : false
 record_off_feature                 : automixmon
 record_on_feature                  : automixmon
 refer_blind_progress               : true
 rewrite_contact                    : false
 rpid_immediate                     : false
 rtcp_mux                           : false
 rtp_engine                         : asterisk
 rtp_ipv6                           : false
 rtp_keepalive                      : 0
 rtp_symmetric                      : false
 rtp_timeout                        : 0
 rtp_timeout_hold                   : 0
 sdp_owner                          : -
 sdp_session                        : Asterisk
 send_connected_line                : yes
 send_diversion                     : true
 send_pai                           : false
 send_rpid                          : false
 set_var                            : 
 srtp_tag_32                        : false
 sub_min_expiry                     : 0
 subscribe_context                  : 
 suppress_q850_reason_headers       : false
 t38_udptl                          : false
 t38_udptl_ec                       : none
 t38_udptl_ipv6                     : false
 t38_udptl_maxdatagram              : 0
 t38_udptl_nat                      : false
 timers                             : yes
 timers_min_se                      : 90
 timers_sess_expires                : 1800
 tone_zone                          : 
 tos_audio                          : 0
 tos_video                          : 0
 transport                          : transport-udp
 trust_connected_line               : yes
 trust_id_inbound                   : false
 trust_id_outbound                  : false
 use_avpf                           : false
 use_ptime                          : false
 user_eq_phone                      : false
 voicemail_extension                : 
 webrtc                             : no
XXXXXX*CLI> pjsip show aor 100

      Aor:  <Aor..............................................>  <MaxContact>
    Contact:  <Aor/ContactUri............................> <Hash....> <Status> <RTT(ms)..>
==========================================================================================

      Aor:  100                                                  2
    Contact:  100/sip:9f9t2n2t@j1gbjpsefa2e.invalid;transp 5e7d0d5a90 Unavail         nan


 ParameterName        : ParameterValue
 =================================================================================================
 authenticate_qualify : false
 contact              : sip:9f9t2n2t@j1gbjpsefa2e.invalid;transport=ws;alias=XXX.XXX.XXX.XXX~49492~6
 default_expiration   : 300
 mailboxes            : 
 max_contacts         : 2
 maximum_expiration   : 3600
 minimum_expiration   : 60
 outbound_proxy       : 
 qualify_frequency    : 60
 qualify_timeout      : 3.000000
 remove_existing      : true
 support_path         : true
 voicemail_extension  :

Hi, how do you test it to confirm that qualify OPTIONS is not sending signal?

Your endpoint “100” is disconnected…

What does the row in the database look like for the contact? What does the SIP signaling look like for the registration?

XXXXXX*CLI> 
[Feb 14 12:21:21] <--- Received SIP request (816 bytes) from UDP:BBB.BBB.BBB.BBB:5060 --->
[Feb 14 12:21:21] REGISTER sip:XXXXXX.XXXXXX.XXX SIP/2.0
[Feb 14 12:21:21] Via: SIP/2.0/UDP BBB.BBB.BBB.BBB;branch=z9hG4bKd89c.a6d0b20744fd9fabaa372cdad78783ab.0
[Feb 14 12:21:21] Via: SIP/2.0/WSS tr5g2hi9euh8.invalid;rport=49534;received=BBB.BBB.BBB.BBB;branch=z9hG4bK9814363
[Feb 14 12:21:21] Max-Forwards: 68
[Feb 14 12:21:21] To: <sip:100@XXXXXX.XXXXXX.XXX>
[Feb 14 12:21:21] From: <sip:100@XXXXXX.XXXXXX.XXX>;tag=g5t215i2p0
[Feb 14 12:21:21] Call-ID: lhtrn28srqrfi41ftiu63m
[Feb 14 12:21:21] CSeq: 1 REGISTER
[Feb 14 12:21:21] Contact: <sip:1dmt1qi6@tr5g2hi9euh8.invalid;transport=ws;alias=BBB.BBB.BBB.BBB~49534~6>;+sip.ice;reg-id=1;+sip.instance="<urn:uuid:ea02dadb-9b30-447e-a782-2bffdd048bd7>";expires=600
[Feb 14 12:21:21] Expires: 600
[Feb 14 12:21:21] Allow: INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO
[Feb 14 12:21:21] Supported: path,gruu,outbound
[Feb 14 12:21:21] User-Agent: JsSIP 3.3.4
[Feb 14 12:21:21] Content-Length: 0
[Feb 14 12:21:21] Path: <sip:BBB.BBB.BBB.BBB;lr;received=sip:BBB.BBB.BBB.BBB:49534%3Btransport%3Dws>
[Feb 14 12:21:21] Supported: path
[Feb 14 12:21:21] 
[Feb 14 12:21:21] 
[Feb 14 12:21:21] <--- Transmitting SIP response (640 bytes) to UDP:BBB.BBB.BBB.BBB:5060 --->
[Feb 14 12:21:21] SIP/2.0 401 Unauthorized
[Feb 14 12:21:21] Via: SIP/2.0/UDP BBB.BBB.BBB.BBB;rport=5060;received=BBB.BBB.BBB.BBB;branch=z9hG4bKd89c.a6d0b20744fd9fabaa372cdad78783ab.0
[Feb 14 12:21:21] Via: SIP/2.0/WSS tr5g2hi9euh8.invalid;rport=49534;received=BBB.BBB.BBB.BBB;branch=z9hG4bK9814363
[Feb 14 12:21:21] Call-ID: lhtrn28srqrfi41ftiu63m
[Feb 14 12:21:21] From: <sip:100@XXXXXX.XXXXXX.XXX>;tag=g5t215i2p0
[Feb 14 12:21:21] To: <sip:100@XXXXXX.XXXXXX.XXX>;tag=z9hG4bKd89c.a6d0b20744fd9fabaa372cdad78783ab.0
[Feb 14 12:21:21] CSeq: 1 REGISTER
[Feb 14 12:21:21] WWW-Authenticate: Digest realm="XXXXXX.XXXXXX.XXX",nonce="1550143281/c58c9eb2c712a8fea5c183b1f8cd0c32",opaque="32a86826210cca97",algorithm=md5,qop="auth"
[Feb 14 12:21:21] Server: XXXXXX XXXXXX
[Feb 14 12:21:21] Content-Length:  0
[Feb 14 12:21:21] 
[Feb 14 12:21:21] 
[Feb 14 12:21:21] <--- Received SIP request (1102 bytes) from UDP:BBB.BBB.BBB.BBB:5060 --->
[Feb 14 12:21:21] REGISTER sip:XXXXXX.XXXXXX.XXX SIP/2.0
[Feb 14 12:21:21] Via: SIP/2.0/UDP BBB.BBB.BBB.BBB;branch=z9hG4bKa89c.4a9eb2a249327117eee831a8c52f55d5.0
[Feb 14 12:21:21] Via: SIP/2.0/WSS tr5g2hi9euh8.invalid;rport=49534;received=BBB.BBB.BBB.BBB;branch=z9hG4bK5947205
[Feb 14 12:21:21] Max-Forwards: 68
[Feb 14 12:21:21] To: <sip:100@XXXXXX.XXXXXX.XXX>
[Feb 14 12:21:21] From: <sip:100@XXXXXX.XXXXXX.XXX>;tag=g5t215i2p0
[Feb 14 12:21:21] Call-ID: lhtrn28srqrfi41ftiu63m
[Feb 14 12:21:21] CSeq: 2 REGISTER
[Feb 14 12:21:21] Authorization: Digest algorithm=MD5, username="100", realm="XXXXXX.XXXXXX.XXX", nonce="1550143281/c58c9eb2c712a8fea5c183b1f8cd0c32", uri="sip:XXXXXX.XXXXXX.XXX", response="9d93092e96c62ab1eb26b45df95dae9c", opaque="32a86826210cca97", qop=auth, cnonce="0m8getj1c80h", nc=00000001
[Feb 14 12:21:21] Contact: <sip:1dmt1qi6@tr5g2hi9euh8.invalid;transport=ws;alias=BBB.BBB.BBB.BBB~49534~6>;+sip.ice;reg-id=1;+sip.instance="<urn:uuid:ea02dadb-9b30-447e-a782-2bffdd048bd7>";expires=600
[Feb 14 12:21:21] Expires: 600
[Feb 14 12:21:21] Allow: INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO
[Feb 14 12:21:21] Supported: path,gruu,outbound
[Feb 14 12:21:21] User-Agent: JsSIP 3.3.4
[Feb 14 12:21:21] Content-Length: 0
[Feb 14 12:21:21] Path: <sip:BBB.BBB.BBB.BBB;lr;received=sip:BBB.BBB.BBB.BBB:49534%3Btransport%3Dws>
[Feb 14 12:21:21] Supported: path
[Feb 14 12:21:21] 
[Feb 14 12:21:21] 
[Feb 14 12:21:21]     -- Added contact 'sip:1dmt1qi6@tr5g2hi9euh8.invalid;transport=ws;alias=BBB.BBB.BBB.BBB~49534~6' to AOR '100' with expiration of 600 seconds
[Feb 14 12:21:21] <--- Transmitting SIP response (721 bytes) to UDP:BBB.BBB.BBB.BBB:5060 --->
[Feb 14 12:21:21] SIP/2.0 200 OK
[Feb 14 12:21:21] Via: SIP/2.0/UDP BBB.BBB.BBB.BBB;rport=5060;received=BBB.BBB.BBB.BBB;branch=z9hG4bKa89c.4a9eb2a249327117eee831a8c52f55d5.0
[Feb 14 12:21:21] Via: SIP/2.0/WSS tr5g2hi9euh8.invalid;rport=49534;received=BBB.BBB.BBB.BBB;branch=z9hG4bK5947205
[Feb 14 12:21:21] Call-ID: lhtrn28srqrfi41ftiu63m
[Feb 14 12:21:21] From: <sip:100@XXXXXX.XXXXXX.XXX>;tag=g5t215i2p0
[Feb 14 12:21:21] To: <sip:100@XXXXXX.XXXXXX.XXX>;tag=z9hG4bKa89c.4a9eb2a249327117eee831a8c52f55d5.0
[Feb 14 12:21:21] CSeq: 2 REGISTER
[Feb 14 12:21:21] Date: Thu, 14 Feb 2019 11:21:21 GMT
[Feb 14 12:21:21] Contact: <sip:s8sqot7s@9s4hgjcojhag.invalid;transport=ws;alias=BBB.BBB.BBB.BBB~49532~6>;expires=474
[Feb 14 12:21:21] Contact: <sip:1dmt1qi6@tr5g2hi9euh8.invalid;transport=ws;alias=BBB.BBB.BBB.BBB~49534~6>;expires=599
[Feb 14 12:21:21] Expires: 600
[Feb 14 12:21:21] Server: XXXXXX XXXXXX
[Feb 14 12:21:21] Content-Length:  0
[Feb 14 12:21:21] 
[Feb 14 12:21:21] 
XXXXXX*CLI> 
XXXXXX*CLI> 
XXXXXX*CLI> 
XXXXXX*CLI> pjsip show contact 100
Unable to find object 100.
XXXXXX [XXXXXX]> select * from ps_endpoints where id = '100'\G
*************************** 1. row ***************************
                                id: 100
                         transport: transport-udp
                              aors: 100
                              auth: 100
                           context: internal
                          disallow: all
                             allow: opus,alaw,ulaw,g722
                      direct_media: no
             connected_line_method: NULL
               direct_media_method: NULL
     direct_media_glare_mitigation: NULL
       disable_direct_media_on_nat: NULL
                         dtmf_mode: NULL
            external_media_address: NULL
                       force_rport: yes
                       ice_support: no
                       identify_by: NULL
                         mailboxes: NULL
                       moh_suggest: NULL
                     outbound_auth: NULL
                    outbound_proxy: NULL
                   rewrite_contact: NULL
                          rtp_ipv6: NULL
                     rtp_symmetric: NULL
                    send_diversion: NULL
                          send_pai: NULL
                         send_rpid: NULL
                     timers_min_se: NULL
                            timers: NULL
               timers_sess_expires: NULL
                          callerid: NULL
                  callerid_privacy: NULL
                      callerid_tag: NULL
                            100rel: NULL
                     aggregate_mwi: NULL
                  trust_id_inbound: NULL
                 trust_id_outbound: NULL
                         use_ptime: NULL
                          use_avpf: NULL
                  media_encryption: NULL
                   inband_progress: NULL
                        call_group: NULL
                      pickup_group: NULL
                  named_call_group: NULL
                named_pickup_group: NULL
              device_state_busy_at: NULL
                        fax_detect: NULL
                         t38_udptl: NULL
                      t38_udptl_ec: NULL
             t38_udptl_maxdatagram: NULL
                     t38_udptl_nat: NULL
                    t38_udptl_ipv6: NULL
                         tone_zone: NULL
                          language: NULL
               one_touch_recording: NULL
                 record_on_feature: NULL
                record_off_feature: NULL
                        rtp_engine: NULL
                    allow_transfer: NULL
                   allow_subscribe: NULL
                         sdp_owner: NULL
                       sdp_session: NULL
                         tos_audio: NULL
                         tos_video: NULL
                    sub_min_expiry: NULL
                       from_domain: XXXXXX.XXXXXX.XXX
                         from_user: 100
                     mwi_from_user: NULL
                       dtls_verify: NULL
                        dtls_rekey: NULL
                    dtls_cert_file: NULL
                  dtls_private_key: NULL
                       dtls_cipher: NULL
                      dtls_ca_file: NULL
                      dtls_ca_path: NULL
                        dtls_setup: NULL
                       srtp_tag_32: NULL
                     media_address: NULL
                   redirect_method: NULL
                           set_var: NULL
                         cos_audio: NULL
                         cos_video: NULL
                   message_context: NULL
                         force_avp: NULL
      media_use_received_transport: NULL
                       accountcode: 10000
                     user_eq_phone: NULL
                   moh_passthrough: NULL
       media_encryption_optimistic: NULL
                    rpid_immediate: NULL
                 g726_non_standard: NULL
                     rtp_keepalive: NULL
                       rtp_timeout: NULL
                  rtp_timeout_hold: NULL
         bind_rtp_to_media_address: NULL
               voicemail_extension: NULL
mwi_subscribe_replaces_unsolicited: NULL
                              deny: NULL
                            permit: NULL
                               acl: NULL
                      contact_deny: NULL
                    contact_permit: NULL
                       contact_acl: NULL
                 subscribe_context: NULL
                fax_detect_timeout: NULL
                      contact_user: NULL
              preferred_codec_only: NULL
              asymmetric_rtp_codec: NULL
                          rtcp_mux: NULL
                     allow_overlap: NULL
              refer_blind_progress: NULL
        notify_early_inuse_ringing: NULL
                 max_audio_streams: NULL
                 max_video_streams: NULL
                            webrtc: NULL
                  dtls_fingerprint: NULL
              incoming_mwi_mailbox: NULL
                            bundle: NULL
           dtls_auto_generate_cert: NULL
           follow_early_media_fork: NULL
       accept_multiple_sdp_answers: NULL
      suppress_q850_reason_headers: NULL
              trust_connected_line: NULL
               send_connected_line: NULL
1 row in set (0.00 sec)


That’s an endpoint, not the contact. The contacts are in the ps_contacts table if I recall.

Please, see a success REGISTER but not register from Asterisk CLI.

Anyway;

XXXXXX [XXXXXX]> select * from ps_contacts where id LIKE '100%'\G
*************************** 1. row ***************************
                  id: 100^3B@e0b92935fcb6ac5a736150ff9f659fa6
                 uri: sip:1dmt1qi6@tr5g2hi9euh8.invalid^3Btransport=ws^3Balias=BBB.BBB.BBB.BBB~49534~6
     expiration_time: 1550144475
   qualify_frequency: 60
      outbound_proxy: 
                path: <sip:BBB.BBB.BBB.BBB^3Blr^3Breceived=sip:BBB.BBB.BBB.BBB:49534%3Btransport%3Dws>
          user_agent: JsSIP 3.3.4
     qualify_timeout: 3
          reg_server: 
authenticate_qualify: yes
            via_addr: tr5g2hi9euh8.invalid
            via_port: 0
             call_id: lhtrn28srqrfi41ftiu63m
            endpoint: 100
       prune_on_boot: no
1 row in set (0.00 sec)

Path is not something commonly used, so it’s entirely possible that for OPTIONS it is not being respected. If you switch to .conf does it then work? If not then I’d suggest filing an issue[1] but there is no time frame on when it would get looked into or resolved.

[1] https://issues.asterisk.org/jira

I disabled path from AORS, but still without OPTIONS.

Unless you directly connected it wouldn’t work without Path, because the Contact address is invalid (it appears to be a WebRTC one) and the connection has to go back through the proxy.

Ok, I take on PATH+OPTIONS it’s not working at now on Asterisk.

But how to send INVITES (thru Dial app on dialplan) to my peer 100 with Status equals Unavailable?

P.S: Sorry, but can’t explain better.

You can’t, the code doesn’t try to dial such targets as they are unavailable with qualify enabled. Disabling qualify support entirely would change that.

With qualify_frequency=0 on AOR or I need to do any more?

That should do it if I recall correctly.

As you can see, Asterisk don’t try to contact with them:

[Feb 14 13:02:20] <--- Received SIP request (2182 bytes) from UDP:BBB.BBB.BBB.BBB:5060 --->
[Feb 14 13:02:20] INVITE sip:101@XXXXXX.XXXXXX.XXX SIP/2.0
[Feb 14 13:02:20] Record-Route: <sip:BBB.BBB.BBB.BBB;r2=on;lr=on;did=9bc.1aa;nat=ws>
[Feb 14 13:02:20] Record-Route: <sip:BBB.BBB.BBB.BBB:2443;transport=ws;r2=on;lr=on;did=9bc.1aa;nat=ws>
[Feb 14 13:02:20] Via: SIP/2.0/UDP BBB.BBB.BBB.BBB;branch=z9hG4bK8013.127df790bda7e52b693daf5e60274122.0
[Feb 14 13:02:20] Via: SIP/2.0/WSS 3gsjb6tjpv54.invalid;rport=49548;received=BBB.BBB.BBB.BBB;branch=z9hG4bK554249
[Feb 14 13:02:20] Max-Forwards: 68
[Feb 14 13:02:20] To: <sip:101@XXXXXX.XXXXXX.XXX>
[Feb 14 13:02:20] From: <sip:100@XXXXXX.XXXXXX.XXX>;tag=hblpar0bs8
[Feb 14 13:02:20] Call-ID: p3rhgcm4c7fnceem8ebm
[Feb 14 13:02:20] CSeq: 2571 INVITE
[Feb 14 13:02:20] Authorization: Digest algorithm=MD5, username="100", realm="XXXXXX.XXXXXX.XXX", nonce="1550145740/0b59a5fb428df2b8b55fc24091969831", uri="sip:101@XXXXXX.XXXXXX.XXX", response="e177e238d17234a1e360698fa7f92b13", opaque="2e183145788c4739", qop=auth, cnonce="o6bsdjbtv8rc", nc=00000001
[Feb 14 13:02:20] Contact: <sip:agci4n5f@3gsjb6tjpv54.invalid;transport=ws;ob;alias=BBB.BBB.BBB.BBB~49548~6;alias=BBB.BBB.BBB.BBB~49548~6>
[Feb 14 13:02:20] Content-Type: application/sdp
[Feb 14 13:02:20] Session-Expires: 90
[Feb 14 13:02:20] Allow: INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO
[Feb 14 13:02:20] Supported: timer,ice,replaces,outbound
[Feb 14 13:02:20] User-Agent: JsSIP 3.3.4
[Feb 14 13:02:20] Content-Length: 1010
[Feb 14 13:02:20] X-Original-Protocol: wss
[Feb 14 13:02:20] 
[Feb 14 13:02:20] v=0
[Feb 14 13:02:20] o=- 6551295176556056276 2 IN IP4 BBB.BBB.BBB.BBB
[Feb 14 13:02:20] s=-
[Feb 14 13:02:20] t=0 0
[Feb 14 13:02:20] a=msid-semantic: WMS XmsvC5uVk78iU4x1rQbZpBZcQq2VQv0Rti89
[Feb 14 13:02:20] m=audio 47086 RTP/AVP 111 103 104 9 0 8 106 105 13 110 112 113 126
[Feb 14 13:02:20] c=IN IP4 BBB.BBB.BBB.BBB
[Feb 14 13:02:20] a=msid:XmsvC5uVk78iU4x1rQbZpBZcQq2VQv0Rti89 43253f32-39d5-41ec-9678-e3ebcfe859fa
[Feb 14 13:02:20] a=rtcp-fb:111 transport-cc
[Feb 14 13:02:20] a=ssrc:1211739927 cname:VADpvd7MDWnp8GRo
[Feb 14 13:02:20] a=ssrc:1211739927 msid:XmsvC5uVk78iU4x1rQbZpBZcQq2VQv0Rti89 43253f32-39d5-41ec-9678-e3ebcfe859fa
[Feb 14 13:02:20] a=ssrc:1211739927 mslabel:XmsvC5uVk78iU4x1rQbZpBZcQq2VQv0Rti89
[Feb 14 13:02:20] a=ssrc:1211739927 label:43253f32-39d5-41ec-9678-e3ebcfe859fa
[Feb 14 13:02:20] a=rtpmap:111 opus/48000/2
[Feb 14 13:02:20] a=rtpmap:103 ISAC/16000
[Feb 14 13:02:20] a=rtpmap:104 ISAC/32000
[Feb 14 13:02:20] a=rtpmap:9 G722/8000
[Feb 14 13:02:20] a=rtpmap:0 PCMU/8000
[Feb 14 13:02:20] a=rtpmap:8 PCMA/8000
[Feb 14 13:02:20] a=rtpmap:106 CN/32000
[Feb 14 13:02:20] a=rtpmap:105 CN/16000
[Feb 14 13:02:20] a=rtpmap:13 CN/8000
[Feb 14 13:02:20] a=rtpmap:110 telephone-event/48000
[Feb 14 13:02:20] a=rtpmap:112 telephone-event/32000
[Feb 14 13:02:20] a=rtpmap:113 telephone-event/16000
[Feb 14 13:02:20] a=rtpmap:126 telephone-event/8000
[Feb 14 13:02:20] a=fmtp:111 minptime=10;useinbandfec=1
[Feb 14 13:02:20] a=sendrecv
[Feb 14 13:02:20] a=rtcp:47087
[Feb 14 13:02:20] 
[Feb 14 13:02:20]   == Setting global variable 'SIPDOMAIN' to 'XXXXXX.XXXXXX.XXX'
[Feb 14 13:02:20] <--- Transmitting SIP response (567 bytes) to UDP:BBB.BBB.BBB.BBB:5060 --->
[Feb 14 13:02:20] SIP/2.0 100 Trying
[Feb 14 13:02:20] Via: SIP/2.0/UDP BBB.BBB.BBB.BBB;rport=5060;received=BBB.BBB.BBB.BBB;branch=z9hG4bK8013.127df790bda7e52b693daf5e60274122.0
[Feb 14 13:02:20] Via: SIP/2.0/WSS 3gsjb6tjpv54.invalid;rport=49548;received=BBB.BBB.BBB.BBB;branch=z9hG4bK554249
[Feb 14 13:02:20] Record-Route: <sip:BBB.BBB.BBB.BBB;lr;r2=on;did=9bc.1aa;nat=ws>
[Feb 14 13:02:20] Record-Route: <sip:BBB.BBB.BBB.BBB:2443;transport=ws;lr;r2=on;did=9bc.1aa;nat=ws>
[Feb 14 13:02:20] Call-ID: p3rhgcm4c7fnceem8ebm
[Feb 14 13:02:20] From: <sip:100@XXXXXX.XXXXXX.XXX>;tag=hblpar0bs8
[Feb 14 13:02:20] To: <sip:101@XXXXXX.XXXXXX.XXX>
[Feb 14 13:02:20] CSeq: 2571 INVITE
[Feb 14 13:02:20] Server: XXXXXX XXXXXX
[Feb 14 13:02:20] Content-Length:  0
[Feb 14 13:02:20] 
[Feb 14 13:02:20] 
[Feb 14 13:02:20]     -- Executing [101@internal:1] NoOp("PJSIP/100-00000000", "WebRTC Call") in new stack
[Feb 14 13:02:20]     -- Executing [101@internal:2] Progress("PJSIP/100-00000000", "") in new stack
[Feb 14 13:02:20]        > 0x7f725c04a560 -- Strict RTP learning after remote address set to: BBB.BBB.BBB.BBB:47086
[Feb 14 13:02:20] <--- Transmitting SIP response (1130 bytes) to UDP:BBB.BBB.BBB.BBB:5060 --->
[Feb 14 13:02:20] SIP/2.0 183 Session Progress
[Feb 14 13:02:20] Via: SIP/2.0/UDP BBB.BBB.BBB.BBB;rport=5060;received=BBB.BBB.BBB.BBB;branch=z9hG4bK8013.127df790bda7e52b693daf5e60274122.0
[Feb 14 13:02:20] Via: SIP/2.0/WSS 3gsjb6tjpv54.invalid;rport=49548;received=BBB.BBB.BBB.BBB;branch=z9hG4bK554249
[Feb 14 13:02:20] Record-Route: <sip:BBB.BBB.BBB.BBB;lr;r2=on;did=9bc.1aa;nat=ws>
[Feb 14 13:02:20] Record-Route: <sip:BBB.BBB.BBB.BBB:2443;transport=ws;lr;r2=on;did=9bc.1aa;nat=ws>
[Feb 14 13:02:20] Call-ID: p3rhgcm4c7fnceem8ebm
[Feb 14 13:02:20] From: <sip:100@XXXXXX.XXXXXX.XXX>;tag=hblpar0bs8
[Feb 14 13:02:20] To: <sip:101@XXXXXX.XXXXXX.XXX>;tag=40e9e602-919a-4f39-b78e-4dc32396c380
[Feb 14 13:02:20] CSeq: 2571 INVITE
[Feb 14 13:02:20] Server: XXXXXX XXXXXX
[Feb 14 13:02:20] Contact: <sip:178.33.94.39:5060>
[Feb 14 13:02:20] Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
[Feb 14 13:02:20] Content-Type: application/sdp
[Feb 14 13:02:20] Content-Length:   333
[Feb 14 13:02:20] 
[Feb 14 13:02:20] v=0
[Feb 14 13:02:20] o=- 3109719764 4 IN IP4 178.33.94.39
[Feb 14 13:02:20] s=Asterisk
[Feb 14 13:02:20] c=IN IP4 178.33.94.39
[Feb 14 13:02:20] t=0 0
[Feb 14 13:02:20] m=audio 11656 RTP/AVP 111 8 0 9 126
[Feb 14 13:02:20] a=rtpmap:111 opus/48000/2
[Feb 14 13:02:20] a=fmtp:111 useinbandfec=1
[Feb 14 13:02:20] a=rtpmap:8 PCMA/8000
[Feb 14 13:02:20] a=rtpmap:0 PCMU/8000
[Feb 14 13:02:20] a=rtpmap:9 G722/8000
[Feb 14 13:02:20] a=rtpmap:126 telephone-event/8000
[Feb 14 13:02:20] a=fmtp:126 0-16
[Feb 14 13:02:20] a=ptime:20
[Feb 14 13:02:20] a=maxptime:20
[Feb 14 13:02:20] a=sendrecv
[Feb 14 13:02:20] 
[Feb 14 13:02:20]     -- Executing [101@internal:3] Dial("PJSIP/100-00000000", "PJSIP/101/sip:src4n48d@ssth193i0pjo.invalid;transport=ws;alias=BBB.BBB.BBB.BBB~49540~6&PJSIP/101/sip:ibo1c8tn@0iameathobci.invalid;transport=ws;alias=BBB.BBB.BBB.BBB~49550~6") in new stack
[Feb 14 13:02:20]     -- Called PJSIP/101/sip:src4n48d@ssth193i0pjo.invalid;transport=ws;alias=BBB.BBB.BBB.BBB~49540~6
[Feb 14 13:02:20]     -- Called PJSIP/101/sip:ibo1c8tn@0iameathobci.invalid;transport=ws;alias=BBB.BBB.BBB.BBB~49550~6
[Feb 14 13:02:20]     -- PJSIP/101-00000002 connected line has changed. Saving it until answer for PJSIP/100-00000000
[Feb 14 13:02:20]     -- PJSIP/101-00000001 connected line has changed. Saving it until answer for PJSIP/100-00000000
[Feb 14 13:02:20]   == Everyone is busy/congested at this time (2:0/2/0)
[Feb 14 13:02:20]     -- Executing [101@internal:4] Hangup("PJSIP/100-00000000", "") in new stack
[Feb 14 13:02:20]   == Spawn extension (webrtc, 101, 4) exited non-zero on 'PJSIP/100-00000000'
[Feb 14 13:02:20] <--- Transmitting SIP response (756 bytes) to UDP:BBB.BBB.BBB.BBB:5060 --->
[Feb 14 13:02:20] SIP/2.0 503 Service Unavailable
[Feb 14 13:02:20] Via: SIP/2.0/UDP BBB.BBB.BBB.BBB;rport=5060;received=BBB.BBB.BBB.BBB;branch=z9hG4bK8013.127df790bda7e52b693daf5e60274122.0
[Feb 14 13:02:20] Via: SIP/2.0/WSS 3gsjb6tjpv54.invalid;rport=49548;received=BBB.BBB.BBB.BBB;branch=z9hG4bK554249
[Feb 14 13:02:20] Record-Route: <sip:BBB.BBB.BBB.BBB;lr;r2=on;did=9bc.1aa;nat=ws>
[Feb 14 13:02:20] Record-Route: <sip:BBB.BBB.BBB.BBB:2443;transport=ws;lr;r2=on;did=9bc.1aa;nat=ws>
[Feb 14 13:02:20] Call-ID: p3rhgcm4c7fnceem8ebm
[Feb 14 13:02:20] From: <sip:100@XXXXXX.XXXXXX.XXX>;tag=hblpar0bs8
[Feb 14 13:02:20] To: <sip:101@XXXXXX.XXXXXX.XXX>;tag=40e9e602-919a-4f39-b78e-4dc32396c380
[Feb 14 13:02:20] CSeq: 2571 INVITE
[Feb 14 13:02:20] Server: XXXXXX XXXXXX
[Feb 14 13:02:20] Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
[Feb 14 13:02:20] Reason: Q.850;cause=34
[Feb 14 13:02:20] Content-Length:  0
[Feb 14 13:02:20] 
[Feb 14 13:02:20] 
[Feb 14 13:02:20] <--- Received SIP request (344 bytes) from UDP:BBB.BBB.BBB.BBB:5060 --->
[Feb 14 13:02:20] ACK sip:101@XXXXXX.XXXXXX.XXX SIP/2.0
[Feb 14 13:02:20] Via: SIP/2.0/UDP BBB.BBB.BBB.BBB;branch=z9hG4bK8013.127df790bda7e52b693daf5e60274122.0
[Feb 14 13:02:20] Max-Forwards: 68
[Feb 14 13:02:20] To: <sip:101@XXXXXX.XXXXXX.XXX>;tag=40e9e602-919a-4f39-b78e-4dc32396c380
[Feb 14 13:02:20] From: <sip:100@XXXXXX.XXXXXX.XXX>;tag=hblpar0bs8
[Feb 14 13:02:20] Call-ID: p3rhgcm4c7fnceem8ebm
[Feb 14 13:02:20] CSeq: 2571 ACK
[Feb 14 13:02:20] Content-Length: 0
[Feb 14 13:02:20] 
[Feb 14 13:02:20]
Peer Statuses:

XXXXXX*CLI> pjsip show contacts

  Contact:  <Aor/ContactUri..............................> <Hash....> <Status> <RTT(ms)..>
==========================================================================================

  Contact:  100/sip:agci4n5f@3gsjb6tjpv54.invalid;transpor 6f0a4e6fe3 NonQual         nan
  Contact:  100/sip:k817423b@l5cvuopoe2n5.invalid;transpor be4c47848c NonQual         nan
  Contact:  101/sip:ibo1c8tn@0iameathobci.invalid;transpor b1d15a6919 NonQual         nan
  Contact:  101/sip:src4n48d@ssth193i0pjo.invalid;transpor 32a9e4015c NonQual         nan

Objects found: 4

There is a known bug where Path does not work with PJSIP_DIAL_CONTACTS[1].

[1] https://issues.asterisk.org/jira/browse/ASTERISK-28211

You know if this wrong behavior it’s in Asterisk 13?

It is in Asterisk 13 as well. Path support hasn’t been touched across versions.

So Long, and Thanks for All the Fish.

Thanks for your time.