Applies to VoipNow 3 and higher! |
This article describes the steps to take when you want to create a Service Provider template, which you will need for setting up a new SIP channel in VoipNow.
VoipNow lets you simplify the SIP channel configuration with the help of a SIP Provider Template. These templates are XML files that encapsulate specific settings required to easily set up the channel connection with a particular service provider, desired by the customer. The system administrators can upload to the interface the XML files for the desired providers. This way administrators do not have to manually fill in all the details or to update them in time, as VoipNow periodically runs a cron script that checks the vendor's website (4psa.com) for the latest versions of the configuration files for the certified providers.
4PSA verifies and certifies the providers in order to offer you secure and reliable communication options for your company. The providers are grouped based on the certification level (Platinum, Gold, Silver, None) and the list is continuously updated.
Before you start, you need to make sure you have the following:
The provider template is basically a XML file that contains configuration information about a specific provider and the way the SIP channel set up based on this template will behave.
VoipNow offers you two ways to define and use the provider templates:
All the provider templates must respect the default file structure, as explained in this example and in VoipNow User's Guide.
Here are the steps to take:
<provider-template> </provider-template>
tags.First, set the UUID that identifies the template, for example 0062001
:
<provider-template uuid="0062001"> . . . </provider-template>
When a user uploads a certificate, the system checks two things:
Silver
or Gold
. Else, it is set to None
.When the cron script updates the entries, the Certification level will be changed as required (e.g. to Silver
or to Gold
).
<provider> </provider>
tags, as shown below.<provider> <!-- Name of the provider (as it appears in the VoipNow interface) --> <name>Foo Telecom</name> <!-- Certification level, requires signing by 4PSA --> <certification>Silver</certification> <!-- Provider's website --> <website>http://www.foo.com</website> <!-- List of countries where the provider is active - at least one is required. --> <active-countries> <!-- List countries, code ISO 3166 - for this example, two countries are considered, UK and NL --> <country>UK</country> <country>NL</country> </active-countries> <!-- A short description about the provider --> <description>Test provider for UK and NL</description> </provider>
<channel> </channel>
tags are the ones specific to a SIP channel and can also be manually configured from the interface. Not all the tags presented below are mandatory.<channel> <!-- VoipNow send calls to Hostname/IP --> <hostname visible="1">168.14.14.99</hostname> <!-- VoipNow send calls to Port --> <port visible="1">693</port> <!-- VoipNow accepts calls from IPs/network --> <acceptips visible="1"> <ip>169.20.11.11</ip> <ip>192.166.66.66</ip> </acceptips> <!-- Username to connect to provider --> <username visible="1">username</username> <!-- Password to connect to provider --> <password visible="1">password</password> <!-- Do not register with provider, the VoipNow IP is authenticated instead --> <donotregister visible="1">1</donotregister> <!-- Authorization username --> <authorization-username visible="1">authusername</authorization-username> <!-- Concurrent calls (outgoing + incoming), usually should not be included in template --> <concurrent-calls visible="1">35</concurrent-calls> <!-- Charging plan, usually should not be included in template --> <charging-plan visible="1">free</charging-plan> <!-- Channel capabilities, usually should not be included in template --> <flow-capable visible="1">1</flow-capable> <!-- DTMF mode --> <dtmf visible="1">rfc2833</dtmf> <!-- Behind NAT --> <nat visible="1">0</nat> <!-- CallerID --> <callerid visible="1">0422</callerid> <!-- From user --> <from-user visible="0"></from-user> <!-- From domain --> <from-domain visible="1">144.369.21.44</from-domain> <!-- Authorization extension --> <auth-extension visible="0"></auth-extension> <!-- Get DID from custom header --> <did-header visible="0"></did-header> <!-- Qualify, send SIP:Options to provider periodically --> <qualify visible="1">100</qualify> <!-- Prefix all calls with --> <prefix visible="0"></prefix> <!-- Trusted channel --> <trust visible="0"></trust> <!-- Trust Remote-Party-ID SIP header --> <trust-rpid visible="0"></trust-rpid> <!-- Send Remote-Party-ID SIP header --> <send-rpid visible="0"></send-rpid> <!-- Session timers --> <session-timers visible="1">Accept</session-timers> <!-- Session refresh interval --> <session-refresh visible="1">180</session-refresh> <!-- Minimum session refresh interval --> <min-session-refresh visible="1">60</min-session-refresh> <!-- Session refresh source --> <refresh-source visible="1">UAS</refresh-source> <!-- Codecs: g723, ulaw, alaw, gsm, g726, slin, g729, speex, ilbc, lpc10, h261, h263, h263p, g726aal2, h264, g722 --> <permit-codecs visible="1"> <!-- Codecs list --> <codec>gsm</codec> <codec>g726</codec> <codec>slin</codec> </permit-codecs> <!-- Use MD5 --> <md5 visible="1">1</md5> </channel>
The visibility variable specifies if the field will be displayed in the interface or not. When the value is set to 0, the option can still be managed, but only after clicking the Channel Preferences - Reveal All Fields link available in the Channels >> Add SIP channel page.
<label> </label>
tags:<label> <!-- Code of the channel parameter, as defined above --> <trust> <locale code="en_US"> <pre-label>PRE EN</pre-label> <post-label>POST EN</post-label> </locale> <locale code="ro_RO"> <pre-label>PRE RO</pre-label> <post-label>POST RO</post-label> </locale> </trust> <min-session-refresh> <!-- What is displayed before the field value, if empty, the VoipNow Professional default value is used --> <pre value="IETF language tag">Hello</pre> <!-- What is displayed after the field value, has precedence over the VoipNow Professional values even if it is empty --> <post value="IETF language tag">world</post> </min-session-refresh> . . . </label>
Silver
or as Gold
. The signature content must be included between the <signature> </signature>
tags:<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:SignedInfo> <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> <ds:Reference> <ds:Transforms> <ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig# enveloped-signature"/> </ds:Transforms> <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig# sha1"/> <ds:DigestValue>2ofDWFo5K24zTp8fs0b4Fzl+X/4=</ds:DigestValue> </ds:Reference> </ds:SignedInfo> <ds:SignatureValue>nUcF/6qtlpDk4TFEl79kF2aASZSJQtqrGF1UcqR5UM+aCMcc Ve8Vdjc6kb3ClGwDB40f6c5Gci1Mb8auOKfGIpFW2x6M6DwKaGQCrsK2GSdigR2rtcn5Bdo72 QhD2T4FpRyoOPZ7yXrv0fC5udFT+02TQmDXxRMqUIX+uFzRNX8=</ds:SignatureValue> <ds:KeyInfo> <ds:X509Data> <ds:X509Certificate>MIICaTCCAdICCQCzngU1YWDilTANBgkqhkiG9w 0BAQUFADB5MQswCQYDVQQGEwJybzENMAsGA1UECBMEYWxiYTEOMAwGA1UEBxMFY3 VnaXIxDTALBgNVBAoTBGxpYXMxDTALBgNVBAsTBGxpYXMxEDAOBgNVBAMTB2xpYX Mucm8xGzAZBgkqhkiG9w0BCQEWDGxpYXNAbGlhcy5ybzAeFw0xMTAxMDUxMjMxMj RaFw0xMjAxMDUxMjMxMjRaMHkxCzAJBgNVBAYTAnJvMQ0wCwYDVQQIEwRhbGJhMQ 4wDAYDVQQHEwVjdWdpcjENMAsGA1UEChMEbGlhczENMAsGA1UECxMEbGlhczEQMA 4GA1UEAxMHbGlhcy5ybzEbMBkGCSqGSIb3DQEJARYMbGlhc0BsaWFzLnJvMIGfMA 0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDYxCgqKvQxQDeIVm0ghzTTLxC2BnqlUd 5N5phYzlsGAPpwwavzP2INaHGSVqzSadNwEqTvBOrh4Q0mvAimy3gJCCKxVlIAG GaFHaVmUW7FuSMV/E0ZFcL1gtxPkMExykt9zed4q+JhtWAjQiBRHo5NcGK/QvX4B hzL96abaayRsQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAD5YBI0Hr0CGIbajU4bmt c8xObmOZ2SM2OF/llHRvyPk2w9AeM9g3e95sAExnSZWg2vviEKOHm2N0Y0FV4VuR X3q1iEq87YJ7G8XYLbT5dlebi2B0kiPgSSZkPwsJlNLfsAwUR/H63bPGKHSL5ye+ jZeivXgpErhKWEP95Do4l/Y</ds:X509Certificate> </ds:X509Data> </ds:KeyInfo> </ds:Signature>
The XML template should be signed according to the XML Signature Syntax and Processing standard.
.xml
file (e.g. foo_telecom.xml
).Now that you have defined the preferences for your desired provider, in our example Foo Telecom
, and the behavior of the SIP channel that will used to communicate with this provider, you can upload the template from the VoipNow web interface:
If the file you are trying to upload does not match the default provider template structure, then it will not be saved to the database. A warning message like the one below will be displayed:
Failed to upload the new template. |