Page tree

This page contains explanations to help you better understand the SIP provider template.

Overview

The provider template is basically a XML file that contains configuration information about the specific provider and about how the SIP channels set up based on this template will behave.

VoipNow offers three ways to define and use the provider templates:

  • use one of the available predefined provider templates that are designed for providers certified by the vendor (4PSA, in this case)
  • download one of the available predefined templates, modify its content to meet your requirements, and upload it in the system as a new provider template
  • access the special customization form available on the website, fill in the desired parameters, and we will generate an XML file that you can save on your machine and upload it in VoipNow as shown in the Add Template section

The provider XML file includes the tags described below.

Tags

The XML template should be signed according to the XML Signature Syntax and Processing standard.

Provider template tag

The UUID that identifies each provider template is contained between the <provider-template> </provider-template> tags. When a user uploads a certificate that has an UUID identical with one from a certified provider, the Certification level is set to None. When the cron script updates the entries, the certification level will be changed to as required (e.g. to Silver or to Gold).

<provider-template uuid="333333">
.
.
.
</provider-template>

Provider tag

The <provider> </provider> tags contain general information about the service provider.

<provider>
  <!-- Name of the provider (as it appears in the VoipNow <name>BestProvider</name>
  <!-- Certification level, requires signing by 4PSA -->
  <certification>Silver</certification>
  <!-- Provider's website -->
  <website>http://www.bestprovider.net</website>
  <!-- List of countries where the provider is active - at least one <active-countries>
    <!-- List countries, code ISO 3166 -->
    <country>UK</country>
    .
    .
    .
  </active-countries>
  <description>The provider description</description>
</provider>

The <channel> </channel> tags contain technical information about how the channels should be configured for that service provider. All options are specific to a SIP channel that can also be manually configured from the interface. Not all the tags presented below are mandatory. All fields, visible or not, can be edited. The visibility variable specifies if the field will be visible in the interface. If the value is set to 0, then the field can still be seen, but only after expanding the Channel Preferences - Reveal All Fields fieldset in the channel configuration page. For more details, see the Add a SIP Channel section.

<channel>

    <!-- VoipNow send calls to Hostname/IP -->
    <hostname visible="1/0"></hostname>
  
    <!-- VoipNow send calls to Port -->
    <port visible="1/0"></port>
  
    <!-- VoipNow accepts calls from IPs/network -->
    <acceptips visible="1/0">
   
      <!-- IPs list -->
     <ip></ip>
     .
     .
    </acceptips>
   
    <!-- Username to connect to provider -->
    <username visible="1/0"></username>

    <!-- Password to connect to provider -->
    <password visible="1/0"></password>

    <!-- Do not register with provider, the VoipNow IP 
    <donotregister visible="1/0">0/1</donotregister>
   
    <!-- Authorization username -->
    <authorization-username visible="1/0"></authorization-username>

    <!-- Concurrent calls (outgoing + incoming), usually should not 
    <concurrent-calls visible="1/0"></concurrent-calls>

    <!-- Charging plan, usually should not be included in template 
    <charging-plan visible="1/0">free/paid</charging-plan>
 
    <!-- Channel capabilities, usually should not be included in template 
    <flow-capable visible="1/0">incoming/outgoing/both</flow-capable>

    <!-- DTMF mode -->
    <dtmf visible="1/0">rfc2833/inband/info/auto</dtmf>

    <!-- Behind NAT -->
    <nat visible="1/0">0/1</nat>

    <!-- CallerID -->
    <callerid visible="1/0"></callerid>

    <!-- From user -->
    <from-user visible="1/0"></from-user>

    <!-- From domain -->
    <from-domain visible="1/0"></from-domain>

    <!-- Authorization extension -->
    <auth-extension visible="1/0"></auth-extension>

    <!-- Get DID from custom header -->
    <did-header visible="1/0"></did-header>

    <!-- Qualify, send SIP:Options to provider periodically -->
    <qualify visible="1/0">0(none)/100........3000</qualify>

    <!-- Prefix all calls with -->
    <prefix visible="1/0"></prefix>

    <!-- Trusted channel -->
    <trust visible="1/0"></trust>

    <!-- Trust Remote-Party-ID SIP header -->
    <trust-rpid visible="1/0"></trust-rpid>

    <!-- Send Remote-Party-ID SIP header -->
    <send-rpid visible="1/0"></send-rpid>

    <!-- Session timers -->
    <session-timers visible="1/0">accept/originate/refuse</session-<!-- Session refresh interval --><session-refresh visible="1/0"></session-refresh>

    <!-- Session refresh interval -->
    <session-refresh visible="1/0"></session-refresh>

    <!-- Minimum session refresh interval -->
    <min-session-refresh visible="1/0"></min-session-refresh>

    <!-- Session refresh source -->
    <refresh-source visible="1/0"></refresh-source>

    <!-- Codecs: g723, ulaw, alaw, gsm, g726, slin, g729, speex, ilbc, 
    <permit-codecs visible="1/0">

      <!-- Codecs list -->
      <codec></codec>
      .
      .
      .
    </permit-codecs>

    <!-- Use MD5 -->
   <md5 visible="1/0"></md5>
</channel>

Label tag

An optional section that allows to override the labels displayed in the interface without modifying them can be present. If the label is not available for the language the VoipNow interface is rendered in, the default VoipNow labels are used. This information can be found between the <label> </label> tags.

<label>
   <!-- Code of the channel parameter, as defined above -->
   <trust>
     <!-- What is displayed before the field value, if empty, VoipNow 
     <pre value="IETF language tag">Hello</pre>
    
     <!-- What is displayed after the field value, has precedence over 
     <post value="IETF language tag">world</post>
   </trust>
   <min-session-refresh>
     <!-- What is displayed before the field value, if empty, VoipNow 
     <pre value="IETF language tag">Hello</pre>
 
     <!-- What is displayed after the field value, has precedence over 
     <post value="IETF language tag">world</post>
   </min-session-refresh>
   .
   .
   .
</label>

Signature tag

The <signature> </signature> tags contain the signature that is necessary and checked only for certified providers with silver/gold levels.

<signature>
.
.
.
</signature>

SIP signal transport tag

In order for provider templates to support TCP transport on channels, the sip-transport tag must be added to the XML and have the following properties:

  • it can take one of the two values: TCP or UDP
  • it must support the visible attribute
  • it must support localization

Validating this tag requires that you modify the XSD. First, add an element that validates the sip-transport tag of the XML.

<xs:element name="sip-transport" minOccurs="0">
	<xs:complexType>
		<xs:annotation>
			<xs:documentation>SIP signal transport</xs:documentation>
		</xs:annotation>
		<xs:simpleContent>
			<xs:extension base="SipTransportType">
				<xs:attribute name="visible" type="xs:integer"/>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
</xs:element>

Then add an element that validates the labels.

<xs:element name="sip-transport" minOccurs="0">
	<xs:complexType>
		<xs:sequence>
			<xs:element name="locale" minOccurs="0" maxOccurs="unbounded">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="pre-label" type="xs:string"/>
						<xs:element name="post-label" type="xs:string"/>
					</xs:sequence>
					<xs:attribute name="code" type="xs:string"/>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
</xs:element>

Adding the sip-transport parameter to an existing template that is not certified requires that a template with the same UUID is uploaded. If the template is certified, it is automatically updated when the cron script runs.

  • No labels

Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 4.0 International.