Skip to main content

Asterisk FreePBX

A free software SIP server with flexible functionality

Installing Asterisk FreePBX​

  1. Download Asterisk FreePBX using this link.
Note
  • The distribution is an .iso image file containing the Linux operating system and Asterisk.
  1. Use the instructions for installation.

Configuring Asterisk FreePBX​

  1. Open the Asterisk server's web interface using the server IP address specified during installation. Click "FreePBX Administration".

SIP_Asterisk00.png

  1. Enter the administrator login and password.

SIP_Asterisk01.png

  1. The Asterisk server's administration dashboard opens.

SIP_Asterisk02.png

  1. In the "Applications" menu, click "Extensions".

SIP_Asterisk03.png

  1. In IP telephony, extensions are unique internal numbers used for calls. They include SIP numbers in an intercom network.

Create a SIP subscriber by clicking "+ Add New PJSIP Extension" or "+ Add New Chan_SIP Extension".

SIP_Asterisk04.png

  1. Set the SIP subscriber's basic parameters.

SIP_Asterisk05.png

  • User Extension: SIP number,
  • Display Name: Caller ID identifier,
  • Secret: password.
  1. If necessary, enable voicemail on the "Voicemail" tab. Set a password using digits only.

If a SIP subscriber misses a call, the answering machine offers to record a voice message after the tone. The SIP subscriber can then listen to voicemail by dialing *97 123456 or *98 990 123456, where 123456 is the voicemail password and 990 is the SIP number.

Note
  • If you set Require From Same Extension to No, you only need to dial *97 (without a password) to listen to voicemail.

SIP_Asterisk06.png

  1. On the "Find Me/Follow Me" tab, you can enable and configure call forwarding to several other SIP numbers. Calls are forwarded if the current SIP number is unreachable or does not answer for an extended period.

SIP_Asterisk07.png

  • Initial Ring Time: the duration of the initial attempt to call the main SIP number,
  • Ring Strategy: the forwarding strategy:
    • ringallv2 - ring the main number for Initial Ring Time, then ring all numbers for Ring Time without disconnecting the main number,
    • ringall - ring the main number, then disconnect it and ring all numbers,
    • hunt - ring each number in the list in sequence,
    • memoryhunt - ring the first number in the list, then the first and second numbers, then the first, second, and third numbers, and so on.
    • firstavailable - ring the first available number,
    • firstnotonphone - ring only the first number that is on hook,
    • -prim - the same strategies, but no forwarding takes place if the main number is busy.
  • Ring Time: the ringing duration during forwarding,
  • Follow-Me List: the list of forwarding numbers.
  1. On the "Advanced" tab, check the context: from-internal. Then click "Submit" in the lower-right corner to save the SIP subscriber.

SIP_Asterisk08.png

  1. You can create several SIP subscribers this way. Then click the red "Apply Config" button in the upper-right corner to apply all changes to the Asterisk server.

SIP_Asterisk09.png

  1. You can also configure push notifications for control panels with the i3 pro app minimized. Use these instructions to do this.

Working in iRidi Studio​

  1. Add and configure the driver as shown in the image below.

SIP_Asterisk10.png

Configuring a video intercom​

Configure the video intercom in the same way as the SIP driver in iRidi Studio, but use a different SIP ID (Login ).

Instructions for configuring specific video intercom models are available here.

Configuring call attempts for Asterisk​

  1. Check the context name - from-internal.

ContecstName.jpg

  1. Add the following lines to the from-internal context in extensions.conf:

Asterisk_recall.png

;----------------------------------------------------------------------

; start
; если получил входящий звонок от 2ХХХ, то установи значение переменной nDialIteration=0
exten => _2XXX,1,Set(nDialIteration=0)
; сделай Ringing
exten => _2XXX,2,Ringing()

; dial
; сделать звонок на номер EXTEN (номер того, куда звонят)
exten => _2XXX,n(dial),Dial(PJSIP/${EXTEN}, 10, t)
; если ANSWER, то перейди к enofcall
exten => _2XXX,n,GotoIf($["${DIALSTATUS}"="ANSWER"]?endofcall)
; если NOANSWER, то перейди к redial
exten => _2XXX,n,GotoIf($["${DIALSTATUS}"="NOANSWER"]?redial)
; если CANCEL, то перейди к enofcall
exten => _2XXX,n,GotoIf($["${DIALSTATUS}"="CANCEL"]?endofcall)
; если BUSY, то перейди к enofcall
exten => _2XXX,n,GotoIf($["${DIALSTATUS}"="BUSY"]?endofcall)
; если CONGESTION, то перейди к redial
exten => _2XXX,n,GotoIf($["${DIALSTATUS}"="CONGESTION"]?redial)
; если CHANUNAVAIL, то перейди к redial
exten => _2XXX,n,GotoIf($["${DIALSTATUS}"="CHANUNAVAIL"]?redial)

; redial
; инкремент переменной nDialIteration на +1
exten => _2XXX,n(redial),Set(nDialIteration=$[${nDialIteration}+1])
; подожди 1 сек
exten => _2XXX,n,Wait(1)
; если значение переменной =30, то делай endofcall, иначе делай dial
exten => _2XXX,n,GotoIf($["${nDialIteration}"="30"]?endofcall:dial)

; call end
; завершить звонок
exten => _2XXX,n(endofcall),Hangup()

Demo project​

Tip

Download the demo project

You can run the Panel Project in the emulator.