Template Provider Custom Question

Alle CTEC

Silver Partner
Advanced Certified
Joined
Sep 11, 2023
Messages
368
Reaction score
47
Hello everyone, I have a problem with a customer who unfortunately geographically can be served by a single operator via radio link, internet services and telephony. Unfortunately the provider is not 3CX certified. The SIP trunk is still authenticated. However, I would need to create a custom template so the preferred codec is ALAW therefore discarded a priori but the following codecs opus, ilbc, g729 are supported. Type of Service SIP (Signaling) DSCP Name: CS5 DF Field Name: 40. RTP DSCP Name: EF DF Field Name: 46

I created this:

XML:
<?xml version="1.0"?>
<doc xmlns:tcx="http://www.3cx.com">
<header>
    <type>gateway-template</type>
    <version>150008</version>
    <time>2024-05-21 16:00:00</time>
    <name>Generic VoIP Provider (Wimore CTEC)</name>
    <url>https://www.3cx.com/partners/sip-trunks/</url>
    <image>default-icon.png</image>
    <logo>default-logo.png</logo>
    <description>AR,AT,AU,BE,BG,BR,CA,CH,CL,CN,CY,CZ,DE,DK,ES,FR,GR,HK,HR,HU,IE,IL,IN,IS,IT,JP,LT,LV,MT,MX,MY,NL,NO,NZ,PE,PL,PT,RO,RU,SE,SG,SI,SK,TH,TR,UA,UK,US,VN,Worldwide,ZA</description>
    <priority>1</priority>
    <tags>registrar,proxy,IpInContactReg,PublicIPVia,SecondaryRegistrar,port,advanced,cert,3wayauth,authtype,geo911</tags>
    <templatetype>thirdparty</templatetype>
    <template>GenericVoIPProvider.pv.xml</template>
</header>
<data>
   <sms>
     <variable name="MESSAGING_API_KEY">
        <title>APIKEY</title>
        <option name="Messaging API key" required="true" maxlength="512" type="textbox"></option>
     </variable>
     <variable name="PROVIDER_URL">
        <title>PROVIDER_URL_KEY</title>
        <option name="Provider URL" required="true" type="textbox"></option>
     </variable>
     <field name="ProviderName" status="readonly">Generic</field>
     <field name="OptionalProvider" status="readonly">1</field>
     <field name="ProviderType" status="readonly">generic</field>
     <field name="OutboundRouting" status="readonly">1</field>
     <field name="HasWebhook" status="readonly">1</field>
   </sms>
   <device>
      <type>provider</type>
      <manufacturer>Generic</manufacturer>
      <model>Provider</model>

      <!-- Friendly Name -->
      <field name="Name">Generic VoIP Provider (Registration)</field>

      <!-- Hostnames and Port Numbers -->
      <field name="RegistrarHost">178.20.72.50</field>                                    <!-- Registrar & Proxy IP / FQDN  -->
      <field name="RegistrarPort">5060</field>                                <!-- Registrar & Proxy Port Number -->
      <field name="ProxyHost"></field>                                        <!-- Proxy IP / FQDN -->
      <field name="ProxyPort">5060</field>                                    <!-- Proxy Port Number -->
      <field name="StunServerHost"></field>                                    <!-- StunServer IP / FQDN -->
      <field name="StunServerPort"></field>                                    <!-- StunServer Port Number -->

      <!-- Registration Settings -->
      <field name="LineAuthenticationPassword" status="readonly"></field>
      <field name="TimeBetweenRegistration">600</field>                        <!-- Registration Expiry -->
      <field name="RequireAuthFor">4</field>                                <!-- No=1; In=2; Out=3; Both=4 -->
      <field name="IpInContactReg">1</field>                                <!-- Ext=1; Int=2; Both=3; Specified=4 -->
      <field name="IpInContactRegValue"></field>                            <!-- List of PBX IPs -->
      <!-- <field name="3wayauthenticationid" status="readonly"></field> -->            <!-- Entry to enable 3 way authentication-->

      <!-- Provider Capabilities -->
      <field name="IsSupportReinvite">1</field>                                <!-- Yes=1; No=0 -->
      <field name="IsSupportReplaces">1</field>                                <!-- Yes=1; No=0 -->
      <field name="DisableVideo">1</field>                                    <!-- Yes=1; No=0 -->
      <field name="RegistrarInvite">1</field>                                <!-- Send INVITE to same IP as REGISTER=1; Resolve FQDN each time for INVITE=0-->

      <!-- Location of Destination Number -->
      <field name="DestNumberIn_TO">1</field>                                <!-- Yes=1; No=0 -->
      <field name="DestNumberIn_REQLINEURI">1</field>                        <!-- Yes=1; No=0 -->
      <field name="DestNumberIn_RPID_CALLED">0</field>                        <!-- Yes=1; No=0 -->

      <!-- Other Options -->
      <field name="IPRestriction">ANY</field>                                <!-- Restricts IPv4 or IPv6. Values: ANY, IPV4, IPV6 -->
      <field name="TransportRestriction">ANY</field>                        <!-- Restricts the Transport Protocol. Values: ANY, UDP, TCP, TLS -->
      <field name="SecondaryRegistrar">178.20.72.52</field>                                <!-- Possible values: FQDN:Port or IP:Port -->
      <field name="IsBindToMS">1</field>                                    <!-- Bound=1; NotBound=0 -->
      <field name="UseIPInContact">0</field>                                <!-- UseIP=1; DoNotUseIP=0 -->
      <field name="CallerIDIn">1</field>                                    <!-- Fm=1; To=2; ReqURI=3; Con=4; RemPtyClg=6 -->
      <field name="CalledNumberIn">2</field>                                <!-- Fm=1; To=2; ReqURI=3; Con=4; RemPtyCld=5 -->

    <codecs>
        <codec rfcname="OPUS" />
        <codec rfcname="ILBC" />
        <codec rfcname="G729" />
    </codecs>

      <!--Source Identification - Use Default PBX Internal Source Identification-->
      <field status="readonly" name="MatchStrategy">0</field>
      <field status="readonly" name="Source" parameter="ContactHost" custom="">$GWHostPort</field>

      <!-- Gateway / Provider Inbound Parameters -->
      <field name="ParameterIn" custom="" parameter="ToUserPart">$CalledNum</field>
      <field name="ParameterIn" custom="" parameter="FromUserPart">$CallerName</field>
      <field name="ParameterIn" custom="" parameter="FromUserPart">$CallerNum</field>

      <!-- Gateway / Provider Outbound Parameters -->
      <field status="readonly" name="ParameterOut" custom="" parameter="RequestLineURIUser">$CalledNum</field>
      <field status="readonly" name="ParameterOut" custom="" parameter="RequestLineURIHost">$GWHostPort</field>
      <field status="readonly" name="ParameterOut" custom="" parameter="ContactUser">$OutboundCallerId</field>
      <field status="readonly" name="ParameterOut" custom="" parameter="ToDisplayName">$CalledName</field>
      <field status="readonly" name="ParameterOut" custom="" parameter="ToUserPart">$CalledNum</field>
      <field status="readonly" name="ParameterOut" custom="" parameter="ToHostPart">$GWHostPort</field>
      <field status="readonly" name="ParameterOut" custom="" parameter="FromDisplayName">$OutboundCallerId</field>
      <field status="readonly" name="ParameterOut" custom="" parameter="FromUserPart">$OutboundCallerId</field>
      <field status="readonly" name="ParameterOut" custom="" parameter="FromHostPart">$GWHostPort</field>
      <field status="readonly" name="ParameterOut" custom="" parameter="RemotePartyIDCallingPartyDisplayName">$OutboundCallerId</field>
      <field status="readonly" name="ParameterOut" custom="" parameter="RemotePartyIDCallingPartyUserPart">$OutboundCallerId</field>
      <field status="readonly" name="ParameterOut" custom="" parameter="RemotePartyIDCallingPartyHostPart">$GWHostPort</field>
      <field status="readonly" name="ParameterOut" custom="" parameter="P-AssertedIdentityDisplayName">$OutboundCallerId</field>
      <field status="readonly" name="ParameterOut" custom="" parameter="P-AssertedIdentityUserPart">$OutboundCallerId</field>
      <field status="readonly" name="ParameterOut" custom="" parameter="P-AssertedIdentityHostPart">$GWHostPort</field>
    </device>
</data>
</doc>


Is there a way to configure the Type of Service parameters?

Furthermore, the provider supports call forwarding by maintaining the caller's number, P-Asserted but if I try to enter $OrginatorCallerID, $OrginatorCallerId, $EnforcedOrginatorCallerID does the template give me an error on the parameter?

Thanks
 
Last edited:
Last edited:
Hi Thanks a lot for the support, then the test is completely green but I can't use $OriginatorCallerID it doesn't accept the option
 
The guide describes the scenario - but if the provider doesn't allow it then you should discuss this with the provider; they may simply not allow it.
 
If I load the template specifying the 3cx option, I get an error telling me that the option is not allowed. If I load the template and then change the option from the 3cx menu and run the test with the report, the option is not shown as $OriginatorCallerID.
 
Where are making the change? Are you importing a template or making a change to the template on the file system? Where do you see the error? Can you send a screenshot?
 
I apologize, until yesterday it gave me an error, today it loads, perhaps I entered a different character, I tried to load it to take the screenshot and it works perfectly
 

Forum statistics

Threads
112,283
Messages
591,700
Members
165,406
Latest member
ARKC