[Home]

Summary:ASTERISK-29700: DTMF is sent in RTP events even if remote 200 OK omits telephone-event
Reporter:Kingsley Tart (skycomltd)Labels:fax webrtc
Date Opened:2021-10-22 11:00:48Date Closed:2021-10-25 09:40:56
Priority:TrivialRegression?No
Status:Closed/CompleteComponents:pjproject/pjsip
Versions:18.7.1 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Debian 10. Asterisk compiled from source.Attachments:( 0) astlog.gz
( 1) dtmf-test.pcap.gz
Description:a. Asterisk receives INVITE containing SDP telephone-event
b. Asterisk uses Dial with pjsip and sends INVITE to destination
including SDP telephone-event
c. Asterisk receives 200 OK back from destination WITHOUT telephone-
event
d. Asterisk forwards DTMF received to the destination in RTP events instead of falling back to inband audio

We do have spandsp installed (if that's relevant?). This Asterisk installation DOES recognise inband audio DTMF being sent in to it.

pjsip.conf has the following for the destination endpoint:
[opensips-ipx]
type=endpoint
send_rpid=no
trust_id_inbound=yes
; change this when we write the custom context for it:
context=from-pubopensips
aors=opensips-ipx-vip-a,opensips-ipx-vip-b,opensips-ipx-vip-c
redirect_method=uri_pjsip
disallow=all
allow=alaw
allow=ulaw
allow=g722
dtmf_mode=auto
Comments:By: Asterisk Team (asteriskteam) 2021-10-22 11:00:49.243-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. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

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.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

By: Kingsley Tart (skycomltd) 2021-10-22 11:12:07.484-0500

Here is a pcap file of a call demonstrating the issue. The Asterisk server is on 88.151.41.29.

astlog.gz is an Asterisk log with full debug as described on
https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information

By: Joshua C. Colp (jcolp) 2021-10-25 05:10:27.094-0500

The endpoint you've specified in the description doesn't appear to be used for the call in the provided log. I see the following endpoints used:

squiresvi
custom

What are their configuration?

By: Kingsley Tart (skycomltd) 2021-10-25 06:34:33.084-0500

{noformat}
[squiresvi]
type=endpoint
send_rpid=no
trust_id_inbound=yes
context=squireinbound
disallow=all
allow=alaw
allow=ulaw
aors=squiresvi

; Dial using PJSIP/custom/sip:user@domain:5060 and it will use this template for the allowed codecs etc...
[custom]
type=endpoint
transport=transport-udp
disallow=all
allow=alaw
allow=ulaw
allow=gsm
allow=g722
allow=speex
allow=speex16
allow=speex32
dtmf_mode=auto

gw9*CLI> pjsip show endpoint custom

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:  custom                                               Unavailable   0 of inf
 Transport:  transport-udp             udp      0      0  0.0.0.0:5060


ParameterName                      : ParameterValue
===================================================================================================
100rel                             : yes
accept_multiple_sdp_answers        : false
accountcode                        :
acl                                :
aggregate_mwi                      : true
allow                              : (alaw|ulaw|gsm|g722|speex|speex16|speex32)
allow_overlap                      : true
allow_subscribe                    : true
allow_transfer                     : true
allow_unauthenticated_options      : false
aors                               :
asymmetric_rtp_codec               : false
auth                               :
bind_rtp_to_media_address          : false
bundle                             : false
call_group                         :
callerid                           : <unknown>
callerid_privacy                   : allowed_not_screened
callerid_tag                       :
codec_prefs_incoming_answer        : prefer:pending, operation:intersect, keep:all, transcode:allow
codec_prefs_incoming_offer         : prefer:pending, operation:intersect, keep:all, transcode:allow
codec_prefs_outgoing_answer        : prefer:pending, operation:intersect, keep:all, transcode:allow
codec_prefs_outgoing_offer         : prefer:pending, operation:union, keep:all, transcode:allow
connected_line_method              : invite
contact_acl                        :
context                            : default
cos_audio                          : 0
cos_video                          : 0
device_state_busy_at               : 0
direct_media                       : true
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                          : auto
fax_detect                         : false
fax_detect_timeout                 : 0
follow_early_media_fork            : true
force_avp                          : false
force_rport                        : true
from_domain                        :
from_user                          :
g726_non_standard                  : false
ice_support                        : false
identify_by                        : username,ip
ignore_183_without_sdp             : false
inband_progress                    : false
incoming_call_offer_pref           : local
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                     :
outgoing_call_offer_pref           : remote_merge
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_history_info                  : false
send_pai                           : false
send_rpid                          : false
set_var                            :
srtp_tag_32                        : false
stir_shaken                        : 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

gw9*CLI>
gw9*CLI>
gw9*CLI> pjsip show endpoint squiresvi

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:  squiresvi                                            Not in use    0 of inf
       Aor:  squiresvi                                          0
     Contact:  squiresvi/sip:88.151.41.30:5060            8f2da83354 Avail         1.107
  Identify:  squiresvi/squiresvi
       Match: 88.151.41.30/32


ParameterName                      : ParameterValue
===================================================================================================
100rel                             : yes
accept_multiple_sdp_answers        : false
accountcode                        :
acl                                :
aggregate_mwi                      : true
allow                              : (alaw|ulaw)
allow_overlap                      : true
allow_subscribe                    : true
allow_transfer                     : true
allow_unauthenticated_options      : false
aors                               : squiresvi
asymmetric_rtp_codec               : false
auth                               :
bind_rtp_to_media_address          : false
bundle                             : false
call_group                         :
callerid                           : <unknown>
callerid_privacy                   : allowed_not_screened
callerid_tag                       :
codec_prefs_incoming_answer        : prefer:pending, operation:intersect, keep:all, transcode:allow
codec_prefs_incoming_offer         : prefer:pending, operation:intersect, keep:all, transcode:allow
codec_prefs_outgoing_answer        : prefer:pending, operation:intersect, keep:all, transcode:allow
codec_prefs_outgoing_offer         : prefer:pending, operation:union, keep:all, transcode:allow
connected_line_method              : invite
contact_acl                        :
context                            : squireinbound
cos_audio                          : 0
cos_video                          : 0
device_state_busy_at               : 0
direct_media                       : true
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                        :
from_user                          :
g726_non_standard                  : false
ice_support                        : false
identify_by                        : username,ip
ignore_183_without_sdp             : false
inband_progress                    : false
incoming_call_offer_pref           : local
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                     :
outgoing_call_offer_pref           : remote_merge
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_history_info                  : false
send_pai                           : false
send_rpid                          : false
set_var                            :
srtp_tag_32                        : false
stir_shaken                        : 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                          :
trust_connected_line               : yes
trust_id_inbound                   : true
trust_id_outbound                  : false
use_avpf                           : false
use_ptime                          : false
user_eq_phone                      : false
voicemail_extension                :
webrtc                             : no
{noformat}

By: Kingsley Tart (skycomltd) 2021-10-25 06:35:16.974-0500

BTW I've elevated this to critical because it's critical to us - a carrier is refusing to work with us until we resolve this.

By: Kingsley Tart (skycomltd) 2021-10-25 06:39:05.236-0500

Hold fire - I think I've done something sillly

By: Kingsley Tart (skycomltd) 2021-10-25 09:38:18.486-0500

I'm closing this ticket because this is actually not a bug in Asterisk but a bug in my brain. It's been too full recently and isn't good at task switching.

I was editing the wrong damned endpoint - sorry to waste your time.

By: Kingsley Tart (skycomltd) 2021-10-25 09:38:40.176-0500

OK ... I don't have permission to close this. Could someone do it for me?