Skip to navigation

SIP connection

Use a SIP trunk to connect your own PBX, SBC, or voice gateway to Cloud Call Center. Calls from your PBX enter a call flow. Calls that agents dial leave through your PBX.

Hams support gives you the address of the Hams SIP server and the media port range. These values are not in this documentation.

Choose the connection type

A site-to-site IPsec tunnel runs between your firewall and Hams. SIP messages and media travel inside the tunnel. Choose this type if your PBX is on a private network or has no public IP address. For the tunnel, see IPsec VPN.

Your PBX ── Your firewall ══ IPsec tunnel ══ Hams ── Hams SIP server

Ports

Open these ports between your PBX and Hams in both directions. Inside a VPN, open them in the tunnel.

TrafficProtocol and port
SIPUDP or TCP 5060
SIP over TLSTCP 5061
Media (RTP)UDP, in the port range that Hams support gives you

The media does not use the SIP port. Open the whole media port range.

Set up the trunk

1

Ask for a SIP domain

Hams support creates and changes the SIP domains. Ask Hams support to add a domain for your account. See SIP domains.

2

Add the trunk

Go to Settings › Trunks. Click Create Trunk. Enter the Host, the Port, and the Transport of your PBX. Select the Direction. See Trunks.

3

Add the IP address of your PBX

For inbound calls, enter the IP address from which your PBX sends SIP in Allowed source CIDRs. Over a VPN, use the address inside the tunnel. The system accepts calls on the trunk only from these addresses. If the IP address of your PBX changes and Host is a host name, turn on Track carrier IP via DNS.

4

Set the credentials

If your PBX needs the call center to register, turn on Register. Enter the Auth username, the Auth secret, and the Auth realm.

5

Check the connection

Your PBX must answer SIP OPTIONS requests. Turn on Monitor connection (SIP OPTIONS keepalive). Wait for the Connection column to show Online. The setting has no effect on an Inbound trunk.

6

Map your numbers

Add each number that must reach Cloud Call Center as a DID. To send a whole block of numbers to one flow, add a number block. Attach a published call flow to it. See DIDs.

7

Decide if you trust the headers

If your PBX sends the correct caller in P-Asserted-Identity, turn on Trust identity headers. Turn it on only for a PBX that you trust. See Trunks.

8

Add an outbound route

For outbound calls, add an outbound route that uses the trunk. See Outbound routes.

How the system checks a trunk

The system sends a SIP OPTIONS request to your PBX every 30 seconds. It marks the trunk Unreachable after 3 failed requests. It marks the trunk Online again after 3 good answers. A 2xx answer or a 401 answer counts as good.

If Register is on, the system asks for a registration time of 3600 seconds and renews the registration before it expires.

If your PBX answers an outbound call with a digest challenge, the system answers it one time with the credentials of the trunk. If your PBX challenges again, the call fails with SIP 503.

Call limits and codecs

Use Max inbound channels and Max outbound channels to limit the calls at the same time. At the limit, the trunk rejects the call with SIP 503.

Use Codecs to limit the audio codecs. If your PBX offers none of the listed codecs on an inbound call, the trunk rejects the call with SIP 488. The trunk does not convert one codec to another. The system always keeps DTMF (telephone-event).

Call path

Inbound call

  1. The caller dials one of your numbers.
  2. Your carrier or voice gateway delivers the call to your PBX.
  3. Your PBX sends a SIP INVITE to Hams over the trunk.
  4. The system checks the source IP address against Allowed source CIDRs. If the address is not on the list, the system rejects the call with 403.
  5. The system finds the DID. A DID for a single number goes before a number block. If the number is not a DID, the system rejects the call with 404.
  6. If Trust identity headers is on, the system takes the caller from P-Asserted-Identity. It also reads who forwarded the call.
  7. The call enters the call flow of the DID.

Outbound call

  1. An agent dials a number in the softphone.
  2. The system finds the outbound route that matches the number.
  3. The system sends the call over the trunk of the route to your PBX.
  4. Your PBX places the call to the callee.