Table of Contents

Freeswitch and Sipgate-Team Trunking

Just a quickie and not really Apollo related but it took me a while to figure out how to implement Sipgate-Team trunks into Freeswitch, since the wiki only covers the single user sipgate accounts:

conf/sip-profiles/external/sipgate-team-trunk.xml

<include>
 <gateway name="sipgate-team-trunk">
  <param name="proxy" value="sipconnect.sipgate.de"/>
  <param name="outbound-proxy" value="sipconnect.sipgate.de"/>
  <param name="register-proxy" value="sipconnect.sipgate.de"/>
  <param name="username" value="1234567t0"/>
  <param name="auth-username" value="1234567t0"/>
  <param name="from-user" value="1234567t0"/>
  <param name="from-domain" value="sipconnect.sipgate.de"/>
  <param name="password" value="654321"/>
  <param name="ping" value="25"/>
  <param name="context" value="public"/>
  <param name="register" value="true"/>
  <param name="register-transport" value="udp"/>
 </gateway>
</include>

conf/vars.xml

<X-PRE-PROCESS cmd="set" data="default_provider=sipgate-team-trunk"/>

conf/dialplan/sipgate-outbound.xml

In order to get valid outgoing CID's sipgate needs another header:

<include>

  <extension name="sipgate-outbound">
    <condition field="destination_number" expression="^(\d+)$">
      <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/>
      <!-- <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/> -->
      <action application="set" data="sip_h_P-Preferred-Identity=sip:${outbound_caller_id_number}@sipconnect.sipgate.de"/>
      <!-- <action application="bridge" data="sofia/gateway/${default_gateway}/$1"/> -->
      <action application="bridge" data="{sip_cid_type=pid}sofia/gateway/${default_gateway}/$1"/>
    </condition>
  </extension>

</include>

Where ${outbound_caller_id_number} is defined in the directory as 491234567890 without a + or 00.

If you're having trouble to connect to sipconnect.sipgate.de and get some DNS (503) or Authentication Error Messages (401) while trying to REG, make sure you have IPv6 disabled locally, since sipgate's v6 configuration is really broken :(