[asterisk-bugs] [JIRA] (ASTERISK-27024) nat/external_media settings ignored in 14.4.1

Florian Floimair (JIRA) noreply at issues.asterisk.org
Thu Jun 1 09:35:57 CDT 2017


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

Florian Floimair edited comment on ASTERISK-27024 at 6/1/17 9:35 AM:
---------------------------------------------------------------------

I narrowed down the issue to Matt Jordan's commit fixing ASTERISK-26879 using 'git bisect':
{quote}
commit 486abb4210079fa29ec14e34189d959fa7d08f6d
Author: Matt Jordan <mjordan at digium.com>
Date:   Thu Mar 16 10:39:00 2017 -0500

    res/res_pjsip_session: Only check localnet if it is defined
{quote}
I also verified by checking out the latest commit on the 14 branch and reverting the mentioned commit. After the revert everything worked fine.


was (Author: f.floimair):
I narrowed down the issue to Matt Jordan's commit fixing ASTERISK-26879 using 'git bisect':

commit 486abb4210079fa29ec14e34189d959fa7d08f6d
Author: Matt Jordan <mjordan at digium.com>
Date:   Thu Mar 16 10:39:00 2017 -0500

    res/res_pjsip_session: Only check localnet if it is defined
    
    If local_net is not defined on a transport, transport_state->localnet
    will be NULL. ast_apply_ha will, be default, return AST_SENSE_ALLOW in
    this case, causing the external_media_address, if set, to be skipped.
    
    This patch causes us to only check if we are sending within a network if
    local_net is defined.
    
    ASTERISK-26879 #close
    
    Change-Id: Ib661c31a954cabc9c99f1f25c9c9a5c5b82cbbfb

I also verified by checking out the latest commit on the 14 branch and reverting the mentioned commit. After the revert everything worked fine.

> nat/external_media settings ignored in 14.4.1
> ---------------------------------------------
>
>                 Key: ASTERISK-27024
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27024
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: pjproject/pjsip
>    Affects Versions: 14.4.1
>         Environment: Alpine Linux 3.6 (Docker image)
>            Reporter: Christopher van de Sande
>            Assignee: Christopher van de Sande
>
> Post upgrade from 14.3.1 to 14.4.1 rtp is not received by an enpoint behind a nat. The problem appears to be in the SDP headers sent from Asterisk.
> Rolling back to 14.3.1 solves the issue.
> Asterisk is behind a shorewall firewall on a private natted network. It has a single interface eth0.
> Relevant pjsip.conf:
> {noformat}
> [transport-tls-nat]
> type=transport
> protocol=tls
> method=sslv23 ;sslv23 enables tls1.2 because reasons
> cert_file=XXX ;removed
> priv_key_file=XXX ;removed
> bind=0.0.0.0:5061
> external_media_address=x.x.x.x ;public ip
> external_signaling_address=x.x.x.x ;public ip
> local_net=192.168.0.0/16
> [endpoint-common](!)
> type=endpoint
> context=users
> disallow=all
> allow=g722,ulaw,h264
> dtmf_mode=info
> [endpoint-sdes](!)
> media_encryption=sdes
> [aor-common](!)
> type=aor
> remove_existing=yes
> max_contacts=1
> maximum_expiration=160
> qualify_frequency=60
> [207](endpoint-common,endpoint-sdes)
> ;Linphone
> callerid=Chris <PSTN number>
> auth=207
> aors=207
> mailboxes=201 at default
> use_avpf=yes
> rtp_symmetric=yes
> media_use_received_transport=yes
> force_rport=yes
> [207]
> type=auth
> auth_type=userpass
> password=supersecretpassword
> username=207
> [207](aor-common)
> {noformat}
> See pastbin logs referenced below.
> The SDP headers on 14.4.1 issue the private ip instead of the public ip:
> 14.3.1:
> {noformat}
> v=0
> o=- 3705154152 3705154155 IN IP4 192.168.1.88
> s=Asterisk
> c=IN IP4 198.48.203.62
> t=0 0
> m=audio 13310 RTP/SAVP 9
> a=crypto:1 AES_256_CM_HMAC_SHA1_80 inline:FA++mhDadUmqknBzPIWDUI1RlQc0ZNsMwCx2MevLypTQdxXFB5ATHU+ltRXH7g==
> a
> {noformat}
> 14.4.1:
> {noformat}
> v=0
> o=- 3705154685 3705154688 IN IP4 192.168.1.88
> s=Asterisk
> c=IN IP4 192.168.1.88
> t=0 0
> m=audio 11764 RTP/SAVP 9
> a=crypto:1 AES_256_CM_HMAC_SHA1_80 inline:STqxjT14RMJ19JB3GV0S+wD/mCBB9B4iPCv2yzGnRu894T058Q3zi41w55qK1w==
> a
> {noformat}



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



More information about the asterisk-bugs mailing list