Language:


Asterisk

Asterisk is switchboard software that runs on computers using Linux and other operating systems. It is an open-source software project that is available for anybody to download and install without charge. It supports the SIP standard for connecting to IP-based telephones (e.g. softphones such as EyeBeam and X-Lite, hardphones from Cisco and other vendors, Nokia E-series cellphones with built-in SIP softphone etc.). Standard ERP integrates with the Asterisk switchboard, not the telephones themselves.

To call a Contact through an Asterisk-based switchboard, first open the 'Business Communicator' window:

Click on the Contact in the Contact list and then click on their telephone or mobile number in the Contact Method list (you cannot call a SIP address using Asterisk). Alternatively, enter a telephone number in the Dial field. Then, click the [Asterisk] button.

A call will be established between you and the Contact. First, your SIP client (softphone (e.g. EyeBeam, X-Lite) or hardphone) will ring. When you answer, the Contact's telephone will ring.

You cannot use the [Asterisk] button to answer an incoming Asterisk call. You can only do this using your soft- or hardphone.

Communication through an Asterisk-based switchboard requires the following:

  • You must have configured your Standard ERP database to communicate through an Asterisk-based switchboard, as described immediately below.

  • You must have a softphone application (e.g. EyeBeam, X-Lite) running and logged in to your Asterisk server, or a hardphone (e.g. USB telephone) correctly connected and logged in.
To configure your Standard ERP database to communicate through an Asterisk-based switchboard, follow these steps:
  1. Ensure the Asterisk Management Interface has been enabled on your Asterisk server, and that a context named "HansaWorld" has been configured.

  2. Log in to your Standard ERP system as a system administrator with access to the Technics module, as described here.

  3. Open the Configuration setting in the System module and make sure that the Telephony and Asterisk Gateway options on the 'Technical' card are checked.

  4. Open the PBX Connection register in the Telephony module and create a new record:

    Enter the following details to allow your Standard ERP server to log in to your Asterisk server(s) automatically:
    Code
    Enter a unique code for the PBX Connection record.

    Type
    Paste Special    Choices of possible entries
    Choose the relevant version of your Asterisk server using 'Paste Special'.

    Hostname
    Enter the address of the Asterisk server. This should be its domain name (e.g. sip.companyname.com).

    Port
    Enter the port number used by the Asterisk Management Interface on the Asterisk server. Usually this will be 5038. This port should be open on the firewall between the Standard ERP server and the telephony server.

    Host IP
    Enter the IP address of the Asterisk server here. This field is used for IAX authentication, so will be useful if you have several Asterisk servers that need to communicate with each other. This field is also used if the IP address of the Asterisk server is different to its public IP address, in which case you should enter its IP address here.

    Username, Password
    Enter the login details of the administrator account for the Asterisk Management Interface. This account needs to have sufficient access to be able to monitor what's happening on the server, and to be able to "originate" calls.
    Save the PBX Connection record and then restart the Standard ERP server application. After restarting, it will connect to the Asterisk server(s).

  5. The next step is to register the SIP user names of each member of staff. Create records in the Contact for each member of staff, and enter their SIP user names in the SIP field. The Contact records should also contain extension numbers that other members of staff can call within the Asterisk server.

    Connect these Contact records to the relevant Person or Global User records using the Contact Code field on the 'Access' card. Please refer to the following pages below for more details about this process: Named Users; Concurrent Users; or Global Users.

    Each user name should use the format username@sip.companyname.com.

    The user names must be registered in the relevant Asterisk server. If they are not, you can enter them in the Asterisk Users setting in the Telephony module or on the 'Asterisk' cards of the relevant Person or Global User records and then use the 'Asterisk SIP Configuration Files' Maintenance function in the same module to register them in the Asterisk server. The Asterisk Users setting will be useful if you need to register SIP user names for members of staff who are not Standard ERP users, or SIP user names that are not tied to particular users (e.g. a phone for public use).

    If the SIP user name is changed in a Person, Global User or Contact record, the relevant member of staff should log out of Standard ERP and log in again for the change to take effect.

  6. The next step is to ensure incoming calls can be identified correctly so that they can be matched to numbers that are already in the database. For this matching process to be successful, the format of the originating telephone or mobile numbers of incoming calls must be the same as that of numbers in the database. Follow these steps:

    1. Log in again as a system administrator with access to the Technics module, open the record in the PBX Connections setting and go to the 'Location Settings' card:

      Standard ERP will use the information in these fields to identify the originating telephone numbers of each incoming call made to each Asterisk server. After identification, it will use the Normalized Phone Numbers setting (step iii below) to attempt to match the telephone number to a record in the Contact register, and to open an Activity for that Contact.
      International Dial Prefix
      Specify the international dialling code that must be dialled from the country where the Asterisk server is located. In Europe, this will be 00.

      Country Code
      Specify the country code of the country where the Asterisk server is located. For example, if the Asterisk server is located in the UK, this will be 44.

      Default Area Code
      Specify the local area code of the area where the Asterisk server is located. This is only required in countries where you do not need to dial the area code when you are calling numbers in the same area. This is the case in the UK and Sweden.

      Skip Digit for International Calls
      If the Asterisk server is located in a country where the first digit of telephone numbers is not dialled by incoming international callers, specify that digit here. For example, if the Asterisk server is located in the UK, this will be 0.

      External Line Prefix
      For outgoing calls, if you need to dial a number to obtain an outside line, specify that number here.
      For example, if the Asterisk server is in London and receives a call from the London number 3222 1234, the effect of these fields will be to add the international dialling prefix, the country code and the area code less skip digit to produce 00442032221234. If it receives a call from the Reading number 0118 222 1234, the effect of these fields will be to add the international dialling prefix and the country code and to remove the skip digit, producing 00441182221234.

    2. Having ensured that incoming numbers all use the same format, you should now ensure the Contact numbers in the database also use the same format, so that they can be matched up. To do this, you will use the Telephony Settings setting.

      Note that records in the PBX Connections setting are stored in Company 0, a partition of the database that stores information at database level (i.e. information that is available to every Company). Connecting to an Asterisk server and receiving and identifying incoming calls from that server are database level operations. This means you only need configure dialling information in the PBX Connections setting once, and you can do so working in any Company. However, if you have more than one Company, you will need to configure the Telephony Settings setting separately in every Company. This allows for the possibility that different Companies might represent departments in different parts of the country (with different area codes) or even in different countries.

      In each Company, open the Telephony Settings setting in the CRM module:

      In configuring the Telephony Settings setting, bear in mind the telephone and mobile numbers that are already in the database, and also think about how users will enter telephone and mobile numbers in the future. For example, numbers local to the Company may have been entered without area codes. So, while the location of the Asterisk server will determine what you entered in the SIP Servers setting, the location of the Company will determine the country and area codes here.

      Do not include the Skip Digit in the Default Area Code. For example, if the area code is 020 for London or 0118 for Reading, enter 20 (as shown in the illustration) or 118 respectively.

    3. If you already have Contacts in your database, you should now ensure that their telephone and mobile numbers are in the correct format. You can do this by running the 'Rebuild Number Recognition Register' Maintenance function. This will not change the numbers in the Contact records themselves. Instead, it will use the Telephony Settings setting to convert all numbers to the correct format and save them in a central setting in Company 0 known as the Normalized Phone Numbers setting.

      To run this function, ensure you are in the CRM module, click the [Routines] button in the Navigation Centre and then the [Maintenance] button in the 'Routines' window. Double-click 'Rebuild Number Recognition Register' in the subsequent list. The following window appears:

      Choose the Erase and Update option and click the [Run] button. All numbers (i.e. telephone, mobile, alt phone and fax numbers) in the Contact register will be converted to the correct format and saved in the Normalized Phone Numbers setting. Skype Names will also be saved in the setting, but without any processing. You can open the setting from the CRM module if you need to see its contents:

      If a Contact for example has the London number 020 3222 1234 in the Contact register, the effect of the Maintenance function will be to add the international dialling prefix, the country code and the area code less skip digit to produce 00442032221234. This will match the incoming number described above in step 5 i. When you receive an incoming call from this number, Standard ERP will find it in the Normalized Phone Numbers setting and match it to a record in the Contact register using the Contact Number. The Contact Name will then be shown in the Call list in the 'Business Communicator' window. When you answer the call, a new Activity will be created with the correct Contact Number and Name.

      You only need run the 'Rebuild Number Recognition Register' function once, to make sure the Normalized Phone Numbers setting contains numbers for the Contacts already in your database. As you add new records to the Contact register or modify existing ones, the Normalized Phone Numbers setting will be updated automatically. However, if you make a change in the Telephony Settings setting or to the dialling information in the relevant record in the PBX Connections setting, you should run the 'Rebuild Number Recognition Register' function again. This will update the format of the records already in the Normalized Phone Numbers setting.

      If you have more than one Company in your database, you need to configure the Telephony Settings setting separately in each Company, but you only need run the 'Rebuild Number Recognition Register' function once, from any Company. All numbers in every Company will be reformatted and copied to the Normalized Phone Numbers setting.

    4. Periodically, you should use the List Invalid Phone Numbers report in the CRM module to list telephone and mobile numbers containing illegal characters. If you print the report to screen, you can drill down to each Contact to make the correction. You should do this separately in each Company.
---

Types of window in Standard ERP:

Go back to: