[Home]

Summary:ASTERISK-25605: outboundproxy= works globally but not for individual SIP trunks
Reporter:PowerPBX (PowerPBX)Labels:
Date Opened:2015-12-02 12:55:55.000-0600Date Closed:2020-01-14 11:13:36.000-0600
Priority:TrivialRegression?
Status:Closed/CompleteComponents:Channels/chan_sip/General Documentation
Versions:13.5.0 13.6.0 Frequency of
Occurrence
Related
Issues:
Environment:CentOS v6 32bit, VPSAttachments:
Description:Normal SIP trunk configuration.  However some providers use an outboundproxy.

With the outboundproxy configured I do not see any traffic being sent out to that outboundproxy IP.  I also tried adding the ,force option

So my [sometrunk] config includes:
outboundproxy=xx.xx.xx.xx:5065,force

I tried with and without the port setting and ,force option.  It does not make any difference.  There is never any traffic sent out to that IP.

If I add that exact same configuration under [general] settings in sip.conf it immediately starts working.  That is not a solution because it does that for all trunks and I need it to only do it for 1 trunk.
Comments:By: Asterisk Team (asteriskteam) 2015-12-02 12:55:56.815-0600

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].

By: Walter Doekes (wdoekes) 2015-12-02 14:34:27.818-0600

You can try using the {{SIP/trunk/exten/outboundproxy}} syntax when dialing, if that helps.

By: PowerPBX (PowerPBX) 2015-12-02 15:49:06.821-0600

It will not even register.  So a dialpattern will not help.

By: PowerPBX (PowerPBX) 2015-12-02 17:33:17.928-0600

Ok I think I have it working.  If this is documented anywhere on the asterisk site or in the config file examples I couldn't find it.

To get the outboundproxy to work in a trunk config:

Name the trunk:

[sometrunk]
host=somehostname.com
outboundproxy=someoutboundproxy.com

The trick is that you need to use the "sometrunk" trunk name in the register string instead of the resolvable host.

register => user[:secret[:authuser]]@sometrunk[:port][/extension]

By: Rusty Newton (rnewton) 2015-12-07 20:04:29.011-0600

I feel like the sip.conf sample makes it fairly clear that you can define a peer for the host

{noformat}
;register => 2345:password@sip_proxy/1234
;
;    Register 2345 at sip provider 'sip_proxy'.  Calls from this provider
;    connect to local extension 1234 in extensions.conf, default context,
;    unless you configure a [sip_proxy] section below, and configure a
;    context.
;    Tip 1: Avoid assigning hostname to a sip.conf section like [provider.com]
;    Tip 2: Use separate inbound and outbound sections for SIP providers
;           (instead of type=friend) if you have calls in both directions
;
{noformat}

If you have a suggestion on how to make the documentation more clear, please submit a patch. It is hard for me to view it from your perspective so if you feel there is a way to improve it - a patch will provide the most clarity.

By: PowerPBX (PowerPBX) 2015-12-07 20:19:46.453-0600

Hi,

I don't think that is talking about the same thing.
I think the way I have already described it above is pretty clear with respect to the "outboundproxy" feature.  

I think sip proxy is both directions where "host" and "sip_proxy" are the same thing.  Outboundproxy is a situation where the outbound connection is not the same as the registration domain (host).  Also I think there are 2 parts to that.  The registration part which is the part I was referring to.  Then there is the inbound part after registration.  That then needs a separate inbound route as that existing description sort of refers to.

By: Rusty Newton (rnewton) 2015-12-09 21:04:05.171-0600

I think I understand what you are saying. In that case I recommend writing up a separate example for your patch that uses the outboundproxy scenario.

By: Asterisk Team (asteriskteam) 2015-12-24 12:00:18.507-0600

Suspended due to lack of activity. This issue will be automatically re-opened if the reporter posts a comment. If you are not the reporter and would like this re-opened please create a new issue instead. If the new issue is related to this one a link will be created during the triage process. Further information on issue tracker usage can be found in the Asterisk Issue Guidlines [1].

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines