Installation and administration

Warning

Asterisk is not an Atlantis product. All resources and materials are freely available on the official Asterisk website .

You can run Asterisk in many modes, for FrontStage purposes it is commonly used in two of them. First, download and install the product as recommended by the manufacturer. Once complete, you can configure it as a IVR or SBC server.

Note

You may encounter terms like AGI, FastAGI or AMI during installation.

Setup as IVR

SIP Trunk Configuration

More info on SIP trunk.

Edit the pjsip.conf file

  1. Global settings

    [global]
    type=global
    user_agent=AtlantisIVR
    use_callerid_contact=yes
    
    [transport-udp]
    type=transport
    protocol=udp
    bind=0.0.0.0:5060
    tos=cs3
    cos=3
    
  2. “Trunk” - example of basic configuration. In case of IVR, the inbound trunk must be configured.

    1. “Address of Record”

      [Trunk1]
      type=aor
      qualify_frequency=60
      contact=sip:<ip:port/fqdn>
      
    2. “Endpoint”

      [Trunk1]
      type=endpoint
      transport=transport-udp
      ;context=to-pstn-test
      context=<context defined in extensions.conf>
      disallow=all
      allow=alaw,ulaw
      aors=Trunk1
      direct_media=no
      dtmf_mode=auto
      tos_audio=ef
      tos_video=af41
      cos_audio=5
      cos_video=4
      send_connected_line=false
      user_eq_phone=no
      trust_id_inbound=no
      100rel=no
      
    3. Incomming communication identification

      [Trunk1]
      type=identify
      endpoint=Trunk1
      match=<IP/mask>
      

Properties and routing configuration

Settings for recording, call listening, IVR prompts, etc.

Edit the extensions.conf file.

  1. General settings

    [general]
    static=yes
    writeprotect=no
    clearglobalvars=no
    
    [globals]
    System=ProIVR
    FastAgiServerIP = <IP>
    
  2. Default context settings

    [default]
    exten => _<prefix>,1,Goto(iCC,${EXTEN},1)
    exten => _X,1,NOop(${CALLERID(num)})
    same => n,Hangup
    
  3. Setting the context for controlling the Frontstage IVR server

    [iCC]
    exten => _X.,1,Ringing
    exten => _X.,2,Wait(1)
    exten => _X.,3,Answer
    exten => _X.,4,AGI(agi://<FastAgiServerIP>/agi_iCC)
    exten => _X.,5,Hangup
    

Setup as SBC

SIP Trunk Configuration

Edit the pjsip.conf file

  1. Global settings

    [global]
    type=global
    user_agent=AtlantisSBC
    use_callerid_contact=yes
    
    [transport-udp]
    type=transport
    protocol=udp
    bind=0.0.0.0:5060
    tos=cs3
    cos=3
    
  2. “Trunk” - example of basic configuration. In case of SBC, both inbound and outbound trunks must be configured.

    1. “Address of Record”

      [Trunk1]
      type=aor
      qualify_frequency=60
      contact=sip:<ip:port/fqdn>
      
    2. “Endpoint”

      [Trunk1]
      type=endpoint
      transport=transport-udp
      ;context=to-pstn-test
      context=<context definovaný v extensions.conf>
      disallow=all
      allow=alaw,ulaw
      aors=Trunk1
      direct_media=no
      dtmf_mode=auto
      tos_audio=ef
      tos_video=af41
      cos_audio=5
      cos_video=4
      send_connected_line=false
      user_eq_phone=no
      trust_id_inbound=no
      100rel=no
      
    3. Incomming communication identification

      [Trunk1]
      type=identify
      endpoint=Trunk1
      match=<IP/mask>
      

Properties and routing configuration

Settings for recording, call listening, IVR prompts, etc.

Edit the extensions.conf file.

  1. General settings

    [general]
    static=yes
    writeprotect=no
    clearglobalvars=no
    
  2. Recording context

    [call_record]
    exten => _X.,1,NoOp(---------------------------------Start Call Recording---------------------------------)
    same => n,SET(<variables settings>)
    same => n,NoOp(/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\)
    same => n,NoOp(<variables listing>)
    same => n,NoOp(/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\)
    same => n,MixMonitor(<recording>)
    same => n,Return()
    
    
    [to-pstn-test]
    exten => _X.,1,NoOp(-----------Call - Test Context - to-pstn-test---------)
    same => n,DIAL(PJSIP/${EXTEN}@Grandstream)
    same => n,HangUp()
    
    [to-mxone-test]
    exten => _X.,1,Noop(-----------Inbound call from Grandstream------------)
    same => n,DIAL(PJSIP/${EXTEN}@MXONE)
    same => n,HangUp()
    
  3. Example context for routing to PSTN with recording

    [to-pstn-with-rec]
    exten => _X.,1,NoOp(-----------Outbound call with recording----------)
    same => n,Gosub(call_record,${EXTEN},1)
    same => n,DIAL(PJSIP/${EXTEN}@TrunkPSTN)
    same => n,HangUp()
    
  4. Example of context for routing to PBX with recording

    [to-pbx-with-rec]
    exten => _X.,1,Noop(-----------Inbound call with recording------------)
    same => n,ExecIf($["${CALLERID(number)}" = "anonymous"]?Set(CALLERID(number)=900404006))
    same => n,ExecIf($["${CALLERID(number):0:1}" = "+"]?Set(CALLERID(number)=00${CALLERID(num):1}))
    same => n,Gosub(call_record,${EXTEN},1)
    same => n,DIAL(PJSIP/${EXTEN}@TrunkPBX)
    same => n,HangUp()