Howto:How to Connect to a VoIP Provider

From innovaphone wiki
Revision as of 13:54, 25 February 2015 by Sga (talk | contribs) (→‎Diagnostics)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Abstract

This document is intended to help you to connect your innovaphone PBX to a VoIP provider.

PBX Trunk Object

Add a trunk object to your PBX. Assign a trunk prefix and a talking name (e.g. "QSC.de").

Example: Trunk object.png

Gateway Interfaces

Most of the VoIP providers require a registration to make and receive calls. Go to Gateway/Interfaces and select one of the four SIP interfaces.

External Registration at the SIP provider

  • Give it a descriptive name into Name (e.g. "QSC.de").
  • Enter your registration ID into ID (e.g. "07031209XXX").
  • Enter the SIP provider's domain name into right side of @ (e.g. "sip.qsc.de").
  • If the SIP provider's domain name cannot be resolved into an IP address by means of DNS, you must enter the provider's IP address manually into Server Address (primary).
  • If authorization is required by the SIP provider, enter the username and password into Username and Password. In most cases the authentication username is identical to the registration ID.
  • Depending on whether your Gateway device has a local public IP address or not, you must configure a STUN server in order to setup voice calls with the SIP provider. See section "NAT Problems" for further information.
  • Media Proprieties - allow us to set which coders we prefer, some extra features like use of T.38 and SRTP and also possibility to enable Media-Relay necessary with some SIP Providers to avoid Media-Negotiation problems.
  • SIP Interop Tweaks - are options that can affect how the SIP Invite Header it's done, usually we leave as default but some SIP Providers could require any of this tweaks.

Example: Sip config.png

Internal Registration at the innovaphone PBX

  • Enter the IP address of your innovaphone PBX into Gatekeeper Address.
  • Enter the PBX name into Gatekeeper ID.
  • Enter the registration name of the PBX's trunk object into Name (e.g. "QSC.de").

Routing and Mapping

Routes to forward calls between the internal and the external registration are added automatically.

You must add number mappings as usual in order to:

  • add the external trunk prefix number to the calling party number on outbound calls
  • remove the external trunk prefix number from the called party number on inbound calls

NAT Problems

You must declare all private IP addresses which are involved in your VoIP scenario here: Reference:Configuration/IP/Settings. Make sure not to forget to include all loopback addresses (e.g. 127.0.0.1) used for internal registration at the PBX!

Example: Private addr config.jpg

Background

By default the Gateway is working in transit mode. This means RTP addresses are going to be exchanged between the communication endpoints. If calls are established between an internal endpoint (with private IP address) and the VoIP provider (with public IP address) the private RTP address of the internal endpoint will be passed-through to the VoIP provider.
A VoIP provider cannot send to private RTP addresses!

A media relay mode has been implemented to get RTP working in this scenario. In media relay mode the Gateway does not pass-through private RTP addresses to the VoIP provider. It allocates local RTP ports instead and forwards RTP between the internal and the external endpoint.

If the Gateway itself does not have a public IP address (check your IP configuration), it still will announce a private RTP address to the VoIP provider even in media relay mode. In this case you must use a STUN server to create NAT mappings at your local NAT router. Using a STUN server is not necessary if your Gateway has a public local IP address.

The Gateway and the PBX will automatically work in media relay mode on connections between private and non-private endpoints. You must declare all private IP addresses (Reference:Configuration/IP/Settings). If no private IP addresses are declared (default) all IP addresses will be interpreted as public (non-private) by the Gateway/PBX and transit mode will be applied.

Diagnostics

Registration Problems

If the external registration comes up, you'll see the SIP provider's IP address beside the SIP provider's domain name. Sip if up.png

If the external registration does not come up, check IP routing, DNS configuration, registration ID, username and password.

Signaling and NAT Problems

Make sure that both registrations (external and internal) are up. Check your NAT configuration. Your NAT router must support "Full Cone NAT" to be "VoIP-Ready" (RFC 3489).

Starting with v10SR15, STUN will additionally work also for routers with restricted cone NAT and port restricted cone NAT.

Additionally please check also this wiki article: Support:SIP_Media_channel_problems_caused_by_NAT_Routers.

To find out what type of NAT router is installed, you can use a 3rd party command-line tool.

Media Problems

Setup a call between an internal endpoint and the VoIP provider.
Check the call views of Gateway and PBX while the call is connected.
The Gateway should work in media relay mode ("RELAY").
The PBX should work in transit mode ("TRANSIT").