<div dir="ltr">Greetings list, <div><br></div><div>I am trying to make a TLS gateway working with  my freeswitch. But it fails with Service Unavailable [503]. Though I am perfectly able to make TLS calls between phones. Only gateway is not working. I am populating gateway configuration using lua.</div><div><br></div><div>Below is my profile and gateway configuration. </div><div><br></div><div><div><?xml version="1.0" encoding="UTF-8" standalone="no"?></div><div><document type="freeswitch/xml"></div><div>        <section name="configuration"></div><div>                <configuration name="sofia.conf" description="sofia Endpoint"></div><div>                        <global_settings></div><div>                                <param name="log-level" value="0"/></div><div>                                <param name="debug-presence" value="0"/></div><div>                        </global_settings></div><div>                        <profiles></div><div>                                <profile name="external"></div><div>                                        <aliases></div><div>                                        </aliases></div><div>                                        <gateways></div><div>                                                <gateway name="ab345b4c-b961-4d3a-97a9-f227b52a7240"></div><div>                                                        <param name="username" value="<a href="mailto:admin@pbx.primaryline.com.au">admin@pbx.primaryline.com.au</a>"/></div><div>                                                        <param name="password" value="XXXXXXXXXXX"/></div><div>                                                        <param name="from-domain" value="<a href="http://pbx01.primaryline.com.au">pbx01.primaryline.com.au</a>"/></div><div>                                                        <param name="proxy" value="203.134.5.10"/></div><div>                                                        <param name="expire-seconds" value="800"/></div><div>                                                        <param name="register" value="true"/></div><div>                                                        <param name="register-transport" value="tls"/></div><div>                                                        <param name="contact-params" value="transport=tls"/></div><div>                                                        <param name="retry-seconds" value="30"/></div><div>                                                        <param name="context" value="public"/></div><div>                                                        <variables></div><div>                                                        </variables></div><div>                                                </gateway></div><div>                                        </gateways></div><div>                                        <domains></div><div>                                                <!-- indicator to parse the directory for domains with parse="true" to get gateways--></div><div>                                                <!--<domain name="$${domain}" parse="true"/>--></div><div>                                                <!-- indicator to parse the directory for domains with parse="true" to get gateways and alias every domain to this profile --></div><div>                                                <!--<domain name="all" alias="true" parse="true"/>--></div><div>                                                <domain name="all" alias="false" parse="false"/></div><div>                                        </domains></div><div>                                        <settings></div><div>                                                <param name="caller-id-type" value="pid"/></div><div>                                                <param name="sip-trace" value="no"/></div><div>                                                <param name="sip-capture" value="no"/></div><div>                                                <param name="rfc2833-pt" value="101"/></div><div>                                                <param name="sip-port" value="5080"/></div><div>                                                <param name="dialplan" value="XML"/></div><div>                                                <param name="context" value="public"/></div><div>                                                <param name="dtmf-type" value="rfc2833"/></div><div>                                                <param name="dtmf-duration" value="2000"/></div><div>                                                <param name="inbound-codec-prefs" value="G7221@32000h,G7221@16000h,G722,PCMU,PCMA,GSM"/></div><div>                                                <param name="outbound-codec-prefs" value="PCMU,PCMA,GSM"/></div><div>                                                <param name="hold-music" value="local_stream://default"/></div><div>                                                <param name="zrtp-passthru" value="true"/></div><div>                                                <param name="rtp-timer-name" value="soft"/></div><div>                                                <param name="local-network-acl" value="localnet.auto"/></div><div>                                                <param name="manage-presence" value="false"/></div><div>                                                <param name="inbound-codec-negotiation" value="generous"/></div><div>                                                <param name="nonce-ttl" value="60"/></div><div>                                                <param name="auth-calls" value="false"/></div><div>                                                <param name="rtp-ip" value="124.40.187.231"/></div><div>                                                <param name="sip-ip" value="124.40.187.231"/></div><div>                                                <param name="ext-rtp-ip" value="124.40.187.231"/></div><div>                                                <param name="ext-sip-ip" value="124.40.187.231"/></div><div>                                                <param name="rtp-timeout-sec" value="300"/></div><div>                                                <param name="rtp-hold-timeout-sec" value="1800"/></div><div>                                                <param name="tls" value="true"/></div><div>                                                <param name="tls-only" value="false"/></div><div>                                                <param name="tls-bind-params" value="transport=tls"/></div><div>                                                <param name="tls-sip-port" value="5081"/></div><div>                                                <param name="tls-cert-dir" value="/etc/freeswitch/ssl"/></div><div>                                                <param name="tls-passphrase" value=""/></div><div>                                                <param name="tls-verify-date" value="true"/></div><div>                                                <param name="tls-verify-depth" value="2"/></div><div>                                                <param name="tls-verify-in-subjects" value=""/></div><div>                                                <param name="tls-version" value="tlsv1"/></div><div>                                                <param name="debug" value="0"/></div><div>                                                <param name="user-agent-string" value="FreeSWITCH"/></div><div>                                        </settings></div><div>                                </profile></div><div>                        </profiles></div><div>                </configuration></div><div>        </section></div><div></document></div></div><div><br><br>Here is my 'sofia status' output.<br><br><br><div><a href="mailto:freeswitch@pbx.primaryline.com.au">freeswitch@pbx.primaryline.com.au</a>> sofia status</div><div>                     Name          Type                                       Data      State</div><div>=================================================================================================</div><div>            external-ipv6       profile                   sip:mod_sofia@[::1]:5080      RUNNING (0)</div><div>            external-ipv6       profile                   sip:mod_sofia@[::1]:5081      RUNNING (0) (TLS)</div><div>                 external       profile          <a href="http://sip:mod_sofia@124.40.187.231:5080">sip:mod_sofia@124.40.187.231:5080</a>      RUNNING (0)</div><div>                 external       profile          <a href="http://sip:mod_sofia@124.40.187.231:5081">sip:mod_sofia@124.40.187.231:5081</a>      RUNNING (0) (TLS)</div><div>external::ab345b4c-b961-4d3a-97a9-f227b52a7240  gateway   sip:admin@pbx.primax.com.au@<a href="http://203.134.5.10">203.134.5.10</a>      FAIL_WAIT</div><div>            internal-ipv6       profile                   sip:mod_sofia@[::1]:5060      RUNNING (0)</div><div>            internal-ipv6       profile                   sip:mod_sofia@[::1]:5061      RUNNING (0) (TLS)</div><div>                 internal       profile          <a href="http://sip:mod_sofia@124.40.187.231:5060">sip:mod_sofia@124.40.187.231:5060</a>      RUNNING (0)</div><div>                 internal       profile          <a href="http://sip:mod_sofia@124.40.187.231:5061">sip:mod_sofia@124.40.187.231:5061</a>      RUNNING (0) (TLS)</div><div>=================================================================================================</div> </div><div><br></div><div>I am really stuck here, google search is leading me nowhere. </div><div><br></div><div>Any pointer/suggestion is much  appreciated. </div><div><br></div><div>Thanks. </div></div>