[asterisk-bugs] [JIRA] (ASTERISK-28768) No audio on remote NATted phone when using local_net behind another NATted Asterisk

Asterisk Team (JIRA) noreply at issues.asterisk.org
Thu Mar 5 02:21:25 CST 2020


    [ https://issues.asterisk.org/jira/browse/ASTERISK-28768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=249912#comment-249912 ] 

Asterisk Team commented on ASTERISK-28768:
------------------------------------------

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.

> No audio on remote NATted phone when using local_net behind another NATted Asterisk
> -----------------------------------------------------------------------------------
>
>                 Key: ASTERISK-28768
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28768
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_pjsip
>    Affects Versions: 16.8.0
>         Environment: Asterisk 16.8.0 running on Centos 7 x64.
>            Reporter: Marc Ketel
>            Severity: Critical
>
> The changes in issue https://issues.asterisk.org/jira/browse/ASTERISK-27248 causes local_net to not function correctly.
> In Asterisk 11.10, local_net functioned correctly, in Asterisk 16.8.0 local_net does not function correctly. I traced the change to issue https://issues.asterisk.org/jira/browse/ASTERISK-27248.
> Scenario: both Asterisk and phone1 are behind same NAT. phone2 is remotely behind nat. When configuring some unrelated ip subnet in local_net the remote phone2's audio is being send from Asterisk to the local ip of the remote phone2, which does not work. Disabling local_net makes the remote phone2 work. 
> When undoing ASTERISK-27248_undo.patch and configuring local_net to the network of phone1 all phones work. The local phone gets RTP from the local address of Asterisk, the remote phone gets audio to its external nat ip.
> Remote phone with correct external media adress and working RTP
> {noformat}
> [Mar  4 14:16:25] DEBUG[31740]: res_pjsip_session.c:902 handle_negotiated_sdp_session_media: Applied negotiated SDP media stream 'audio' using audio SDP handler
> [Mar  4 14:16:25] DEBUG[31740]: res_pjsip_session.c:3498 handle_outgoing_response: Method is INVITE, Response is 200 OK
> [Mar  4 14:16:25] DEBUG[31740]: res_pjsip/pjsip_message_filter.c:288 filter_on_tx_message: Re-wrote Contact URI host/port to 172.17.32.36:5060 (this may be re-written again later)
> [Mar  4 14:16:25] DEBUG[31740]: netsock2.c:170 ast_sockaddr_split_hostport: Splitting '198.51.100.50' into...
> [Mar  4 14:16:25] DEBUG[31740]: netsock2.c:224 ast_sockaddr_split_hostport: ...host '198.51.100.50' and port ''.
> [Mar  4 14:16:25] DEBUG[31740]: res_pjsip_nat.c:414 process_nat: Re-wrote Contact URI port to 5060
> [Mar  4 14:16:25] DEBUG[31740]: netsock2.c:170 ast_sockaddr_split_hostport: Splitting '172.17.32.36' into...
> [Mar  4 14:16:25] DEBUG[31740]: netsock2.c:224 ast_sockaddr_split_hostport: ...host '172.17.32.36' and port ''.
> [Mar  4 14:16:25] DEBUG[31740]: res_pjsip_session.c:4338 session_outgoing_nat_hook: Setting external media address to 203.0.113.102
> <--- Transmitting SIP response (880 bytes) to TCP:198.51.100.50:56924 --->
> {noformat}
> Local phone that is correctly identified as local with local_net=10.215.152.0/255.255.255.0
> {noformat}
> [Mar  4 14:19:47] DEBUG[31740]: res_pjsip_session.c:902 handle_negotiated_sdp_session_media: Applied negotiated SDP media stream 'audio' using audio SDP handler
> [Mar  4 14:19:47] DEBUG[31740]: res_pjsip_session.c:3498 handle_outgoing_response: Method is INVITE, Response is 200 OK
> [Mar  4 14:19:47] DEBUG[31740]: res_pjsip/pjsip_message_filter.c:288 filter_on_tx_message: Re-wrote Contact URI host/port to 172.17.32.36:5060 (this may be re-written again later)
> [Mar  4 14:19:47] DEBUG[31740]: netsock2.c:170 ast_sockaddr_split_hostport: Splitting '10.215.152.3' into...
> [Mar  4 14:19:47] DEBUG[31740]: netsock2.c:224 ast_sockaddr_split_hostport: ...host '10.215.152.3' and port ''.
> [Mar  4 14:19:47] DEBUG[31740]: res_pjsip_nat.c:403 process_nat: Request is being sent to local address, skipping NAT manipulation
> <--- Transmitting SIP response (797 bytes) to UDP:10.215.152.3:50611 --->
> {noformat}
> {noformat}
> +		/* Reversed check here. We don't check the remote
> +		 * endpoint being in our local net, but whether our
> +		 * outgoing session IP is local. If it is, we'll do
> +		 * rewriting. No localnet configured? Always rewrite. */
> {noformat}
> Please reconsider checking the remote ip of the phone and not the outgoing session ip.
> Relevant configuration:
> {noformat}
> [template-transport-ipv6](!)
> ;local_net=
> ;external_media_address=
> ;external_signaling_address=
> [template-transport-ipv4](!)
> local_net=10.215.152.0/255.255.255.0
> external_media_address=203.0.113.102
> external_signaling_address=203.0.113.102
> [template-transport](!)
> type=transport
> external_signaling_port=5060
> allow_reload=yes
> symmetric_transport=yes
> [transport-auto-udp6](template-transport,template-transport-ipv6)
> protocol=udp
> bind=::
> [transport-auto-udp4](template-transport,template-transport-ipv4)
> protocol=udp
> bind=0.0.0.0
> [transport-auto-tcp6](template-transport,template-transport-ipv6)
> protocol=tcp
> bind=::
> [transport-auto-tcp4](template-transport,template-transport-ipv4)
> protocol=tcp
> bind=0.0.0.0
> [user_defaults](!)
> type = wizard
> accepts_registrations = yes
> sends_registrations = no
> accepts_auth = yes
> sends_auth = no
> has_hint = yes
> hint_context = hints
> hint_application = Dial(PJSIP/${EXTEN})
> endpoint/allow = !all,alaw,ulaw
> endpoint/allow_subscribe = yes
> endpoint/allow_transfer = yes
> endpoint/context = uitbellen
> endpoint/device_state_busy_at = 1
> endpoint/direct_media = no
> endpoint/direct_media_method = invite
> endpoint/disable_direct_media_on_nat = yes
> endpoint/force_rport = yes
> endpoint/ice_support = no
> endpoint/inband_progress = yes
> endpoint/moh_suggest = default
> endpoint/rewrite_contact = yes
> endpoint/rtp_ipv6 = yes
> endpoint/rtp_keepalive = 15
> endpoint/rtp_timeout = 60
> endpoint/rtp_timeout_hold = 14400
> endpoint/rtp_symmetric = yes
> endpoint/send_diversion = yes
> endpoint/send_pai = no
> endpoint/send_rpid = no
> endpoint/subscribe_context = hints
> endpoint/trust_id_inbound = no
> endpoint/trust_id_outbound = no
> endpoint/language = nl
> endpoint/send_connected_line = true
> endpoint/trust_connected_line = true
> aor/qualify_frequency = 60
> aor/authenticate_qualify = no
> aor/max_contacts = 1
> aor/remove_existing = yes
> aor/minimum_expiration = 30
> aor/support_path = yes
> ;(Mitel 6865i)
> [2003](user_defaults)
> aor/mailboxes=
> inbound_auth/username=2003
> inbound_auth/password=xxx
> endpoint/dtmf_mode=auto
> endpoint/call_group=
> endpoint/pickup_group=
> ;Marc softphone ()
> [2995](user_defaults)
> aor/mailboxes=
> inbound_auth/username=2995
> inbound_auth/password=xxx
> endpoint/call_group=
> endpoint/pickup_group=
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list