<p>I used http_connect().</p>

<p>When I changed the order of the modparams so that the default proxy config comes before the connection definitions, it worked.</p>

<p>E.g.:</p>

<h1>this works!</h1>

<p>modparam("http_client", "httpproxy", "proxyhost")<br>
modparam("http_client", "httpproxyport", 8181)<br>
modparam("http_client", "httpcon", API_SERVER_A)<br>
modparam("http_client", "httpcon", API_SERVER_B)</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly or <a href="https://github.com/kamailio/kamailio/issues/541#issuecomment-202907525">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZadfgNDsyDb54vEIYJaa06tONRLhks5pyTCKgaJpZM4HufkW.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/kamailio/kamailio/issues/541#issuecomment-202907525"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>