LogoLogo
  • What is Itgrix
  • Contacts
  • Our story
  • Connector installation
    • System requirements
    • Itgrix for Bitrix24 and Asterisk
      • How to perform offline authorization
      • How to obtain a license offline
      • Configuring the connector to work in a closed network
      • Call tests
    • Itgrix for Kommo and Asterisk
      • Restricted mode setting features
      • Call card
      • Call tests
  • Additional functions
    • Automatic call transfer to responsible manager
    • Setting up click-to-call features
      • Features of customization after Bitrix24 23.300.0 update
    • Autoreplacement for phone numbers
    • How to view employee call statistics in Bx24
    • FMC number recognition
    • Configuring WebRTC in Asterisk (FreePBX)
    • Itgrix AsterPhone for Bitrix24
    • Itgrix AsterPhone for Kommo
  • For admins
    • Running an additional copy of the module
    • Deploying a module backup
    • Call processing for the period
    • Examples of the structure of registered calls from CEL
    • Wrong time in created cases in Bitrix24
    • SSH access
    • Useful commands
    • Script to test the module service
    • Changing login and password to enter the admin panel
    • Module files
    • Status monitoring
    • Application update
    • In the CEL table, there is no internal employee number in the cid_num column
    • How to fix click-to-call
    • Custom SSL certificates for https requests
    • Examples of configuring WSS connections
    • Converting recordings to MP3 before sending to Bitrix24
    • How to fix call recording problems
    • Install and configure CEL
    • B24 authorization bugfix
  • Useful customizations (any CRM)
    • Audio file name customization
    • Call data (call_full) in customizations
    • Change the number / context for calling to asterisk
    • Change phone number before sending data to CRM
    • Black and white lists
  • Useful customizations itgrix_bx (Bitrix24)
  • Useful customizations itgrix_kmo (Kommo)
  • FAQ
    • How to pay
    • How to check licence status
    • Differences in connection to B24 via SIP-connector and Itgrix
    • How to turn off the display of calls in the calendar
    • How to view statistics on employee calls
    • Updating the app
    • Offline install (only for Bitrix24)
    • Offline update
    • Reliable softphones for Asterisk
    • Detail-call-statuses
  • Changelog Itgrix_bx
  • Changelog Itgrix_kommo
  • Policy of interaction with Asterisk
Powered by GitBook
On this page
  • Technical requirements
  • Setting
  • Configuring FreePBX
  • Creating and setting up an extension number (extension)
  • Testing that wss works
  • Setting
  • Call
  • Links

Was this helpful?

  1. Additional functions

Configuring WebRTC in Asterisk (FreePBX)

PreviousFMC number recognitionNextItgrix AsterPhone for Bitrix24

Last updated 1 year ago

Was this helpful?

Technical requirements

  • The telephony server must be accessible from the Internet, i.e. it must have a static IP.

  • Must have a working SSL/TLS certificate.

  • Asterisk version not less than 11 (), but for convenience preferably 15 () or at least 13 ().

  • When using browser-based softphone, wss (WebSocket Secure) must be configured on the Asterisk server, and the port must be open to the outside (usually 8089) ().

    This is configured in the admin interface:

    Advanced Settings > Asterisk Builtin mini-HTTP section > HTTPS Bind Port

  • Port range for RTP (typically 10000-20000) ().

    It is configured in the administrator interface:

    Settings → Asterisk SIP Settings → General SIP Settings Tab

Setting

This example describes how to configure WebRTC in an already running FreePBX server:

  • is available at <example>.com and has an SSL/TLS certificate;

  • FreePBX version 16, Asterisk version 15;

  • wss is configured on port 8089;

  • all other relevant ports are open.

Configuring FreePBX

If the "Change To CHAN_PjSIP Driver" button (see below, in the internal number setting) is available, you do not need to do anything in this section.

Settings ➝ Advanced Settings

Section Dialplan and Operational

SIP Channel Driver

both

Settings ➝ Asterisk SIP Settings

Tab “SIP Legacy Settings [chan_sip]”

Verify that the variables are set:

Section Advanced General Settings

Other SIP Settings

icesupport = yes

media_encryption = dtls

tlscipher = AES256-SHA

Creating and setting up an extension number (extension)

Go to the FreePBX configuration interface and log in: https://<example>.com/

Go to section Applications ➝ Extensions

Button “+ Add Extension” ➝ “+ Add New SIP (Legacy) [chan_sip] Extension” (other versions of FreePBX may be “Add New Chan_SIP extension”)

In the tab General:

Section Add Extension

User Extension

1001

Display Name

1001

Press the button Submit

After that, open editing of the newly created extension in the list of extensions (in the line with 5001 in the Actions column, click the edit button with a pencil icon).

Go to the tab Advanced

First change the SIP Driver to PjSIP:

Tab Advanced → Section Edit Extension

Enable WebRTC defaults

Yes

Media Encryption

DTLS-SRTP (not recommended)

Press the button Submit

Then change the SIP Driver back:

Tab Advanced → Section Edit Extension

Change SIP Driver

Change To CHAN_SIP Driver

Now to make the remaining customizations:

Tab Advanced → Section Edit Extension

Transport

All - WSS Primary

Enable AVPF

Yes

Force AVP

Yes

Enable ICE Support

Yes

Enable rtcp Mux

Yes

Enable Encryption

Yes (SRTP only)

Section DTLS

Enable DTLS

Yes (there should be)

Use Certificate

<example>.com

Press the button Submit

Press the button Apply Config

Testing that wss works

Let's use the sipML5 live demo from Doubango as an example:

Setting

First, the "Expert mode?" button.

The advanced settings page should open in the next tab

Disable Video
v (checkmark)

WebSocket Server URL

wss://.com:8089/ws

Press the button Save

Back to the main tab

Display Name
1001

Private Identity

1001

Public Identity

sip:1001@<example>.com

Password

Copy from FreePBX settings

Extension: 1001 ➝ General tab ➝ Edit Extension ➝ Secret

Realm

<example>.com

Button Login

The word Connected should appear at the top above the Registration heading.

Call

Now you can make the call.

Under the Call control heading, dial the desired number (*43 for an echo call or a cell phone number with 8 first).

Press the button Call ➝ Audio

There's a call that should go out.

Profit!

Links

WebRTC support in Asterisk

Initial support for WebRTC in Asterisk starting with version 11:

PjSIP in Asterisk

FreePBX

Configuration examples

New chan_pjsip driver in Asterisk 12:

PjSIP is available by default in Asterisk 15:

https://www.doubango.org/sipml5/call.htm
New in 11 - Asterisk Project - Asterisk Project Wiki
Asterisk WebRTC Support - Asterisk Project - Asterisk Project Wiki
New in 12 - Asterisk Project - Asterisk Project Wiki
PJSIP-pjproject - Asterisk Project - Asterisk Project Wiki
Ports used on your PBX - PBX Platforms - Documentation
Configuring Asterisk for WebRTC Clients
WebRTC clients SIPML5 JSSIP setup configurations and complete end to end client server call demo
?
?
?
?
?