[asterisk-bugs] [JIRA] (ASTERISK-26879) PJSIP external_media_address ignored if no local_net options are provided

Friendly Automation (JIRA) noreply at issues.asterisk.org
Mon Mar 20 14:53:10 CDT 2017


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

Friendly Automation commented on ASTERISK-26879:
------------------------------------------------

Change 5230 merged by zuul:
res/res_pjsip_session: Only check localnet if it is defined

[https://gerrit.asterisk.org/5230|https://gerrit.asterisk.org/5230]

> PJSIP external_media_address ignored if no local_net options are provided
> -------------------------------------------------------------------------
>
>                 Key: ASTERISK-26879
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26879
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_pjsip
>            Reporter: Matt Jordan
>            Assignee: Matt Jordan
>
> Let's say you have the following transport definition:
> ```
> [transport-udp]
> type=transport
> protocol=udp
> bind=0.0.0.0
> external_media_address=x.x.x.x
> ```
> We're saying that regardless of who I'm sending a packet to, advertise as {{x.x.x.x}} in the SDP. This may be a bit odd, as it means we want to advertise as that IP address regardless of the network we send on - but in some odd situations (like where you're running Asterisk in a Docker container with `network=host` and you're communicating with stuff inside the Docker container which may also be punching holes through its NAT'd network back to the outside world) you may want to do that.
> (The above is purely hypothetical).
> Unfortunately, in today's implementation, we will ignore the `external_media_address`, as checking a `localnet` that is NULL (because it wasn't set) against the address we're sending to will always return 'true' - so Asterisk will always think we're sending a SIP message to a network within our localnet. Even though we didn't define one.



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



More information about the asterisk-bugs mailing list